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
| The kind of audit ("Workflow" or "Action") | Links to vulnerable examples | Added to `zizmor` in this version | The audit works with `--offline`| The audit needs to be explicitly enabled with `--pedantic`| The audit supports custom configuration |
15
+
| The kind of audit ("Workflow" or "Action") | Links to vulnerable examples | Added to `zizmor` in this version | The audit works with `--offline`| The audit needs to be explicitly enabled via configuration or an API token| The audit supports custom configuration |
16
16
17
17
## `artipacked`
18
18
@@ -313,7 +313,7 @@ that exists only in a fork can be referenced via its parent's
313
313
`owner/repo` slug, and vice versa.
314
314
315
315
GitHub's network-of-forks design can be used to obscure a commit's true origin
316
-
in a fully-pinned `uses:` workflow reference. This can be used by an attacker
316
+
in a fully-pinned `#!yaml uses:` workflow reference. This can be used by an attacker
317
317
to surreptitiously introduce a backdoored action into a victim's workflows(s).
318
318
319
319
A notable historical example of this is github/dmca@565ece486c7c1652754d7b6d2b5ed9cb4097f9d5,
@@ -373,7 +373,7 @@ Detects actions that are pinned to confusable symbolic refs (i.e. branches
373
373
or tags).
374
374
375
375
Like with [impostor commits], actions that are used with a symbolic ref
376
-
in their `uses:` are subject to a degree of ambiguity: a ref like
376
+
in their `#!yaml uses:` are subject to a degree of ambiguity: a ref like
377
377
`@v1` might refer to either a branch or tag ref.
378
378
379
379
An attacker can exploit this ambiguity to publish a branch or tag ref that
The `forbidden-uses` audit operates on either an allowlist or denylist
1142
+
basis:
1143
+
1144
+
* In allowlist mode, only the listed `#!yaml uses:` patterns are allowed. All
1145
+
non-matching `#!yaml uses:` clauses result in a finding.
1146
+
1147
+
Intended use case: only allowing "known good" actions to be used,
1148
+
and forbidding everything else.
1149
+
1150
+
* In denylist mode, only the listed `#!yaml uses:` patterns are disallowed. All
1151
+
matching `#!yaml uses:` clauses result in a finding.
1152
+
1153
+
Intended use case: permitting all `#!yaml uses:` by default, but explicitly
1154
+
forbidding "known bad" actions.
1155
+
1156
+
Regardless of the mode used, the patterns allowed are the same as those
1157
+
in [unpinned-uses](#unpinned-uses-configuration).
1158
+
1159
+
For example, the following configuration would allow only actions owned by
1160
+
the @actions organization, plus any actions defined in @github/codeql-action:
1161
+
1162
+
```yaml title="zizmor.yml"
1163
+
rules:
1164
+
forbidden-uses:
1165
+
config:
1166
+
allow:
1167
+
- actions/*
1168
+
- github/codeql-action
1169
+
```
1170
+
1171
+
Whereas the following would allow all actions except for those in the
1172
+
@actions organization or defined in @github/codeql-action:
1173
+
1174
+
```yaml title="zizmor.yml"
1175
+
rules:
1176
+
forbidden-uses:
1177
+
config:
1178
+
deny:
1179
+
- actions/*
1180
+
- github/codeql-action
1181
+
```
1182
+
1183
+
### Remediation
1184
+
1185
+
Either remove the offending `#!yaml uses:` clause or, if intended, add it to
1186
+
your [configuration](#forbidden-uses-configuration).
1106
1187
1107
1188
[ArtiPACKED: Hacking Giants Through a Race Condition in GitHub Actions Artifacts]: https://unit42.paloaltonetworks.com/github-repo-artifacts-leak-tokens/
1108
1189
[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests]: https://securitylab.github.com/resources/github-actions-preventing-pwn-requests/
@@ -1128,3 +1209,5 @@ individual fields as separate secrets.
0 commit comments