Skip to content

Commit cca591d

Browse files
timzsuclaude
andcommitted
ci: clear zizmor findings on image-publish.yml
Pedantic-persona zizmor (the form CI runs under ``--persona pedantic --format github``) was failing with two findings on the image-publish workflow: * ``cache-poisoning`` (high) — ``astral-sh/setup-uv`` enables its cache by default. In a workflow that pushes signed artifacts to GHCR, a poisoned cache could influence the publishing step. Set ``enable-cache: false`` on this workflow's setup-uv invocation; the other setup-uv calls (lint, tests, env-examples, security, etc.) aren't publishing workflows and keep caching for speed. * ``undocumented-permissions`` (low) — ``packages: write`` at job level had no explanatory comment. Added the same style of inline comment release-images.yml already uses (`docker/login-action + build-push-action push to GHCR`). ``zizmor --persona pedantic --format github`` exits 0 after the fix. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Zhengyuan Su <su.zhengyuan@u.nus.edu>
1 parent 5a3a392 commit cca591d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/image-publish.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
runs-on: ubuntu-latest
3232
permissions:
3333
contents: read
34-
packages: write
34+
packages: write # docker/login-action + build-push-action push to GHCR
3535
steps:
3636
- name: Checkout
3737
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
@@ -78,6 +78,8 @@ jobs:
7878
with:
7979
version: "0.11.8"
8080
python-version: "3.12"
81+
# No uv cache restore in a publishing workflow (cache-poisoning).
82+
enable-cache: false
8183

8284
- name: Sync server requirements from uv.lock
8385
run: uv run --frozen scripts/dev/sync_requirements.py --write

0 commit comments

Comments
 (0)