This commit is contained in:
Kristen Newbury
2026-07-10 09:36:53 -04:00
parent 059aa2da70
commit 2cd9220b74
2 changed files with 3 additions and 3 deletions

View File

@@ -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()
}
}

View File

@@ -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"))