ci(security-scan): declare workflow_call.secrets so callers can pass by name#21
Conversation
…by name The reusable security-scan workflow consumes SEMGREP_APP_TOKEN, SNYK_TOKEN and GITLEAKS_LICENSE in its jobs but did not declare them under workflow_call, forcing callers to use `secrets: inherit` -- which forwards ALL of the caller's secrets and trips zizmor's `secrets-inherit` audit (e.g. resq-software/programs alert #11). Declare them explicitly (all required: false, each gated by its enable-* input). Backward-compatible.
|
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 4 minutes and 7 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)
✨ 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 |
Summary
The reusable
security-scan.ymlconsumesSEMGREP_APP_TOKEN,SNYK_TOKEN, andGITLEAKS_LICENSEinside its jobs but does not declare them underworkflow_call. With no declaration, the only way a caller can supply them issecrets: inherit— which forwards all of the caller's secrets, not just the three this workflow needs. That trips zizmor'ssecrets-inheritaudit (e.g.resq-software/programscode-scanning alert #11).This PR declares the three secrets explicitly under
workflow_call.secrets, allrequired: false(each is already gated by its matchingenable-*input).Why it's safe
secrets: inheritkeep working unchanged.Follow-up (dependent change)
After this merges,
resq-software/programsPR #30 will be updated to pin the newsecurity-scan.ymlSHA and replacesecrets: inheritwith named forwarding ofSEMGREP_APP_TOKEN, clearing alert #11. PR #30 already clears alert #10 (unpinned-uses) independently.Test plan
SEMGREP_APP_TOKENby name resolves and semgrep still runs.