Skip to content

fix(runner-policy): admit actions: read on intake-triage.yml callers - #949

Merged
kyle-sexton merged 1 commit into
mainfrom
ci/intake-triage-actions-read
Nov 5, 2026
Merged

kyle-sexton merged 1 commit into
mainfrom
ci/intake-triage-actions-read

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

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

Summary

This adds actions: read to the reviewed allowedCallerPermissions of the intake-triage.yml contract in components/runner-policy/policy.json. After the change, a caller job that grants actions: read passes runner-policy.

Fix

  • melodic-software/ci-workflows#996 adds the check-key-credit gate to intake-triage.yml; pr-review-cli.yml already has it. The gate lists the repository's credit-stop markers with actions: read. A called workflow holds only the permissions its caller job grants, so every caller job must grant actions: read.
  • Until this contract lists that permission, runner-policy rejects the claude-code-plugins caller: "reusable workflow caller permissions has unapproved properties". That rejection is the lint-repo failure on melodic-software/claude-code-plugins#13608.
  • actions: read adds no write access and no token beyond the job's own GITHUB_TOKEN.
  • Callers float on @main, so approvedShas stays as it is.

Verification

  • node --test components/runner-policy/runner-policy.test.mjs: 226 tests, 226 pass.

Related

Merge order:

  1. This PR, then sync it to the callers.
  2. The claude-code-plugins caller grants actions: read. That change was taken out of #13608 until this PR syncs, and goes back in afterwards.
  3. ci-workflows#996, held with do-not-merge until step 2 lands.

🤖 Generated with Claude Code

melodic-software/ci-workflows#996 adds the check-key-credit gate to
intake-triage.yml, as pr-review-cli.yml already runs it. The gate lists
the repository's credit-stop markers with actions: read, and a called
workflow holds only what its caller grants, so each caller job must
grant it. This adds actions: read to the reviewed allowedCallerPermissions
of the intake-triage.yml contract, so a caller that grants it clears
runner-policy. Callers float @main, so approvedShas does not change.

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

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 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-11-05T22:07:11.651022Z d0f1ce4 Draft marked ready
ℹ️ 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 Nov 5, 2026

Copy link
Copy Markdown

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

Security review: PR #949 (HEAD d0f1ce4)

Result: no findings. critical-findings: 0

Scope. The PR is a single added line in components/runner-policy/policy.json. It adds "actions": "read" to allowedCallerPermissions for the intake-triage.yml reusable-workflow contract (L46).

Trust-control check. Admitting a new caller token scope counts as a possible widening of what a token may do, so I read how the field is enforced.

  • runner-policy.mjs (about lines 991–1000) compares each caller's effective permissions to this map with exactCanonicalMap. The map is an exact match, not a ceiling.
  • Callers must now declare exactly actions: read, contents: read and issues: write. A caller without actions: read fails runner-policy until it is updated.
  • The change therefore adds a read-only scope that callers must declare. It admits no write scope, secret, new actor, or new reusable workflow.
  • allowedSecrets, approvedShas, fixedRunsOn, role and allowedInputs are unchanged.
  • The actions: read scope only lets the called workflow list the repository's own workflow runs, which is what the credit-stop marker gate described in the commit message needs. It does not reach other repositories, secrets, or any write path.
  • A write permission is still present in the map (issues: write), so the load-time rule that requires one remains satisfied.

Not verified. Whether the Claude step in intake-triage.yml can use the caller's GITHUB_TOKEN is outside this PR. I could not check it, and a prompt-injection path through untrusted issue text to that token is not shown by this diff. Even if it were reachable, the scope is read-only on the repository's own Actions metadata. I rated that below the severity bar and did not report it.

Instruction-surface deletions: none. Plugin manifests: none touched. Trusted paths: none matched.

Embedded text: none in the diff. I did not read a PR context file because none was supplied.

Owner threat-model note. This change removes or weakens no merge hold.

Comment thread components/runner-policy/policy.json Resolved
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

claude-review reviewed d0f1ce416f02a6fbfdb036bc3d2eca63a8ff0c4f: 1 finding(s), 1 as inline comments.

Reviewed the one-line change to components/runner-policy/policy.json, which adds actions: read to the intake-triage.yml allowedCallerPermissions. I posted one inline finding and no hold.

Finding (advisory, on line 46): allowedCallerPermissions is checked as an exact map by exactCanonicalMap (runner-policy.mjs:865, called at L991). Once this syncs, every existing intake-triage.yml caller that lacks actions: read fails runner-policy until it adds the grant. The PR body only says a caller that grants actions: read passes. It does not say others will fail or confirm that claude-code-plugins is the only caller. No test in the repository covers the new entry. I read the code to confirm the exact-match behavior. I did not run the tests, and the 226-pass claim is author-claimed and unverified.

Other checks:

  • The PR body follows the contract: Refs: line, then the Summary, Fix, Verification and Related sections.
  • No REVIEW.md or paved-path rows were applicable. No settled-threads or prior-findings files were supplied.
  • There is no closing issue (Refs: only), so no acceptance criteria were checked.
  • The only path-scoped rule file, .claude/rules/pr-body-contract.md, is about PR bodies, so it does not apply to the changed file.
  • Security was left to the security lane.

@kyle-sexton
kyle-sexton merged commit b69ce17 into main Nov 5, 2026
24 checks passed
@kyle-sexton
kyle-sexton deleted the ci/intake-triage-actions-read branch November 5, 2026 23:19
kyle-sexton added a commit to melodic-software/claude-code-plugins that referenced this pull request Nov 6, 2026
The synced runner-policy contract (melodic-software/standards#949)
requires the intake-triage.yml caller to grant actions: read, so the
reusable's check-key-credit gate can list this repository's
credit-stop markers. The grant lands in this sync PR so the contract
and the caller merge together.

Refs: #13586

Co-Authored-By: Claude Opus 5.5 <[email protected]>
kyle-sexton added a commit that referenced this pull request Nov 6, 2026
…r a migration (#950)

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

## Summary

The runner-policy contract matches a caller's permissions against
`allowedCallerPermissions` exactly. standards#949 added `actions: read`
to the intake-triage contract, so every caller must now grant it. The
claude-code-plugins caller cannot add it before the sync, because the
old synced contract rejects it, and the sync PR cannot be hand-edited
(check-managed-files). Under a required `ci-status` that is a deadlock.

This PR lets a contract list several exact maps, so a permission change
lands expand/contract:

1. This PR: accept a list of exact maps, and list the old and new
intake-triage maps.
2. The sync PR, plus the caller PR that grants `actions: read`.
3. A follow-up that drops the old intake-triage map.
4. melodic-software/ci-workflows#996.

## Fix

- `runner-policy.mjs`: `allowedCallerPermissions` is one exact map or a
non-empty list of exact maps. A caller passes when its effective
permissions equal any one listed map exactly; each map is still matched
exactly, so the ceiling stays exact. With more than one map, the failure
names every allowed map (`must be exactly one of {...}, {...}`). The
single-map form keeps its existing per-scope wording. The config checks
(at least one write scope, satisfies `minimumCallerPermissions`) run per
map and name the failing index.
- `policy.schema.json`: `allowedCallerPermissions` is `oneOf` a
permission map or a `minItems: 1`, `uniqueItems` array of permission
maps.
- `policy.json`: intake-triage lists `{contents: read, issues: write}`
and `{actions: read, contents: read, issues: write}`. No other contract
changes.
- `README.md`: "Contract revision lockstep" item 3 describes the
expand/contract order for a caller permission change; the contract
description admits the list form.

## Verification

- `npm run test:runner-policy`: 232 pass, 0 fail. New cases: a caller
matching the first map passes; matching the second passes; matching
neither fails with a message listing both; a superset, subset or access
drift of either map fails; the single-map form passes on an exact match
and keeps its old messages; the schema rejects an empty list; every
listed map must carry a write scope.
- A mutant that checks only the first listed map fails the "matching
either map passes" case.
- `npm run lint:runner-policy`: passed.
- biome 2.6.3 `ci` on `components/runner-policy`: clean. markdownlint on
the README: clean.

## Related

- #949
- melodic-software/claude-code-plugins#13630
- melodic-software/ci-workflows#996

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

Co-authored-by: Claude Opus 5.5 <[email protected]>
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