ci: harden workflows against zizmor artipacked and cache-poisoning findings - #162
Merged
Merged
Conversation
Two documented flags, no logic or deployment changes: - `persist-credentials: false` on every actions/checkout step (8). No step after checkout uses git credentials: the release upload, issue creation, CodeQL upload and dependency review all authenticate via the GITHUB_TOKEN input/env, so the token no longer needs to live in .git/config where an uploaded artifact could capture it. - `package-manager-cache: false` on the setup-node step of build-server.yml only. That job publishes release artifacts, so it must never restore a shared npm cache. CI and the scheduled contract job keep their cache; they publish nothing. zizmor (v1.30.1): 1 high + 8 medium -> 0 high, 0 medium. The remaining informational finding (script `gh release` instead of softprops/action-gh-release) is a deliberate keep -- changing how we publish is out of scope. Closes #156. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This was written agentically; verify its assertions:
Why
zizmorreports one high (cache-poisoning) and eight medium (artipacked) findings on the workflows (#156). Both have a documented one-line remedy that changes no build or deployment logic.What
persist-credentials: falseon all 8actions/checkoutsteps. Every downstream step authenticates through theGITHUB_TOKENinput or env (gh-release, create-issue-from-file, CodeQL upload, dependency-review), so nothing needs the token in.git/config.package-manager-cache: falseonbuild-server.yml's setup-node only: the release-publishing job never restores a shared npm cache. CI and the weekly contract job keep their cache.Deliberately unchanged: the informational
superfluous-actionssuggestion to replacesoftprops/action-gh-releasewith agh releasescript. That would change how releases are published and is out of scope.Testing
zizmorbefore: 1 high, 8 medium, 1 info → after: 0 high, 0 medium, 1 info (the kept one)persist-credentials: falseexercised by every CI job)Build Portable Serverrun on main succeeds without the npm cache (only runs on push to main)Closes #156.
🤖 Co-authored by Claude Fable 5.1.
🤖 Generated with Claude Code