Skip to content

ci: [SC-66825] run zizmor and fix GitHub Actions findings - #4

Merged
mbabic merged 2 commits into
mainfrom
ci/sc-66825/zizmor-ci-and-actions-hardening
Aug 18, 2026
Merged

ci: [SC-66825] run zizmor and fix GitHub Actions findings#4
mbabic merged 2 commits into
mainfrom
ci/sc-66825/zizmor-ci-and-actions-hardening

Conversation

@mbabic

@mbabic mbabic commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Runs zizmor in CI and fixes the findings it reports. Part of sc-66825; modeled on narrative-skills-marketplace PR #108, the reference implementation for this ticket.

Findings fixed

Finding Severity Where Fix
cache-poisoning ×2 High release.yml disabled caching in the publish path
artipacked ×4 Low release.yml, ci.yml ×3 persist-credentials: false
excessive-permissions Medium backup-daily.yml permissions: contents: read
secrets-inherit Medium backup-daily.yml dropped secrets: inherit
adhoc-packages ×3 Low release.yml, ci.yml ×2 suppressed, justified inline

Both highs are genuinely fixed, not suppressed.

@github-advanced-security

Copy link
Copy Markdown

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:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

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
mbabic force-pushed the ci/sc-66825/zizmor-ci-and-actions-hardening branch from de58962 to b6a0b83 Compare August 18, 2026 20:33
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.
@mbabic
mbabic merged commit a3244b8 into main Aug 18, 2026
7 checks passed
@mbabic
mbabic deleted the ci/sc-66825/zizmor-ci-and-actions-hardening branch August 18, 2026 21:01
jobs:
zizmor:
name: Run zizmor 🌈
runs-on: ubuntu-latest

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

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