Skip to content

Scope zizmor ignores for audited bot triggers and gradle-command action - #41693

Open
derrickaw wants to merge 1 commit into
masterfrom
codescan/gha-zizmor-audited-ignores
Open

derrickaw wants to merge 1 commit into
masterfrom
codescan/gha-zizmor-audited-ignores

Conversation

@derrickaw

@derrickaw derrickaw commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Note: this PR was auto-generated by tooling. Before moving it out of draft, the author has done a full review of the PR, specifically evaluating it on the following criteria:

  • The PR remediates confirmed, live Code Scanning finding(s) (CodeQL / zizmor) on master without altering intended public API or workflow semantics
  • The fix is minimal, idiomatic, and avoids masking underlying defects (false positives and noisy rules are dismissed or scoped via config rather than code churn)
  • Relevant unit tests, linters, Gemini review feedback, and live workflow_dispatch runs (for workflow/action changes) have been verified

Initiative Progress (as of 2026-11-26 01:08 UTC): 19 PRs merged so far, with ~10 more PRs needed to be merged to close out all actionable Code Scanning findings (with #41637 disabling Note-level zizmor/self-repository warnings).

Code Scanning Remediation Context (End Goal, Scope & Impact)

If you have concerns with the PR or with the underlying methodology used to generate this, please comment below - they will be addressed by the author not the tooling :)

Summary

Resolves the remaining 10 High-severity zizmor Code Scanning findings across audited CI bot workflows and gradle-command-self-hosted-action while keeping both rules enforced repository-wide:

  • .github/zizmor.yml (zizmor/dangerous-triggers — #3498, #3499, #3500, #3502, #3503, #3508, #3512): Adds path-scoped ignore: entries for the 5 audited PR/issue bot and CI housekeeping workflows (cancel.yml, gemini_code_review.yml, label_prs.yml, pr-bot-pr-updates.yml, self-assign.yml). All 5 require pull_request_target, workflow_run, or issue_comment to operate on fork PRs/issues, and none check out or execute untrusted PR code.
  • .github/actions/gradle-command-self-hosted-action/action.yml (zizmor/template-injection — #130, #131, #132): Adds an inline # zizmor: ignore[template-injection] annotation on the Run Gradle Command step (zizmor.yml does not yet support subpath ignores for composite action.yml files per zizmor#1086). Across all 516 workflow call sites, callers pass shell-quoted multi-word flags, \ line continuations, and $VAR environment references solely from trusted repository configs (matrix.*, static env.*, step outputs, and committer workflow_dispatch inputs) rather than untrusted PR metadata.

Verification

@derrickaw

Copy link
Copy Markdown
Collaborator Author

/gemini review

@github-actions github-actions Bot added the size/s S: 10-49 lines changed label Nov 26, 2026

@github-actions github-actions Bot 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.

📋 Review Summary

This PR cleanly resolves the remaining 10 High-severity zizmor Code Scanning alerts by scoping dangerous-triggers ignores in .github/zizmor.yml to five audited bot/housekeeping workflows and adding an inline template-injection ignore to gradle-command-self-hosted-action/action.yml.

🔍 General Feedback

  • All five workflows added to dangerous-triggers.ignore (cancel.yml, gemini_code_review.yml, label_prs.yml, pr-bot-pr-updates.yml, and self-assign.yml) legitimately require pull_request_target, workflow_run, or issue_comment triggers to operate on fork PRs/issues and do not check out or execute untrusted PR refs.
  • Using an inline # zizmor: ignore[template-injection] annotation on the Run Gradle Command step in .github/actions/gradle-command-self-hosted-action/action.yml is appropriate given that callers pass shell-evaluated flags/variables from trusted workflow configs and zizmor.yml does not support subpath ignores for composite actions (zizmor#1086).

💡 Tip: Comment /gemini review on this pull request to trigger a new Gemini code review.

@derrickaw derrickaw added ready-for-human Draft PR with all checks passing and all review comments resolved, ready for human review and removed ready-for-human Draft PR with all checks passing and all review comments resolved, ready for human review labels Nov 26, 2026
@derrickaw
derrickaw marked this pull request as ready for review November 26, 2026 02:44
@github-actions

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @jrmccluskey added as fallback since no labels match configuration
Backup reviewer: shunping (if the main reviewer is unresponsive, you can escalate to them by tagging their username)

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant