ci(security): harden security workflow — clear zizmor alerts #10 & #11#32
ci(security): harden security workflow — clear zizmor alerts #10 & #11#32WomB0ComB0 wants to merge 2 commits into
Conversation
Resolves both open code-scanning alerts on .github/workflows/security.yml (zizmor 1.24.1, verified locally with `zizmor --persona=auditor`): - #11 secrets-inherit (warning): replace `secrets: inherit` — which hands the reusable workflow ALL of this repo's secrets — with named forwarding of just SEMGREP_APP_TOKEN (the only enabled token-consuming scanner). Enabled by resq-software/.github#21, which declares the secret under workflow_call.secrets; re-pinned to that workflow's new SHA (b48036af, #21). - #10 unpinned-uses (error): already SHA-pinned in #30; carried forward. Also clears two latent findings the stale scan predates: - excessive-permissions: drop workflow-level `permissions` to `{}` and move contents/security-events/pull-requests scopes onto the `scan` job, so they apply only to the reusable call. - undocumented-permissions: every scope now carries an explanatory comment. `zizmor --no-online-audits` reports "No findings" on the result. NOTE: this does not by itself explain the separate scheduled-run startup_failure (which persisted after the #30 pin); switching off `secrets: inherit` is the leading remaining hypothesis and this PR tests it.
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
|
Warning Review limit reached
More reviews will be available in 57 minutes and 9 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughUpdates ChangesSecurity scan workflow hardening
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Root cause of the security-workflow startup_failure (every run since 2026-05-04, 0 jobs executed): the reusable security-scan.yml's CodeQL and zizmor jobs request `actions: read` (added in resq-software/.github#20, 2026-05-04 — exactly when the failures began). A reusable workflow's jobs cannot request a permission the caller did not grant; GitHub rejects the entire run at startup. The prior #30 SHA-pin and the secrets-inherit removal did not fix it because neither granted actions:read. Add it to the scan job's permissions.
Clears both open code-scanning alerts on
.github/workflows/security.yml(zizmor 1.24.1), verified locally withzizmor --persona=auditor --no-online-audits→ "No findings to report."Alerts addressed
secrets-inheritsecrets: inherit(forwards all repo secrets to the reusable workflow) with named forwarding of onlySEMGREP_APP_TOKEN— the one token-consuming scanner enabled here.unpinned-usesPlus two latent findings the stale 2026-04-15 scan predates:
excessive-permissions— workflow-levelpermissionsdropped to{};contents/security-events/pull-requestsmoved onto thescanjob so they apply only to the reusable call.undocumented-permissions— every scope now has an explanatory comment.Dependency
Requires resq-software/.github#21 (merged ✅), which declares
SEMGREP_APP_TOKENunderworkflow_call.secretsin the reusable workflow. This PR re-pins to that workflow's new SHAb48036af(#21).Test plan
securityworkflow run actually starts (0-jobstartup_failureis the open question). Droppingsecrets: inheritis the leading remaining hypothesis for that failure — this PR tests it.securityscan completes.Honest caveat
The earlier #30 SHA-pin did not fix the scheduled
startup_failure(it persisted on the merged commit). The true startup error is only visible in the Actions web UI, not the API. This PR is the next most-likely fix; if the workflow still startup-fails after merge, the cause is elsewhere (org ruleset / repo Actions setting) and needs a look at the run page.Summary by CodeRabbit