@@ -133,17 +133,12 @@ predicate isRunInjectable(Actions::Run run, string injection, string context) {
133133 * Holds if the `actions/github-script` contains any expression interpolation `${{ e }}`.
134134 * Sets `context` to the initial untrusted value assignment in case of `${{ env... }}` interpolation
135135 */
136- predicate isScriptInjectable ( Actions:: Script script , string injection , string context ) {
137- exists ( Actions:: Step step , Actions:: Uses uses |
138- script .getWith ( ) .getStep ( ) = step and
139- uses .getStep ( ) = step and
140- uses .getGitHubRepository ( ) = "actions/github-script" and
141- Actions:: getASimpleReferenceExpression ( script ) = injection and
142- (
143- injection = context
144- or
145- isEnvInterpolationTainted ( injection , context )
146- )
136+ predicate isScriptInjectable ( Actions:: GitHubScript script , string injection , string context ) {
137+ Actions:: getASimpleReferenceExpression ( script ) = injection and
138+ (
139+ injection = context
140+ or
141+ isEnvInterpolationTainted ( injection , context )
147142 )
148143}
149144
@@ -158,7 +153,7 @@ where
158153 run .getStep ( ) .getRuns ( ) = runs
159154 )
160155 or
161- exists ( Actions:: Script script |
156+ exists ( Actions:: GitHubScript script |
162157 node = script and
163158 script .getWith ( ) .getStep ( ) .getRuns ( ) = runs and
164159 isScriptInjectable ( script , injection , context )
@@ -184,7 +179,7 @@ where
184179 run .getStep ( ) .getJob ( ) .getWorkflow ( ) .getOn ( ) = on
185180 )
186181 or
187- exists ( Actions:: Script script |
182+ exists ( Actions:: GitHubScript script |
188183 node = script and
189184 script .getWith ( ) .getStep ( ) .getJob ( ) .getWorkflow ( ) .getOn ( ) = on and
190185 isScriptInjectable ( script , injection , context )
0 commit comments