mirror of
https://github.com/github/codeql.git
synced 2026-07-29 06:46:46 +02:00
Format
This commit is contained in:
@@ -144,7 +144,8 @@ class EnvironmentCheck extends ControlCheck instanceof Environment {
|
||||
// Environment checks are not effective against any mutable attacks
|
||||
// they do actually protect against untrusted code execution (sha)
|
||||
override predicate protectsCategoryAndEvent(string category, string event) {
|
||||
event = [actor_is_attacker_event(), actor_not_attacker_event()] and category = non_toctou_category()
|
||||
event = [actor_is_attacker_event(), actor_not_attacker_event()] and
|
||||
category = non_toctou_category()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,8 +23,7 @@ where
|
||||
// the checked-out code may lead to arbitrary code execution
|
||||
checkout.getAFollowingStep() = step and
|
||||
// the checkout occurs in a privileged context
|
||||
inPrivilegedContext(checkout, event)
|
||||
and
|
||||
inPrivilegedContext(checkout, event) and
|
||||
// the mutable checkout step is protected by an Insufficient access check
|
||||
exists(ControlCheck check1 | check1.protects(checkout, event, "untrusted-checkout")) and
|
||||
not exists(ControlCheck check2 | check2.protects(checkout, event, "untrusted-checkout-toctou"))
|
||||
|
||||
Reference in New Issue
Block a user