File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -15,15 +15,17 @@ import actions
15
15
import codeql.actions.security.UntrustedCheckoutQuery
16
16
import codeql.actions.security.PoisonableSteps
17
17
18
- from LabelControlCheck check , MutableRefCheckoutStep checkout
18
+ from ControlCheck check , MutableRefCheckoutStep checkout
19
19
where
20
20
// the mutable checkout step is protected by an access check
21
21
check = [ checkout .getIf ( ) , checkout .getEnclosingJob ( ) .getIf ( ) ] and
22
22
// the checked-out code may lead to arbitrary code execution
23
23
checkout .getAFollowingStep ( ) instanceof PoisonableStep and
24
24
(
25
+ // label gates do not depend on the triggering event
25
26
check instanceof LabelControlCheck
26
27
or
28
+ // actor or Association gates apply to IssueOps only
27
29
( check instanceof AssociationControlCheck or check instanceof ActorControlCheck ) and
28
30
check .getEnclosingJob ( ) .getATriggerEvent ( ) .getName ( ) .matches ( "%_comment" )
29
31
)
Original file line number Diff line number Diff line change @@ -15,15 +15,17 @@ import actions
15
15
import codeql.actions.security.UntrustedCheckoutQuery
16
16
import codeql.actions.security.PoisonableSteps
17
17
18
- from LabelControlCheck check , MutableRefCheckoutStep checkout
18
+ from ControlCheck check , MutableRefCheckoutStep checkout
19
19
where
20
20
// the mutable checkout step is protected by an access check
21
21
check = [ checkout .getIf ( ) , checkout .getEnclosingJob ( ) .getIf ( ) ] and
22
22
// there are no evidences that the checked-out code can lead to arbitrary code execution
23
23
not checkout .getAFollowingStep ( ) instanceof PoisonableStep and
24
24
(
25
+ // label gates do not depend on the triggering event
25
26
check instanceof LabelControlCheck
26
27
or
28
+ // actor or Association gates apply to IssueOps only
27
29
( check instanceof AssociationControlCheck or check instanceof ActorControlCheck ) and
28
30
check .getEnclosingJob ( ) .getATriggerEvent ( ) .getName ( ) .matches ( "%_comment" )
29
31
)
You can’t perform that action at this time.
0 commit comments