Skip to content

feat(runner-policy): register the ci-workflows v0.63.0 pr-review-cli contract - #847

Closed
kyle-sexton wants to merge 2 commits into
mainfrom
feat/runner-policy-pr-review-cli-v0.63.0
Closed

kyle-sexton wants to merge 2 commits into
mainfrom
feat/runner-policy-pr-review-cli-v0.63.0

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

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

Summary

Registers a contract for ci-workflows v0.63.0
(8778094736e414233110f3e0d6d9948628ba77b5) pr-review-cli.yml, the review lane on the
run-claude-cli launcher added in ci-workflows#862.
claude-code-plugins needs it for its summary-mode shadow caller,
claude-code-plugins#9292, whose
runner-policy check fails today with "the reusable workflow path@SHA has no reviewed runner-input contract".

Fix

  • components/runner-policy/policy.json: a new hosted-only entry. It has no runner input, and every
    job in the called workflow runs on ubuntu-24.04. It admits the inputs lane, publish, role,
    model-args, allowed-bot-sender-ids, allowed-author-ids, docs-only-paths, incremental-review and
    cli-version. Its only secret is CLAUDE_API_KEY: ${{ secrets.REVIEWS_CLAUDE_API_KEY }}, so a caller that
    also passes the subscription token is refused and needs a contract of its own (the cutover callers will).
    The hosted-only schema carries no role or allowedCallerPermissions.
  • components/runner-policy/README.md: the v0.63.0 rollout line, sign-off pending.
  • components/runner-policy/runner-policy.test.mjs: a test pinning the entry and that it is the only key at
    that SHA.

Review basis

Git blob and tree SHAs at 8778094:

Path SHA
workflows/pr-review-cli.yml 2ab9e8a1
actions/apply-claude-managed-settings 1301e911
actions/check-author-trust 3517c76f
actions/publish-review fbbb895e
actions/report-lane-outcome a0bd0a47
actions/run-claude-cli 901de6cb

Third-party actions are pinned by full SHA: actions/checkout@3d3c42e5, actions/github-script@3a2844b7,
actions/upload-artifact@cf430e03. The model jobs hold contents: read and pull-requests: read; only the
status job, which runs no model, holds pull-requests: write.

Verification

  • npm run test:runner-policy: 336 pass.
  • npm run lint:runner-policy: passed.
  • The same entry, applied to claude-code-plugins' synced copy and run against #9292's workflows:
    Runner policy passed.

Related

🤖 Generated with Claude Code

…contract

pr-review-cli.yml (ci-workflows#862) runs every job on ubuntu-24.04 and
has no runner input, so its contract is hosted-only. It admits the
inputs claude-code-plugins' summary-mode shadow caller passes and only
the reviews role's API key; a caller that passes the subscription token
needs a contract of its own.

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-23T03:31:07.907583Z ddf6768 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

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

Security review: incremental (ddf6768 → 7a23fbd)

Scope: components/runner-policy/runner-policy.test.mjs, one line in the pr-review-cli v0.63.0 contract test.

Change: the expected allowedSecrets.CLAUDE_API_KEY value moves from the plain string "${{ secrets.REVIEWS_CLAUDE_API_KEY }}" to the template literal `\${{ secrets.REVIEWS_CLAUDE_API_KEY }}`. In a template literal, \$ evaluates to a literal $, so both forms are the same string: ${{ secrets.REVIEWS_CLAUDE_API_KEY }}. I worked this out by reading the code and did not run it, because the sandbox did not approve the Node check. The assertion therefore checks exactly what it checked before. The change only affects how the line reads, probably to avoid tooling that flags a ${{ }} string in a JS file.

Findings: no security issues.

  • The edit is a test file only. It touches no workflow, permission, trigger, or pin, and no secret is read or exposed.
  • The secret name is a reference to a GitHub secret, not a value.
  • The test asserts the same contract on the secret mapping, so its strictness is unchanged.
  • No instruction surface or plugin manifest is touched, so there are no manifest <field> lines.

critical-findings: 0

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

claude-review reviewed 7a23fbd18d8bb3a14b104f1b8e22388d25251597: 0 finding(s), 0 as inline comments.

No findings. The incremental change (7a23fbd) touches one line, components/runner-policy/runner-policy.test.mjs:9872. It rewrites "${{ secrets.REVIEWS_CLAUDE_API_KEY }}" as the template literal `\${{ secrets.REVIEWS_CLAUDE_API_KEY }}`. The \$ escape yields the same literal ${{ ... }} string, so the assertion's expected value is unchanged. The new form matches the existing precedent at line 3816 of the same file. I did not run the test suite: the sandbox required approval for node --test, which was not granted. The behaviour claim rests on JavaScript escape semantics and the matching line, not on a run. The PR's "336 pass" is author-claimed and I did not verify it.

…i contract test

Biome's noTemplateCurlyInString warned on the plain string; use the
escaped template literal the rest of the file uses.

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

Copy link
Copy Markdown
Member Author

Superseded: the owner dropped the review shadow (Q39, 2026-10-23). The cutover needs a contract that also admits the reviews subscription token; that lands in a new PR.

@kyle-sexton
kyle-sexton deleted the feat/runner-policy-pr-review-cli-v0.63.0 branch October 23, 2026 03:43
kyle-sexton added a commit that referenced this pull request Oct 23, 2026
…contract (#848)

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

## Summary

Registers the runner-policy contract for ci-workflows v0.63.0
`pr-review-cli.yml` (`8778094736e414233110f3e0d6d9948628ba77b5`), so
claude-code-plugins can move its live security review lane onto it.

## Fix

- `policy.json`: a hosted-only contract, `fixedRunsOn:
["ubuntu-24.04"]`, the inputs `lane`, `publish`, `role`, `model-args`,
`allowed-bot-sender-ids`, `allowed-author-ids`, `docs-only-paths`,
`incremental-review` and `cli-version`, and both reviews-role secrets:
`CLAUDE_API_KEY` from `REVIEWS_CLAUDE_API_KEY` (tried first) and
`CLAUDE_CODE_OAUTH_TOKEN` from `REVIEWS_CLAUDE_CODE_OAUTH_TOKEN` (after
a key handoff).
- `README.md`: the v0.63.0 entry.
- `runner-policy.test.mjs`: pins the contract; the secret expressions
are escaped template literals.

Supersedes the key-only #847.

## Verification

- `node --test components/runner-policy/runner-policy.test.mjs`: 336
pass, 0 fail.
- `node components/runner-policy/runner-policy.mjs --root .`: passed.
- This branch's analyzer run against the claude-code-plugins security
caller that moves to `pr-review-cli.yml@8778094` with both secrets:
passed; the currently synced policy rejects the same caller with
`runner-target-contract`.
- biome and markdownlint clean on the changed files.

## Related

- melodic-software/ci-workflows#862
- #842 (precedent), #847 (closed, key-only)

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

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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