Skip to content

Commit b80d3d5

Browse files
author
Alvaro Muñoz
committed
exclude Simple refereces from GitHub context
1 parent f6d2019 commit b80d3d5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ql/lib/codeql/actions/security/UntrustedCheckoutQuery.qll

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,8 @@ class ActionsMutableRefCheckout extends MutableRefCheckoutStep instanceof UsesSt
245245
|
246246
expr.(StepsExpression).getStepId() = value
247247
or
248-
expr.(SimpleReferenceExpression).getFieldName() = value
248+
expr.(SimpleReferenceExpression).getFieldName() = value and
249+
not expr instanceof GitHubExpression
249250
or
250251
expr.(NeedsExpression).getNeededJobId() = value
251252
or
@@ -279,7 +280,8 @@ class ActionsSHACheckout extends SHACheckoutStep instanceof UsesStep {
279280
|
280281
expr.(StepsExpression).getStepId() = value
281282
or
282-
expr.(SimpleReferenceExpression).getFieldName() = value
283+
expr.(SimpleReferenceExpression).getFieldName() = value and
284+
not expr instanceof GitHubExpression
283285
or
284286
expr.(NeedsExpression).getNeededJobId() = value
285287
or

0 commit comments

Comments
 (0)