Skip to content

Commit c4194b1

Browse files
committed
feat: another template injection sink
1 parent cf0abd3 commit c4194b1

File tree

2 files changed

+43
-10
lines changed

2 files changed

+43
-10
lines changed

crates/zizmor/src/audit/template_injection.rs

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,22 @@ static ACTION_INJECTION_SINKS: LazyLock<Vec<(RepositoryUsesPattern, Vec<&str>)>>
5656
)
5757
.unwrap();
5858

59-
// These sinks are not tracked by CodeQL (yet)
60-
sinks.push(("amadevus/pwsh-script".parse().unwrap(), vec!["script"]));
61-
sinks.push((
62-
"jannekem/run-python-script-action".parse().unwrap(),
63-
vec!["script"],
64-
));
65-
sinks.push((
66-
"cardinalby/js-eval-action".parse().unwrap(),
67-
vec!["expression"],
68-
));
59+
sinks.extend([
60+
// These sinks are not tracked by CodeQL (yet)
61+
("amadevus/pwsh-script".parse().unwrap(), vec!["script"]),
62+
(
63+
"jannekem/run-python-script-action".parse().unwrap(),
64+
vec!["script"],
65+
),
66+
(
67+
"cardinalby/js-eval-action".parse().unwrap(),
68+
vec!["expression"],
69+
),
70+
(
71+
"addnab/docker-run-action".parse().unwrap(),
72+
vec!["options", "run"],
73+
),
74+
]);
6975
sinks
7076
});
7177

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# testcases for addnab/docker-run-action
2+
3+
name: test-addnab-docker-run-action
4+
on: [push]
5+
6+
permissions: {}
7+
8+
jobs:
9+
some-job:
10+
name: some-job
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: injection-in-run
15+
uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185
16+
with:
17+
image: ubuntu:latest
18+
options: --rm
19+
run: |
20+
echo "The current branch is ${{ github.ref }}"
21+
22+
- name: injection-in-options
23+
uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185
24+
with:
25+
image: ubuntu:latest
26+
options: ${{ github.ref }}
27+
run: echo "lol"

0 commit comments

Comments
 (0)