Repository navigation
feat(runner-policy): register the ci-workflows v0.65.13 intake-triage and pr-review-cli contracts - #882
Conversation
… and pr-review-cli contracts Both entries copy v0.65.12 forward unchanged: v0.65.13 fixes the pr-review-cli status job's read of the counted token leg's job result (ci-workflows#892), with no input, secret, permission or routing change. The v0.65.12 and earlier pins stay. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-security-review reviewed Security review: PR #882 at 064d2efNo security findings. critical-findings: 0 What changed. The PR registers the ci-workflows v0.65.13 pin What I checked.
Not verified. I could not confirm that the pinned SHA manifest fields: not applicable (no plugin manifests in this diff). |
|
claude-review reviewed No findings on #882 at 064d2ef. I read the whole diff (policy.json, README.md and runner-policy.test.mjs) and the PR context.
|
) No related issue: owner-authorized hardening of runner-policy auto-approval against imposter commits. ## Summary Auto-approval copies a reviewed contract forward onto any full SHA whose security surface matches a reviewed basis. It never checked that the SHA is a real ci-workflows release. GitHub resolves a SHA from anywhere in a repository's fork network, so a fork-only or unreleased commit with a matching surface and malicious steps would be approved. The hosted-only `pr-review-cli` contract forwards the `REVIEWS_*` OAuth tokens and API keys. Background: [Chainguard, imposter commits](https://www.chainguard.dev/unchained/what-the-fork-imposter-commits-in-github-actions-and-ci-cd) and [StepSecurity, triaging imposter commits](https://docs.stepsecurity.io/github-actions/harden-runner/runbooks/triaging-action-uses-imposter-commit). ## Fix - `runner-policy.mjs`: after every existing decline rule, a candidate is approved only when a tag of its source repository points at it and that tag's release is immutable, published and not a prerelease. It reads `GET /repos/{owner}/{repo}/git/matching-refs/tags/`, peels annotated tags through `git/tags/{sha}`, then reads `releases/tags/{tag}`, all through the existing fetch seam with `GITHUB_TOKEN` when set. A non-release commit declines with a diagnostic; any failed request declines (fail closed). A tag with no release (404) is skipped, not treated as a release. - Immutability is required, not just preferred: the releases API exposes `immutable`, and every recent ci-workflows release has it set. A future release published without immutability will be declined and needs a reviewed contract. - The tree request now shares a small `fetchGitHubJson` helper; its error text is unchanged. - Existing decline rules are unchanged, and the release check runs last, so their diagnostics do not change. - `README.md`: one paragraph on the release-commit requirement. ## Verification - `node --test components/runner-policy/runner-policy.test.mjs`: 365 of 365 pass (355 before, plus 10 new cases): a lightweight release-tag commit is approved; an annotated tag is peeled and approved; an annotated tag peeling to another commit, a non-release SHA with an identical surface, a tag without a release, and draft, prerelease and non-immutable releases are declined; a 500 from the tag list or the release lookup is declined. - The shared test mocks now serve each test's source SHAs as release commits, so the existing approval tests keep exercising approval. - Mutants killed: always-true release check, dropping the `immutable` condition, skipping the peel, and treating a 404 release as approved each fail at least one test. - `node --test components/claude-lanes/repin-policy-lockstep.test.mjs`: 23 of 23 pass. - `npm run lint:runner-policy`: passes. Biome check and markdownlint: clean. - Live check of the API shapes: `releases/tags/v0.65.13` returns `draft: false, prerelease: false, immutable: true`, a missing tag returns 404, and `matching-refs/tags/` returns all 109 ci-workflows tags in one response. ## Related - [#882](#882) registered v0.65.13 (`ba7af78`), the SHA a local probe showed being auto-approved with no token before it was registered. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01DpzEJAE4EMndcWQXiKSZYn --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
… contract (#885) No related issue: registers the reviewed contract for the ci-workflows v0.65.14 release. ## Summary This PR registers the [ci-workflows v0.65.14](https://github.com/melodic-software/ci-workflows/releases/tag/v0.65.14) `pr-review-cli.yml` contract at `3180217076b19bbdfccc43026c7f91c604da673d`, so callers can pin to that release. The release reports a failed "Isolate the runner" install as `install-failed` ([ci-workflows#893](melodic-software/ci-workflows#893)). ## Fix - `policy.json`: the v0.65.14 `pr-review-cli.yml` entry copies its v0.65.13 entry forward. The v0.65.13 and earlier pins stay. - `README.md`: one sentence about the v0.65.14 contract. - `runner-policy.test.mjs`: a test that the v0.65.14 entry equals the v0.65.13 entry and that exactly one contract sits at the new sha. ## Verification - `node --test components/runner-policy/runner-policy.test.mjs components/claude-lanes/repin-policy-lockstep.test.mjs` passes 389 of 389. - Between v0.65.13 and v0.65.14, `pr-review-cli.yml` changes only the `failure-class` job output expression (three jobs) and adds a step `id: isolate`. A diff of the two files shows no change to `on.workflow_call` inputs, secrets or permissions. - Left out: `intake-triage.yml`, which this release does not register. ## Related - [ci-workflows#893](melodic-software/ci-workflows#893) is the fix this release ships. - [#882](#882) registered v0.65.13, and this PR follows the same shape. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
No related issue: registers the reviewed contracts for the ci-workflows v0.65.13 release.
Summary
This PR registers the ci-workflows v0.65.13
intake-triage.ymlandpr-review-cli.ymlcontracts atba7af78d291f10bd75651857a0db2357c23df0fe, so callers can pin to that release. The release fixes the pr-review-cli status job, which reportedno-outcomewhenever the counted token leg succeeded (ci-workflows#892).Fix
policy.json: both v0.65.13 entries copy their v0.65.12 entries forward, including theFALLBACK_CLAUDE_CODE_OAUTH_TOKENsecret that #881 added. The v0.65.12 and earlier pins stay.README.md: one line about the v0.65.13 contracts.runner-policy.test.mjs: a test that both v0.65.13 entries equal their v0.65.12 entries and that exactly two contracts sit at the new sha.Verification
node --test components/runner-policy/runner-policy.test.mjspasses 355 of 355.node --test components/claude-lanes/repin-policy-lockstep.test.mjspasses 23 of 23.pr-review-cli.ymlchanges only an internal step output name. It adds no input, secret or permission.Related
🤖 Generated with Claude Code