Skip to content

🤖 ci: harden workflow per zizmor audit - #56

Merged
dancergraham merged 3 commits into
mainfrom
ci/zizmor-hardening
Nov 16, 2026
Merged

dancergraham merged 3 commits into
mainfrom
ci/zizmor-hardening

Conversation

@dancergraham

Copy link
Copy Markdown
Owner

Fixes the zizmor findings on .github/workflows/CI.yml.

  • Pin all actions to commit SHAs (29 unpinned-uses). Each pin has a version comment so Dependabot updates the SHA and the tag together. uraimo/run-on-arch-action is pinned to the current v3 branch-tag commit, which has no exact release tag, so its comment says # v3.
  • Disable sccache for tag builds (4 cache-poisoning). PR and main builds still use the cache. Tag builds, which are the ones the release job publishes, now build clean.
  • persist-credentials: false on every checkout (7 artipacked).

Verification

  • zizmor --offline . → No findings to report (was 40: 33 high, 7 low)
  • zizmor . with GitHub API access (online audits) → No findings to report
  • The workflow file parses as YAML, and its CRLF line endings are unchanged
  • CI on this PR covers the PR path only, where sccache stays on. The tag path (sccache: false) won't run until the next release.

Deliberately not in this PR

  • Switching to PyPI Trusted Publishing and removing PYPI_API_TOKEN (needs a PyPI-side configuration change)
  • Putting release behind a protected environment, limiting release to tags (it currently also runs on workflow_dispatch), and adding pattern: to download-artifact
  • Pedantic-persona items: concurrency limits, job names

🤖 Generated with Claude Code

dancergraham and others added 3 commits November 16, 2026 13:53
Addresses zizmor unpinned-uses findings. Version comments let
Dependabot keep SHAs and tags in sync.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Release wheels are built from the same jobs that PRs populate the
sccache for. Building tags without the cache removes the
cache-poisoning path into published artifacts (zizmor cache-poisoning).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
No job pushes back to the repo, so drop the persisted token from
.git/config to avoid leaking it via uploaded artifacts (zizmor artipacked).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dancergraham
dancergraham marked this pull request as ready for review November 16, 2026 15:50
@dancergraham
dancergraham merged commit e4a590a into main Nov 16, 2026
17 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.

1 participant