Agents: trust Copilot review identities - #4807
Conversation
WalkthroughPreflight now reports the selected trust-config source and canonicalizes bare bot participants through GitHub node IDs. Copilot bot names are added to the trusted allowlist, tests cover resolution and fail-closed cases, and drift metadata reflects the updated consumer files. ChangesPreflight trust handling
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
|
+ci-status |
CI StatusHead SHA: Only the required gate is active unless hosted CI is requested. |
|
+ci-run-hosted |
Hosted CI RequestedTriggered 9 workflow(s) for View progress in the Actions tab. |
Greptile SummaryUpdates the strict GitHub trust preflight to recognize Copilot’s User-shaped participant alias only after resolving the same node to an allowlisted canonical Bot identity.
Confidence Score: 5/5The PR appears safe to merge with no actionable correctness or security issues identified. The new exception requires independently allowlisted alias and canonical Bot identities, while missing IDs, failed or malformed lookups, human nodes, and canonical mismatches continue through the existing blocking path. Important Files Changed
Reviews (1): Last reviewed commit: "Trust Copilot reviews without weakening ..." | Re-trigger Greptile |
Review: Agents: trust Copilot review identitiesReviewed the diff ( Security design checks out:
Self-consistency verified locally:
Minor observations (non-blocking, pre-existing pattern, not introduced by this PR):
Test coverage for the new behavior (mismatch, lookup failure, missing id, cache sharing, blank trust entries) is thorough. Nice work. |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.agents/agent-workflow-drift.yml (1)
121-145: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winReconcile the agent-workflows PR references.
The count disposition cites PRs 198 and 270 as the retained overlays, while the
pr-security-preflightreason cites 201 and 270. One of the two is wrong; this ledger is the audit trail for why these files diverge from the pinned source, so the provenance should match.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.agents/agent-workflow-drift.yml around lines 121 - 145, Reconcile the pull-request references in the overlay ledger entries, especially the reason for skills/pr-batch/bin/pr-security-preflight, so the cited retained overlays match the count disposition’s PR 198 cancellation guardrail and PR 270 canonical bot resolution. Preserve the existing provenance detail and update only the inconsistent PR reference.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In @.agents/agent-workflow-drift.yml:
- Around line 121-145: Reconcile the pull-request references in the overlay
ledger entries, especially the reason for
skills/pr-batch/bin/pr-security-preflight, so the cited retained overlays match
the count disposition’s PR 198 cancellation guardrail and PR 270 canonical bot
resolution. Preserve the existing provenance detail and update only the
inconsistent PR reference.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 7cbbe5e9-26a5-427c-b882-cbce10dba52d
📒 Files selected for processing (4)
.agents/agent-workflow-drift.yml.agents/skills/pr-batch/bin/pr-security-preflight.agents/skills/pr-batch/bin/pr-security-preflight-test.rb.agents/trusted-github-actors.yml
|
head_sha: 5a01920
|
…t-policy * origin/main: (33 commits) Fix ci-required base ref for PR merge-ref checkouts (#4819) Honor response charset and reject non-2xx HTTP-served SSR bundles (#4817) [Pro] Redact RSC render-error metadata on the fetched (client-navigation) payload path (#4821) Forward-port the 17.0.1 changelog section to main (#4814) Handle selector metacharacters in renderComponent DOM IDs (#4808) [Pro] Prevent caching RSC renders with errors (#4804) Agents: trust Copilot review identities (#4807) Agents: bind fleet closeout to generated pack (#4805) Docs: ADR 0002 — Skills-in-package over MCP for agent-native DX (#4735) Scope GitHub release commands to the origin repository (#4803) Forward-port OSS npm license metadata fix (#4794) Add golden-output gate for the serverWebpackConfig generator template (#4790) Cover the rspack CSS SSR generator fixes and de-duplicate the loader path (#4788) Configure agent workflow repo policy (#4785) Forward-port gh include mixed framing from #4684 (#4784) Release: enforce one-change forward-port closeout (#4783) Forward-port multi-URL rolling-deploy seeding to main (#4782) Docs: clarify React 18 streaming without RSC (#4780) Docs: forward-port v17 upgrade and generator gate guidance (#4781) Record the final React on Rails 17.0.0 changelog (#4742) ... # Conflicts: # AGENTS.md # internal/contributor-info/release-train-runbook.md
…ential-broker * origin/main: (75 commits) Silence routine startup diagnostics for Rails commands (#4849) Docs: move agent coordination to the HTTP backend (#4764) Detect unnoticed changes across generated webpack/Rspack configs (#4839) Fix durable ShakaPerf release evidence reuse (#4833) Docs: add missing content — release notes, upgrade guide, config, API references (#4843) (#4844) Fix incorrect docs: helper names, defaults, requirements, runtime refs (#4836) Scroll-priority streaming: candidate architecture evaluation (#4835) (#4841) Fix generated server config lint cleanup (#4840) Document serialized release backport policy (#4592) Package version-matched agent skills and docs (#4809) Fix ci-required base ref for PR merge-ref checkouts (#4819) Honor response charset and reject non-2xx HTTP-served SSR bundles (#4817) [Pro] Redact RSC render-error metadata on the fetched (client-navigation) payload path (#4821) Forward-port the 17.0.1 changelog section to main (#4814) Handle selector metacharacters in renderComponent DOM IDs (#4808) [Pro] Prevent caching RSC renders with errors (#4804) Agents: trust Copilot review identities (#4807) Agents: bind fleet closeout to generated pack (#4805) Docs: ADR 0002 — Skills-in-package over MCP for agent-native DX (#4735) Scope GitHub release commands to the origin repository (#4803) ...
Why
React on Rails strict GitHub trust currently blocks Copilot review evidence because GitHub exposes the pull-request participant as a bare, User-shaped
Copilotalias while review records use the canonicalcopilot-pull-request-reviewer[bot]identity.This consumes the fail-closed canonical-node resolution merged in shakacode/agent-workflows#270 and explicitly allowlists both identities. A human account with a matching name still cannot inherit bot trust: both the configured alias and the canonical GraphQL
Botlogin must match.What changed
copilotandcopilot-pull-request-revieweras actionable trusted bots.Security evidence
Copilotparticipant and canonical Copilot review author.SECURITY_PREFLIGHT_OKand no acknowledgement.Validation
.agents/bin/validate --changed: PASS.7ef1dcad43980ac6fcb9008ddc3bc27e643b1f51exactly.Changelog: release-process/internal workflow policy; no product changelog entry.
Summary by CodeRabbit
New Features
Bug Fixes
Tests