Skip to content

Introduce Zizmore to audit Github actions - #1571

Open
zetter-rpf wants to merge 7 commits into
mainfrom
zizmor
Open

Introduce Zizmore to audit Github actions#1571
zetter-rpf wants to merge 7 commits into
mainfrom
zizmor

Conversation

@zetter-rpf

@zetter-rpf zetter-rpf commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Related to https://github.com/RaspberryPiFoundation/digital-editor-issues/issues/1695

This introduces Zizmore and autofixes many of the issues (see commits for more)

I've ignored the remaining issues that aren't autofixable. These are lower risk as we don't run actions automatically for untrusted users, but we could choose to fix them in the future.

Introduces .github/zizmor.yml to grandfather in every offense zizmor
currently reports (artipacked, unpinned-uses, cache-poisoning,
secrets-inherit, template-injection) so future runs only flag newly
introduced issues. Follow-up commits will fix the autofixable rules
one at a time and shrink this list.
Adds persist-credentials: false to every actions/checkout step so the
default GITHUB_TOKEN isn't persisted in the git config after checkout,
applied via `zizmor --fix=unsafe-only`. Also regenerates the remaining
ignore entries in .github/zizmor.yml since the fix shifted line
numbers for the still-ignored findings further down each file.
Pins every `uses:` reference to its resolved commit SHA (keeping the
original version tag as a trailing comment) via `zizmor --fix=unsafe-only`,
so a compromised or re-tagged upstream action release can't silently
change what CI runs. Also removes the now-stale unpinned-uses entries
from .github/zizmor.yml.
…list

Moves attacker-influenceable `${{ }}` expressions (workflow_call inputs,
job outputs) out of deploy.yml's `run:` script bodies into `env:`
variables via `zizmor --fix=unsafe-only`, so their values are passed as
data rather than interpolated directly into the shell script.

cache-poisoning and secrets-inherit have no zizmor autofix, so their
entries in .github/zizmor.yml are left in place pending manual review.
Replaces the file:line ignore lists for cache-poisoning and
secrets-inherit with rules.<id>.disable: true. The line-based ignores
had to be regenerated by hand every time an earlier fix shifted line
numbers in the workflows; disabling the rule avoids that churn since
these two audits have no autofix and haven't been addressed yet.

Trade-off: unlike the ignore-by-location form, disabling hides *all*
future cache-poisoning/secrets-inherit findings anywhere in the repo,
not just today's known ones. Re-enable a rule here once it's been
fixed.
Adds a zizmor job to ci-cd.yml, installed via uv/uvx per zizmor's own
recommended integration, so any newly introduced finding fails CI
instead of only being caught by someone running zizmor locally.
Existing findings stay suppressed via .github/zizmor.yml.
@zetter-rpf
zetter-rpf temporarily deployed to previews/1571/merge August 5, 2026 13:50 — with GitHub Actions Inactive
These two jobs were still pinned to the ancient actions/checkout v1
tag while every other job in the repo already uses v4.4.0. Nothing in
either job depended on v1-specific behavior, so bump them to match.
@zetter-rpf zetter-rpf changed the title Zizmor Introduce Zizore to audit Github actions Aug 5, 2026
@zetter-rpf zetter-rpf changed the title Introduce Zizore to audit Github actions Introduce Zizmore to audit Github actions Aug 5, 2026
@zetter-rpf
zetter-rpf marked this pull request as ready for review August 5, 2026 14:46

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit c27b750. Configure here.

uses: actions/checkout@v4
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Checkout credentials break version bump

High Severity

The persist-credentials: false option in the checkout step removes the git authentication token. This leads to subsequent git push commands failing due to authentication errors, which prevents the bump-version workflow from creating PRs.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit c27b750. Configure here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'll need to work around this.

Comment thread .github/workflows/ci-cd.yml
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