-
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: setup-go's cache-control is OptOut (#343)
Co-authored-by: William Woodruff <william@yossarian.net>
- Loading branch information
Showing
4 changed files
with
106 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
--- | ||
source: tests/snapshot.rs | ||
expression: "zizmor().workflow(workflow_under_test(\"cache-poisoning/issue-343-repro.yml\")).run()?" | ||
snapshot_kind: text | ||
--- | ||
error[cache-poisoning]: runtime artifacts potentially vulnerable to a cache poisoning attack | ||
--> @@INPUT@@:5:1 | ||
| | ||
5 | / on: | ||
6 | | push: | ||
7 | | tags: | ||
8 | | - "v*.*.*" | ||
| |________________^ generally used when publishing artifacts generated at runtime | ||
9 | | ||
... | ||
24 | - name: true-positive-2 | ||
25 | uses: actions/setup-go@v5 | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ cache enabled by default here | ||
| | ||
= note: audit confidence → Low | ||
|
||
error[cache-poisoning]: runtime artifacts potentially vulnerable to a cache poisoning attack | ||
--> @@INPUT@@:5:1 | ||
| | ||
5 | / on: | ||
6 | | push: | ||
7 | | tags: | ||
8 | | - "v*.*.*" | ||
| |________________^ generally used when publishing artifacts generated at runtime | ||
9 | | ||
... | ||
31 | uses: actions/setup-go@v5 | ||
32 | / with: | ||
33 | | go-version: stable | ||
34 | | cache: true | ||
35 | | | ||
36 | | # Finding because setup enables cache explicitly | ||
| |______________________________________________________^ opt-in for caching here | ||
| | ||
= note: audit confidence → Low | ||
|
||
error[cache-poisoning]: runtime artifacts potentially vulnerable to a cache poisoning attack | ||
--> @@INPUT@@:5:1 | ||
| | ||
5 | / on: | ||
6 | | push: | ||
7 | | tags: | ||
8 | | - "v*.*.*" | ||
| |________________^ generally used when publishing artifacts generated at runtime | ||
9 | | ||
... | ||
38 | uses: actions/setup-go@v5 | ||
39 | / with: | ||
40 | | go-version: stable | ||
41 | | cache: "true" | ||
| |________________________^ opt-in for caching here | ||
| | ||
= note: audit confidence → Low | ||
|
||
7 findings (4 suppressed): 0 unknown, 0 informational, 0 low, 0 medium, 3 high |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# minimized from https://github.com/woodruffw/zizmor/pull/343 | ||
|
||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
# No finding, since cache is explicitly disabled. | ||
- name: true-negative-1 | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: stable | ||
cache: false | ||
|
||
# Finding because setup-go enables cache by default | ||
- name: true-positive-2 | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: stable | ||
|
||
# Finding because setup enables cache explicitly | ||
- name: true-positive-2 | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: stable | ||
cache: true | ||
|
||
# Finding because setup enables cache explicitly | ||
- name: true-positive-3 | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: stable | ||
cache: "true" |