fix(ci): trust generated Agentic CI PRs#643
Conversation
Signed-off-by: Andre Manoel <amanoel@nvidia.com>
Signed-off-by: Andre Manoel <amanoel@nvidia.com>
Signed-off-by: Andre Manoel <amanoel@nvidia.com>
Review: PR #643 — fix(ci): trust generated Agentic CI PRsSummaryThis PR adds a maintainer-gated The mechanism is:
FindingsSecurity design — good
Required-check name spoofing is intentional but worth flagging
The mechanism is sound given the trust predicate is sound, but it Trust-predicate duplicationThe 6-line trust predicate
If the marker format ever changes, or the branch convention shifts, Semantic-title regex drift risk
The real Concurrency on
|
Greptile SummaryThis PR introduces a maintainer-gated
|
| Filename | Overview |
|---|---|
| .github/workflows/authorize-agentic-ci.yml | New workflow implementing the /authorize-agentic-ci slash command; validates commenter permission, trust predicate, timeline ordering, and .github file guard before dispatching CI and authorization checks. |
| .github/workflows/agentic-ci-authorized-checks.yml | New workflow that re-validates trust and SHA pinning on dispatch, then emits the three required check runs (DCOAssistant, semantic-pull-request, linked-issue) for trusted Agentic CI PRs. |
| .github/workflows/ci.yml | Adds validate-dispatch job that gates all downstream jobs when dispatched with an expected SHA, ensuring the workflow cannot run on a different commit than the maintainer authorized. |
| .github/workflows/dco-assistant.yml | Adds a pre-check step that evaluates the Agentic CI trust predicate; the DCO Assistant action is skipped entirely for trusted bot-authored PRs. |
| .github/workflows/pr-linked-issue.yml | Adds an early-exit path in the collaborator check step that treats trusted Agentic CI PRs as collaborator-authored, bypassing the linked-issue requirement. |
Reviews (4): Last reviewed commit: "Merge branch 'main' into andreatgretel/f..." | Re-trigger Greptile
Summary
Generated Agentic CI PRs currently use
GITHUB_TOKEN, so GitHub suppresses follow-onpull_requestworkflow runs for those bot-created updates. This PR keeps that token model and adds a maintainer-authorized/authorize-agentic-cipath to launch the required checks safely.Findings
github-actions[bot]withGITHUB_TOKENdo not automatically trigger normal PR checks.agentic-ci[bot]commit metadata.Changes
Added
authorize-agentic-ci.ymladds/authorize-agentic-ci, limited to commenters withwrite,maintain, oradminpermission.agentic-ci-authorized-checks.ymlemits the required authorization-side checks for DCO, semantic title, and linked issue policy on the authorized PR head SHA.ci.ymlaccepts an optionalexpected_head_shaworkflow dispatch input and fails dispatched CI if GitHub runs a different SHA.Changed
dco-assistant.ymlskips DCO Assistant only for trusted generated Agentic CI PRs.pr-linked-issue.ymltreats trusted generated Agentic CI PRs like collaborator-authored PRs for the linked issue check.Fixed
github-actions[bot]can now get required checks without switching Agentic CI to a PAT, GitHub App token, or machine-user token.github-actions[bot], same-repo head branch,agentic-ci/*branch name, and the generated Agentic CI body marker.agentic-ciuser account is not trusted, avoiding reliance on an identity that could be confused with spoofable commit author metadata..github/, if the PR head changes after the maintainer's/authorize-agentic-cicomment, or if the dispatched workflow runs a different SHA.Attention Areas
authorize-agentic-ci.yml- Security boundary for who can authorize generated PR checks and what metadata makes a PR trusted.agentic-ci-authorized-checks.yml- Required-check replacement contexts for generated PRs that cannot trigger normal checks automatically.ci.yml- SHA pinning guard for manually dispatched CI.Validation
git diff --check.venv/bin/ruff check --fix ..venv/bin/ruff format .Description updated with AI