Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(ci): disable the Go cache in the signed-release flow#105

Merged
cpanato merged 1 commit into
chainguard-dev:mainfrom
stevebeattie:security/psec-923-cache-incert
Jun 25, 2026
Merged

fix(ci): disable the Go cache in the signed-release flow#105
cpanato merged 1 commit into
chainguard-dev:mainfrom
stevebeattie:security/psec-923-cache-incert

Conversation

@stevebeattie

Copy link
Copy Markdown
Member

Follow-up to the GitHub Actions hardening in #104. Workflow-config only — no
application code is touched.

release.yaml's actions/setup-go enables the Go module + build cache by
default. The Go build cache stores compiled objects keyed by an input hash
and is reused on a cache hit without being re-verified against source — go.sum
covers module downloads, not the build cache. So a cache poisoned by a
less-trusted run (e.g. the pull_request-triggered build-snapshot job, which
shares the same go.sum-derived cache key) could be restored into the signed
release build and contaminate published artifacts.

This sets cache: false on the release job's setup-go step, so the signed
release compiles from clean, checksum-verified module downloads and consumes no
PR-writable cache.

Refs: PSEC-923

The release job's actions/setup-go enables the Go module + build cache by
default. The Go build cache stores compiled objects keyed by input hash and is
trusted on a cache hit without re-verifying the output against source (go.sum
covers module downloads, not the build cache), so a cache poisoned by a
less-trusted run (e.g. the pull_request-triggered build-snapshot job, which
shares the go.sum-derived cache key) could be restored into the signed-release
build and contaminate published artifacts. Set cache: false so the release
build pulls no PR-writable cache (zizmor cache-poisoning, release.yaml).

Refs: PSEC-923
@stevebeattie stevebeattie requested review from egibs and eslerm June 25, 2026 13:41
@cpanato cpanato merged commit 820a323 into chainguard-dev:main Jun 25, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants