ci: [SC-66825] run zizmor and fix GitHub Actions findings - #4
Merged
Conversation
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
Adds a zizmor CI workflow modeled on narrative-skills-marketplace (PR #108) and fixes the findings it reports. release.yml (both cache-poisoning highs): Disables caching in the publish path via setup-bun's no-cache and setup-node's package-manager-cache. This job holds id-token: write and publishes to npm under Narrative's identity, so anything restored from cache would be baked into a signed release; cache scope is per-repository, so an entry poisoned from any branch would reach it. setup-node's cache was active despite no cache: input, because package-manager-cache defaults to true and self-activates from package.json's packageManager field. artipacked (release.yml, ci.yml x3): Adds persist-credentials: false. Nothing in these jobs pushes via git: release-please-action uses the API with its token: input, the release upload uses gh with GH_TOKEN, and commitlint only reads local history. backup-daily.yml: Drops secrets: inherit and scopes the workflow to contents: read. Three adhoc-packages suppressions, each with a written justification: installing a newer npm than the runner ships (required for trusted publishing), and the two throwaway /tmp consumer installs that are themselves the point of the consume job. No other suppressions.
mbabic
force-pushed
the
ci/sc-66825/zizmor-ci-and-actions-hardening
branch
from
August 18, 2026 20:33
de58962 to
b6a0b83
Compare
The step guarded against github.event.before being all-zeroes on a first push, but not against it naming a commit that no longer exists. A force-push orphans the previous tip, orphans are unreachable from any ref, so fetch-depth: 0 never fetches it and commitlint fails with 'Invalid revision range'. Checks that the commit is present before using it, falling back to linting just the pushed tip as the first-push case already did. Uses ci: rather than fix: deliberately: this is a CI-only change and should not cut an npm release.
| jobs: | ||
| zizmor: | ||
| name: Run zizmor 🌈 | ||
| runs-on: ubuntu-latest |
There was a problem hiding this comment.
So is this a feature for zizmor to run on Github's runner, or a bug? Are there some risks involved while running this tool?
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.
Runs zizmor in CI and fixes the findings it reports. Part of sc-66825; modeled on
narrative-skills-marketplacePR #108, the reference implementation for this ticket.Findings fixed
cache-poisoning×2release.ymlartipacked×4release.yml,ci.yml×3persist-credentials: falseexcessive-permissionsbackup-daily.ymlpermissions: contents: readsecrets-inheritbackup-daily.ymlsecrets: inheritadhoc-packages×3release.yml,ci.yml×2Both highs are genuinely fixed, not suppressed.