Skip to content

feat(pr-pipeline): run the security review on pr-review-cli with key-first funding - #9307

Merged
kyle-sexton merged 7 commits into
mainfrom
feat/security-review-on-pr-review-cli
Oct 23, 2026
Merged

kyle-sexton merged 7 commits into
mainfrom
feat/security-review-on-pr-review-cli

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Refs: melodic-software/claude-code-account-rotation#259

Summary

Moves the live security review lane onto ci-workflows pr-review-cli.yml v0.63.0 (8778094), lane security, funded by the reviews role: REVIEWS_CLAUDE_API_KEY first, REVIEWS_CLAUDE_CODE_OAUTH_TOKEN only after the key hands off (or when the repository variable REVIEWS_KEY_EXHAUSTED is true). No shadow and no parallel copy: the existing workflow path is re-pointed. The code review lane is unchanged and switches in a later PR.

Fix

  • .github/workflows/pr-review-security-hosted.yml: calls pr-review-cli.yml@8778094 with lane: security, publish: comments, the same model-args and allowed-bot-sender-ids, and the old docs-only-paths default passed explicitly (the new reusable's default never skips). Job id stays pr-review-security, so the check stays pr-review-security / security-review. Permissions are contents: read and pull-requests: write (no id-token). cancel-in-progress: false, since a cancelled run reads as red to the guardrails merge guard. The bare CLAUDE_CODE_OAUTH_TOKEN is no longer passed.
  • The review now posts as github-actions[bot], each comment ending in claude-lane: claude-security-review. In the same PR, the readers accept that author only on comments whose last non-blank line is a review lane's footer, and keep accepting claude[bot]:
    • address-feedback.mjs threadAuthors / keepThreads (also used by feedback-dispatch.mjs): such a comment is the reviewer's, and its review must be github-actions[bot]'s.
    • babysit_review_evidence.py: _lane_thread and _summary_comments accept the footer-gated author; a reviewed-head marker is never re-read as a summary comment; RECORD_RE accepts a trailing account=fallback.
  • .github/lane-funding.json: the security lane is run-claude-cli reading both reviews secrets; reviews is keyed; the reviews-security role is removed (one role backs both review lanes).
  • docs/conventions/pr-pipeline/README.md and changelog fragments for pr-pipeline and source-control.

Verification

  • scripts/check-affected.sh --tests: 13 passed, 1 skipped.
  • Selected Node suites (pr-unblock, resolve-config incl. callers.test.mjs, check-trusted-trigger, pr-merge, post-merge-demotion-alert): 1123 pass, 0 fail.
  • babysit-prs Python suites (unittest discover): 2493 tests OK, including new cases for both identities and account=fallback.
  • runner-policy: the standards analyzer with feat(runner-policy): register the ci-workflows v0.63.0 pr-review-cli contract standards#848 (merged) passes this caller; the policy synced here before that sync lands rejects it with runner-target-contract.
  • Live proof on this PR's head: the key-leg run and a forced-fallback run (REVIEWS_KEY_EXHAUSTED=true, then deleted); run links follow in a comment.

Related

🤖 Generated with Claude Code

…first funding

The security review lane calls ci-workflows pr-review-cli.yml (v0.63.0),
lane security: the reviews role's API key first, its subscription token
after a handoff. The check name, marker, notice and record format stay;
a newer push waits for a running review instead of cancelling it.

The review posts as github-actions[bot] with a claude-lane footer, so
address-feedback, the feedback dispatcher and the babysit merge gate
accept that author only on comments whose last non-blank line is the
footer, and babysit's record pattern accepts account=fallback. One
reviews role backs both review lanes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T04:28:46.327515Z edadc60 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 822de2cd90807e758c8e7f66357839c20d2b5876: 0 finding(s), 0 as inline comments.

Incremental security review of the changes since f282d47 (the changelog fragment, babysit_review_evidence.py and its test file). I found no security issues.

The change tightens the trust boundary. _summary_comments now skips any comment whose login is github-actions or github-actions[bot] unless the login is exactly github-actions[bot] and the type is Bot. A bare github-actions login, or a User account under either login, can no longer supply merge-gate evidence through a summary comment. The new test cases cover the bare login, User under the bare login, and User under the suffixed login. The other edit is a blank-line whitespace change in _lane_comment.

The claude[bot] path is untouched: it is not in ACTIONS_LOGINS, so the new check ignores it. The change fragment only describes the new rule. The PR context contained no embedded instructions.

No manifest files changed in this increment, so no manifest <field> lines apply.

critical-findings: 0

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 822de2cd90807e758c8e7f66357839c20d2b5876: 0 finding(s), 0 as inline comments.

Incremental review of 822de2c, covering the changes since f282d47. I found nothing to flag.

  • Gate in _summary_comments (babysit_review_evidence.py, around line 483): a github-actions or github-actions[bot] comment is now skipped unless the login is exactly github-actions[bot] and the type is Bot. Comments from Claude App logins are unaffected. github-actions is also a real GitHub user name, so excluding a bare login or a User type is correct.
  • Source of the comments: the reviewed-head marker reader, which already matches MARKER_AUTHOR exactly, takes its comments from the same place as the summary reader. I read this as REST data, which carries the suffixed login and the type. I did not trace the fetch itself.
  • Thread path: _lane_thread is untouched and still accepts the bare login, which fits GraphQL dropping the suffix.
  • Redundant type check: type != "Bot" adds nothing next to the exact login match, since a User account can't carry a [bot] login. It does no harm and the tests cover it.
  • Tests: the User and bare-login cases now sit beside the footer cases, with the right blocking counts. I did not run them. The sandbox required approval for the test command, so there is no independent verification here.
  • Changelog fragment: the added line matches the code change.
  • Hunk 1 of the .py diff: a blank line only.

@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.

claude-security-review: 1 inline finding(s) on edadc60b2cbbadee4b4426dda7b4930e3d214b69; the summary is in this lane's pull request comment.

claude-lane: claude-security-review

@kyle-sexton

Copy link
Copy Markdown
Member Author

Live proof on head edadc60b2cbbadee4b4426dda7b4930e3d214b69:

  • Key leg, run 39900401005 attempt 1: security-review-key ended class=auth on REVIEWS_CLAUDE_API_KEY api_error_status=401, handed off, and the subscription leg reviewed: credential=REVIEWS_CLAUDE_CODE_OAUTH_TOKEN fallback=auth. Marker and claude-lane-review-complete ... findings=0 inline=0 scope=whole account=fallback notice posted; every job green. The key itself did not review: the API refused it.
  • Forced fallback, run 39900401005 attempt 2, with REVIEWS_KEY_EXHAUSTED=true (now deleted): the key job skipped the model (CLAUDE_API_KEY is empty, or REVIEWS_KEY_EXHAUSTED is true), the subscription leg reviewed (credential=REVIEWS_CLAUDE_CODE_OAUTH_TOKEN fallback=no-key), posted one inline finding with its severity: line and footer, and every job ended green.

Held from merge: see the open items in the session report (the key is refused with 401, and the completion notice carries no annotation title).

@kyle-sexton kyle-sexton added the do-not-merge Hard merge gate: do not merge while applied. label Oct 23, 2026
kyle-sexton added a commit to melodic-software/standards that referenced this pull request Oct 23, 2026
…contract (#849)

Refs: melodic-software/claude-code-plugins#9307

## Summary

Registers `pr-review-cli.yml@83b739f625b501ad40c65dee7168d836883195e1`
(ci-workflows
[v0.63.1](https://github.com/melodic-software/ci-workflows/releases/tag/v0.63.1))
so claude-code-plugins#9307 can re-pin its security lane to it.

## Fix

v0.63.1 changes only the publish step
([ci-workflows#865](melodic-software/ci-workflows#865):
titled completion notice, demoted CRITICAL findings counted). The
contract copies the v0.63.0 entry forward verbatim: same routing, inputs
and secrets.

## Verification

- `node --test runner-policy.test.mjs` in `components/runner-policy`:
337 pass, including the new copy-forward test.

## Related

- Same shape as #848 (v0.63.0).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@kyle-sexton kyle-sexton removed the do-not-merge Hard merge gate: do not merge while applied. label Oct 23, 2026
Comment thread .github/workflows/pr-review-security-hosted.yml
kyle-sexton and others added 2 commits October 23, 2026 01:34
review-venue.sh matched the security lane only by pr-review-security.yml, so
after the caller moved to pr-review-cli.yml it read the lane as absent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@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.

claude-security-review: 1 inline finding(s) on f282d47be587d824f8005dfe98215983bfe79117; the summary is in this lane's pull request comment.

claude-lane: claude-security-review

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 23, 2026
Merged via the queue into main with commit 5f8c010 Oct 23, 2026
32 checks passed
@kyle-sexton
kyle-sexton deleted the feat/security-review-on-pr-review-cli branch October 23, 2026 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant