You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Improved the queries for injection vulnerabilities in GitHub Actions workflows (`js/actions/command-injection` and `js/actions/pull-request-target`) and the associated library `semmle.javascript.Actions`. These now support steps defined in composite actions, in addition to steps defined in Actions workflow files. It supports more potentially untrusted input values. Additionally to the shell injections it now also detects injections in `actions/github-script`. It also detects simple injections from user controlled `${{ env.name }}`. Additionally to the `yml` extension now it also supports workflows with the `yaml` extension.
/** Gets the 0-based position of this step within the sequence of `steps`. */
138
228
intgetIndex(){result=index}
139
229
140
-
/** Gets the job this step belongs to. */
141
-
JobgetJob(){result=job}
230
+
/** Gets the `job` this step belongs to, if the step belongs to a `job` in a workflow. Has no result if the step belongs to `runs` in a custom composite action. */
231
+
JobgetJob(){result=parent}
232
+
233
+
/** Gets the `runs` this step belongs to, if the step belongs to a `runs` in a custom composite action. Has no result if the step belongs to a `job` in a workflow. */
234
+
RunsgetRuns(){result=parent}
142
235
143
236
/** Gets the value of the `uses` field in this step, if any. */
144
237
UsesgetUses(){result.getStep()=this}
@@ -149,6 +242,9 @@ module Actions {
149
242
/** Gets the value of the `if` field in this step, if any. */
150
243
StepIfgetIf(){result.getStep()=this}
151
244
245
+
/** Gets the value of the `env` field in this step, if any. */
* Holds if `${{ e }}` is a GitHub Actions expression evaluated within this YAML string.
345
+
* See https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions.
346
+
* Only finds simple expressions like `${{ github.event.comment.body }}`, where the expression contains only alphanumeric characters, underscores, dots, or dashes.
347
+
* Does not identify more complicated expressions like `${{ fromJSON(env.time) }}`, or ${{ format('{{Hello {0}!}}', github.event.head_commit.author.name) }}
* A `run` field within an Actions job step, which runs command-line programs using an operating system shell.
249
364
* See https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsrun.
@@ -255,20 +370,5 @@ module Actions {
255
370
256
371
/** Gets the step that executes this `run` command. */
257
372
StepgetStep(){result=step}
258
-
259
-
/**
260
-
* Holds if `${{ e }}` is a GitHub Actions expression evaluated within this `run` command.
261
-
* See https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions.
262
-
* Only finds simple expressions like `${{ github.event.comment.body }}`, where the expression contains only alphanumeric characters, underscores, dots, or dashes.
263
-
* Does not identify more complicated expressions like `${{ fromJSON(env.time) }}`, or ${{ format('{{Hello {0}!}}', github.event.head_commit.author.name) }}
264
-
*/
265
-
stringgetASimpleReferenceExpression(){
266
-
// We use `regexpFind` to obtain *all* matches of `${{...}}`,
267
-
// not just the last (greedy match) or first (reluctant match).
0 commit comments