Skip to content

Introduce Zizmore to audit Github actions - #946

Open
zetter-rpf wants to merge 6 commits into
mainfrom
zizmore
Open

Introduce Zizmore to audit Github actions#946
zetter-rpf wants to merge 6 commits into
mainfrom
zizmore

Conversation

@zetter-rpf

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

Copy link
Copy Markdown
Contributor

Status

What's changed?

  • Introducing Zizmore and run CI
  • Fix or ignore issues (see commits for more)

Introduces zizmor for GitHub Actions security linting. All rules that
currently fail are ignored for now; each will be addressed and its
ignore removed in a follow-up commit.
actions/checkout now sets persist-credentials: false so the checked
out repo's git credentials aren't persisted for later steps (or
leaked via uploaded artifacts). Neither job performs git operations
after checkout, so this is safe.

Applied via `zizmor --fix=unsafe-only`; removes the artipacked ignore
now that it's resolved.
Pin all third-party actions (actions/checkout, ruby/setup-ruby,
browser-actions/setup-firefox, actions/upload-artifact,
actions/stale) to a commit SHA rather than a mutable tag, so a
compromised or force-pushed tag can't silently swap in different
code.

Applied via `zizmor --fix=unsafe-only`; removes the unpinned-uses
ignore now that it's resolved.
Adds a dedicated job that runs zizmor against the workflow
definitions on every push and PR, using the .github/zizmor.yml
config to skip the one remaining finding (unpinned-images) that
has no auto-fix.
Since we control this image we can trust updates to it
Copilot AI review requested due to automatic review settings August 5, 2026 14:29
@cla-bot cla-bot Bot added the cla-signed label Aug 5, 2026
@zetter-rpf zetter-rpf changed the title Zizmore Introduce Zimore to audit Github actions Aug 5, 2026
@zetter-rpf zetter-rpf changed the title Introduce Zimore to audit Github actions Introduce Zizore to audit Github actions Aug 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR hardens GitHub Actions security posture by pinning reusable actions to immutable SHAs and adding a dedicated zizmor workflow analysis job to the existing CI pipeline.

Changes:

  • Pin GitHub Actions (checkout, setup-ruby, setup-firefox, upload-artifact, stale) to commit SHAs (with version comments).
  • Add a new zizmor job to lint/analyze workflows via uvx zizmor ..
  • Disable persist-credentials on checkouts to avoid leaving credentials in the Git workspace.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/close_stale_issues_and_prs.yml Pins actions/stale to a specific commit SHA for supply-chain safety.
.github/workflows/ci.yml Pins key actions to SHAs, disables checkout credential persistence, and adds a zizmor workflow scanning job (with one suppression).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/ci.yml
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Test coverage

92.18% line coverage reported by SimpleCov.
Run: https://github.com/RaspberryPiFoundation/editor-api/actions/runs/31017670297

@raspberrypiherokubot
raspberrypiherokubot temporarily deployed to editor-api-p-zizmore-kjlryobly August 5, 2026 14:38 Inactive
@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:44

@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 5e6705e. Configure here.

Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pinned actions lack Dependabot

Medium Severity

Actions were switched from floating tags to immutable SHAs, but Dependabot still only watches bundler. Those pins will not receive automated update PRs, so security fixes in checkout, setup-ruby, upload-artifact, stale, and setup-uv can sit unpatched until someone updates them by hand.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 5e6705e. 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.

This is a tradeoff. I'm not sure how common security issues are in actions

Matches editor-ui's convention of pinning the zizmor package version
via uvx, alongside the already SHA-pinned setup-uv action.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Suppressed comments (2)

.github/workflows/ci.yml:57

  • Prefer ${{ github.token }} over ${{ secrets.GITHUB_TOKEN }} for the built-in workflow token to stay consistent with the rest of this workflow (e.g. the coverage comment step uses GITHUB_TOKEN: ${{ github.token }} at line 171) and to avoid unnecessary reliance on the secrets context.
        env:
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ci.yml:103

  • With zizmor now running in CI, note that other service images in this workflow (e.g. postgres:12, redis:6.2-alpine) may also be flagged by the unpinned-images rule if it requires digest pinning. If the zizmor job fails on those, you’ll need to either pin them to digests or apply the same zizmor: ignore[unpinned-images] approach consistently.
        image: 'ghcr.io/raspberrypifoundation/heroku-connect' # zizmor: ignore[unpinned-images]

@adrian-rpf adrian-rpf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks interesting to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants