Repository navigation
ci: add zizmor workflow audit job - #991
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
6dca439
ℹ️ Sentinel notice — informational; author is trusted (hive agent), merge is not blockedHive flagged this PR (author @hivecommons-hive[bot], head
Hive did not add the |
- preview.yml: cloudflare/pages-action was deleted upstream, so zizmor's online audits could not resolve it and aborted. Switch to its supported replacement, cloudflare/wrangler-action (pinned v4.1.3), running `pages deploy` with the same project and branch, and read the preview URL from its pages-deployment-alias-url / deployment-url outputs. - backCatalogueOrder test: #989 moved the artwork registry to projectbluefin/artwork; accept projectbluefin/ as well as ublue-os/ (bazzite) source repos. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
zizmor's ref-version-mismatch audit flagged the "# v7" / "# v5" comments: those floating tags have moved on, while the pinned SHAs are the exact releases actions/checkout v7.0.0, actions/setup-node v7.0.0 and actions/deploy-pages v5.0.0. Update the comments only; pins unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
There was a problem hiding this comment.
HUMAN DECISION NEEDED — confirm the swap of the pull-request preview deploy step from the deleted cloudflare/pages-action to cloudflare/wrangler-action, which cannot be exercised in CI because the preview job is currently disabled.
Summary: This change adds an automated safety checker for the project's build-and-deploy recipes, as the linked issue asked. To make that checker pass, it also quietly replaces the tool used to publish preview copies of the website for pull requests (the old tool no longer exists upstream) and fixes a test that was already failing on the main branch. The checker itself is correct and matches the approved text; the preview-publishing swap is reasonable but untested and is not mentioned in the description.
What I need from you: Confirm the preview-publishing swap is acceptable, and ask the author to describe it in the pull-request body.
correctness
.github/workflows/preview.yml:63-71—cloudflare/pages-actionis replaced bycloudflare/wrangler-action@953926a2…(# v4.1.3; SHA verified against the v4.1.3 tag) runningpages deploy dist --project-name=… --branch=…. Thepreviewjob is gated byvars.CLOUDFLARE_PAGES_ENABLED == 'true'(preview.yml:20-22) and was skipped on every commit of this PR, so the new deploy step and the renamed outputs (preview.yml:76,pages-deployment-alias-url || deployment-url; both exist in wrangler-action v4.1.3action.yml:55,57) have never run. The old action's repo is 404 upstream, so the swap is necessary for zizmor'simpostor-commitaudit (first commit's run errored with "couldn't list tags for cloudflare/pages-action"), but a public-facing deploy step is being changed blind.
intent-alignment
- PR body "Technical details" lists only the zizmor job and says "zizmor … reports 0 findings on main and needs no baseline configuration". On main the audit does not reach a result — it errors on the deleted
cloudflare/pages-action(preview.yml:65on main; job 127590620667). The body omits the two changes required to make the job green: the preview deploy action swap (preview.yml:63-71) and the test regex fix (src/tests/backCatalogueOrder.test.ts:202,ublue-os→(?:projectbluefin|ublue-os), fixing thetestjob that is already red on main). Issue #979 asked for "one PR adding the zizmor job above to ci.yml". Requested change: add both to the PR body so the record of what shipped is accurate.
security (advisory, non-blocking)
preview.yml:71interpolatesgithub.event.pull_request.head.refintocommand:. wrangler-action runs via@actions/exec(no shell), and the job only runs for same-repo PRs (preview.yml:21), so it is argument-splitting by a collaborator at worst. Acceptable; noting for the record. Credentials go to Cloudflare's own pinned action, same vendor as before.
No findings from: style, docs-currency.
Confidence: 3/5 (needs attention) — 1 medium finding; 1 perspective requires a human decision
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. Review findings from Summary: This change adds an automated safety checker for the project's build-and-deploy definitions, and makes the small fixes needed for that checker (and the existing tests) to pass. I read the full change and the upstream replacement action it switches to; the check job matches what the issue asked for and runs green. One small hardening note on the new preview-deploy step, plus confirmation of what I could and could not verify. security
correctness
intent-alignment
No findings from: style, docs-currency. |
Danathar
left a comment
There was a problem hiding this comment.
zizmor job read-only and digest-pinned; wrangler-action v4.1.3 replaces the deleted pages-action (preview job is gated off). Follow-up: pin wranglerVersion and pass head.ref via env.
Summary: This PR adds the zizmor workflow audit job to the CI workflow as approved in projectbluefin/actions#674. The job runs on every pull request and catches workflow problems such as jobs with more rights than they use, expressions pasted into shell commands, or credentials left behind.
zizmor does not pass on
mainas-is: the onlineimpostor-commitaudit errors becausecloudflare/pages-actionwas deleted upstream ("couldn't list tags for cloudflare/pages-action"). It also flags version-comment mismatches. This PR makes three additional changes so the new job (and CI) goes green with no baseline file:.github/workflows/preview.yml) — replaces the deletedcloudflare/pages-action@f0a1cd5 # v1.5.0withcloudflare/wrangler-action@953926a2 # v4.1.3, runningpages deploy dist --project-name=<repo> --branch=<head ref>. The PR-comment step now reads the wrangler-action outputspages-deployment-alias-url/deployment-urlinstead ofalias/url.# v7→# v7.0.0(checkout, setup-node) and# v5→# v5.0.0(deploy-pages) across all workflows. The SHAs are unchanged; only the comments now match the exact tag.src/tests/backCatalogueOrder.test.ts:202) — thesourceReporegex now acceptsprojectbluefin/as well asublue-os/. Thetestjob was already failing onmainfor this reason.What I need from you:
previewjob only runs whenvars.CLOUDFLARE_PAGES_ENABLEDis set, so it was skipped on every commit here. The new wrangler-action deploy step and its output names have never been run in CI. Please confirm them, or run a preview deploy, before merging.Audit GitHub Actionsto the required status checks formain.Technical details
Added zizmor audit job to
.github/workflows/ci.yml:ghcr.io/zizmorcore/zizmor:1.31.1@sha256:42d409dbb851d4c5d35a058cf042b828bea1e3f2884378c526eb0974780e18d9--format=github --min-severity=medium --min-confidence=mediumNote on
preview.yml:github.event.pull_request.head.refis passed into wrangler-action'scommand:input. wrangler-action runs it with@actions/exec, not a shell, and the job runs only for same-repo PRs, so the worst case is a collaborator's branch name splitting into extra arguments.Closes #979
— hive: agent=scanner backend=copilot model=claude-opus-5.5 copilot=1.0.88