Skip to content

ci(runner-policy): approve claude-security-review pin 99cb082 with paths input - #229

Merged
kyle-sexton merged 1 commit into
mainfrom
ci/security-review-always-report-pin
Jul 21, 2026
Merged

kyle-sexton merged 1 commit into
mainfrom
ci/security-review-always-report-pin

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Jul 21, 2026 •

Copy link
Copy Markdown
Member

What

Add the reviewed runner-input contract for melodic-software/ci-workflows/.github/workflows/claude-security-review.yml@99cb082ebb942b9da08e8345a851be5bf252ad79 (the ci-workflows#189 squash-merge SHA): allowedInputs gains paths; routing (runner-input), secret mapping (CLAUDE_CODE_OAUTH_TOKEN), and allowedCallerPermissions are identical to the reviewed 0a5fd4c entry, which stays until the last caller re-pins and can then be retired.

Why

The runner-policy gate correctly declined auto-approval on claude-code-plugins#825 ("inputs changed since the previously reviewed ...@0a5fd4c"): the new pin's input surface grew by paths — the always-report shape's relevance-scope input (job-level gate inside the reusable workflow; a not-applicable PR yields a name-stable skipped check a required-check ruleset reads as success). This is the reviewed-contract update that gate exists to force. Context: claude-code-plugins ADR 0002 addenda (#509 enforcement ruling + ordering correction), ladder-climb roadmap Phase II.

Verification

  • npm run lint:runner-policy — Runner policy passed.
  • npm run test:runner-policy — 227 pass / 0 fail (one EBUSY temp-dir teardown flake on first Windows run, clean on rerun).
  • check-jsonschema --schemafile components/runner-policy/policy.schema.json components/runner-policy/policy.json — ok.

No linked issue (reviewed-contract update; the enforcement-rail issue lives in claude-code-plugins).

Related

🤖 Generated with Claude Code

…ths input

ci-workflows#189 reshaped the reusable claude-security-review workflow to the
always-report shape, adding an optional `paths` input (job-level relevance
gate; ADR 0002 addendum in claude-code-plugins, #509 enforcement ruling).
Add the reviewed runner-input contract for the new pin — allowedInputs gains
`paths`; routing, secret mapping, and caller permissions unchanged. The
0a5fd4c entry stays until the last caller re-pins (claude-code-plugins#825),
then can be retired.

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

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@claude

claude Bot commented Jul 21, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 1m 17s —— View job


Code Review

  • Gather context
  • Read changed file and related schema/policy files
  • Read REVIEW.md for repo-specific review criteria
  • Analyze the change for correctness and completeness
  • Post review findings

Summary

The diff adds a single new entry to approvedReusableWorkflowContracts in components/runner-policy/policy.json for claude-security-review.yml@99cb082ebb942b9da08e8345a851be5bf252ad79. It is a faithful derivative of the existing @0a5fd4c entry, with paths appended to allowedInputs and all other fields unchanged. The change is structurally correct and passes all stated mechanical validation (lint, tests, check-jsonschema).

No blocking findings.


Security checks (REVIEW.md)

Check Result
No literal secret/credential in tracked source ✅ CLAUDE_CODE_OAUTH_TOKEN remains an expression reference, not a literal
Injection risk via paths input ✅ Low — paths is a scope-narrowing filter inside the reusable workflow; it is not passed to a shell invocation in this file
allowedCallerPermissions unchanged ✅ contents: read, pull-requests: write, id-token: write — identical to the reviewed @0a5fd4c predecessor
Policy gate enforcement ✅ This PR is exactly the gate working as designed — the blocked caller (#825) triggered a required human-reviewed update

Observations

paths input characterization. The PR body correctly describes paths as "job-level gate inside the reusable workflow; a not-applicable PR yields a name-stable skipped check." This means the input narrows scope (which jobs run), not privilege. It does not expand the secret surface or permissions granted to callers. No concern here, but worth stating explicitly for future auditors of this entry.

Predecessor retention is correct. Keeping @0a5fd4c until callers re-pin is the right model — removing it prematurely would break any caller still on the old SHA. The PR description acknowledges it can be retired once the last caller migrates.

Input ordering. ["runner", "skip-actors", "paths"] — paths is appended consistently with how the base set ["runner", "skip-actors"] was established. No schema-enforced ordering, so this is fine.


No nits beyond the above. The change is minimal, correct, and follows the established pattern for policy contract updates.

@kyle-sexton
kyle-sexton merged commit ca34bb2 into main Jul 21, 2026
1 check passed
@kyle-sexton
kyle-sexton deleted the ci/security-review-always-report-pin branch July 21, 2026 09:19
kyle-sexton added a commit to melodic-software/claude-code-plugins that referenced this pull request Jul 21, 2026
## What

Append the Phase II status line to the roadmap PLAN scope-change note:
steps 1–2 landed (ci-workflows#189, standards#229 + sync #827, #825).

## Why

This PR is ALSO the plan's step-1 sanity check: it is docs-only (matches
none of the caller's 26 security-sensitive patterns), so it must show
`security-review / changes` = pass and `security-review /
security-review` = skipped (name-stable not-applicable verdict — not
Pending, not absent). That observed result gets cited at the step-3 user
gate before the ruleset PR opens.

No linked issue (status note; #509 completes at step 3).

## Related

- #509 — enforcement rail
- #825, melodic-software/ci-workflows#189,
melodic-software/standards#229

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

Co-authored-by: Claude Fable 5 <[email protected]>
kyle-sexton added a commit that referenced this pull request Jul 21, 2026
…4c (#234)

## What

Remove the reviewed runner-input contract for
`claude-security-review.yml@0a5fd4c` — superseded by the `99cb082` entry
(#229). The sole caller re-pinned in claude-code-plugins#825 (merged);
`pull_request` runs evaluate the caller from the merge ref, so no open
PR resolves the old pin.

## Verification

`npm run lint:runner-policy` passed; `npm run test:runner-policy` —
first run hit the known Windows EBUSY temp-dir teardown flake (1 fail),
three consecutive reruns 227 pass / 0 fail; Linux CI is authoritative.

No linked issue.

## Related

- #229 (added the 99cb082 entry; recorded this retirement as follow-up)
- melodic-software/claude-code-plugins#825

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

Co-authored-by: Claude Fable 5 <[email protected]>
kyle-sexton added a commit that referenced this pull request Jul 26, 2026
…in e295107 (#275)

## What

Add the reviewed runner-input contracts for

`melodic-software/ci-workflows/.github/workflows/claude-review.yml@e2951077a7b43c09fc5a8dee4da52ba6f0fb39ed`
and

`melodic-software/ci-workflows/.github/workflows/claude-security-review.yml@e2951077a7b43c09fc5a8dee4da52ba6f0fb39ed`
(the ci-workflows#248/#249 squash-merge SHA) to
`approvedReusableWorkflowContracts`. Both entries are shape-identical to
the
previously reviewed pins (`claude-review@90f1c54`,
`claude-security-review@99cb082e`): same routing (`runner-input` via
`runner`),
same `allowedInputs` (`runner`, `skip-actors`; plus `paths` for
security-review), same single `CLAUDE_CODE_OAUTH_TOKEN` secret mapping,
and
same `allowedCallerPermissions` (`contents:read`, `pull-requests:write`,
`id-token:write`). The superseded entries stay until the last caller
re-pins
and can then be retired, per the #229 precedent.

## Why

The runner-policy gate correctly declined auto-approval on
melodic-software/claude-code-plugins#1552: both contracts carry
`allowedCallerPermissions`, so a bumped SHA's step content must be
human-reviewed and recorded here — auto-approval is categorically
declined for
that contract class regardless of surface identity. This PR is that
review.

Contract review of `e2951077` against the reviewed pins:

- **No** `workflow_call` input, secret, permission, `runs-on`, or
routing
change in either workflow. `claude-security-review`'s `prompt` input
only
changed its **default prose** (defer to zizmor's static lane for what it
  already covers) — no input added or removed, no type/required change.
- Step content changed (the reason human review is required):
- `gh` CLI run steps (PR head freshness check, infra-failure PR comment
    lifecycle, PR file listing) replaced with
    `actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3`,
verified against upstream as the official `v9.0.0` annotated-tag commit.
Same API operations under the same implicit `github.token` and unchanged
    job permission grants.
  - The generated infra-failure classifier
(`.github/scripts/classify-infra-failure.sh`) reads the SDK result file
    and publishes only structured metadata fields plus a constrained
`class` token (`auth|rate-limit|overloaded|other`) — the model-authored
    free text and raw error stacks never leave the block.
- No new secret, no widened permission, no runner-label/routing change —
  no privilege widening.

Once merged, the standards-sync PR carries
`.github/standards/runner-policy/policy.json` into consumers, and
claude-code-plugins#1552 passes unchanged.

## Verification

- `npm run lint:runner-policy` — Runner policy passed.
- `npm run test:runner-policy` — 238 pass / 0 fail.
- `check-jsonschema --schemafile
components/runner-policy/policy.schema.json
components/runner-policy/policy.json` — ok.

No linked issue (reviewed-contract update; the blocked PR lives in
claude-code-plugins).

## Related

- melodic-software/ci-workflows#248, melodic-software/ci-workflows#249
(merged, `e295107`)
- melodic-software/claude-code-plugins#1552 (blocked on this review +
sync)
- Precedent: #229 → sync → caller bump

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

Co-authored-by: Claude Opus 5 <[email protected]>
kyle-sexton added a commit that referenced this pull request Jul 27, 2026
## Summary

Declares this repository's PR-body required sections (`Summary`, `Test
plan`,
`Related`) in the team-tracked `source-control.md` layer.

`.github/workflows/pr-issue-linkage.yml` fails any non-exempt PR whose
body
lacks a non-empty `## Related` section, but the source-control plugin's
portable
default scaffold emits `Summary` and `Test plan` only — it deliberately
excludes
`Related`. A PR authored against the plugin default therefore fails this
repository's own gate at creation. Declaring the list closes the gap at
the
config seam that exists for exactly this, rather than relying on an
author
remembering the repo-specific requirement.

Found by a fleet-wide sweep comparing each repository's `## Related`
gate
against its declared `pr_body_required_sections`. `ci-workflows`,
`dotfiles`,
`github-iac`, `provisioning`, and `claude-code-plugins` already declare
the
identical three-section list; this brings the remaining repos to parity.

## Test plan

- Config-only change; no executable surface touched.
- `markdownlint-cli2 .claude/source-control.md` — 0 errors (also
enforced by the
  repository's own pre-commit hooks, which passed).
- This PR's own body was written against the declared list, so
`pr-issue-linkage` passing here is direct evidence the list matches what
the
  gate requires.

## Related

- Fleet autonomy Phase 1. Sibling PRs declaring the same key from the
same
  sweep: `melodic-software/github-iac` #229 (merged),
`melodic-software/provisioning` #220 (merged), plus the remaining repos
found
  by the sweep. No ordering between them.
- Key semantics and layer resolution:

<https://github.com/melodic-software/claude-code-plugins/blob/main/plugins/source-control/reference/config-resolution.md>

No linked issue.

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
kyle-sexton added a commit that referenced this pull request Jul 31, 2026
…contract (#307)

## Summary

Adds `skip-actors` to the `allowedInputs` of the runner-policy contract
entry for

`melodic-software/ci-workflows/.github/workflows/claude-security-review.yml@c136b27`
— the pin
both security-lane consumers run today.

Why now: `claude-code-plugins` re-deliberated ADR 0002's skip-actor
exception
(melodic-software/claude-code-plugins#1767) and **rejected** the
reusable workflow's inherited
default
(`dependabot[bot],claude[bot],melodic-ai[bot],melodic-standards-sync[bot]`)
for the
*security* lane. `claude[bot]` and `melodic-ai[bot]` carry none of the
compensating controls
that justified the two operator-ratified actors — a Dependabot pin bump
is forced through this
very runner-policy contract, and a standards-sync PR materializes
byte-exact upstream-reviewed
content — so an AI-app-pushed commit would satisfy that repo's
**required** security check with
no review run of any kind. Its caller must therefore pass an explicit
narrow list
(`dependabot[bot],melodic-standards-sync[bot]`), and the caller can only
pass an input the
contract admits.

This **restores parity rather than widening new ground**: the previous
approved security SHA's
contract (`66073e58`) already admitted `skip-actors`; the `c136b27`
entry dropped it, which is why
the consumer's caller could not keep its explicit list through the
re-pin. The `claude-review.yml`
contracts at `df54d0e` and `4dbb0df` admit it too.

A second commit reconciles `components/runner-policy/README.md`, whose
`c136b27` review note still
recorded the security caller as able to pass only `runner` and
`paths-file` — a reviewer consulting
it would have read `skip-actors` as denied. The `(of 8)` denominator is
unchanged: `skip-actors` is
one of the reusable's eight declared inputs at that SHA (`runner`,
`paths`, `paths-file`, `prompt`,
`claude-args`, `exclude-comments-by-actor`, `skip-actors`,
`retry-delay-seconds`), so the admitted
set stays narrower than the declared surface.

**Blast radius — permissive widening only.** `runner-policy` is a
managed component across the
fleet, so this materializes everywhere, but nothing starts passing the
input: the validator
rejects inputs *outside* `allowedInputs` and never requires one. The
only behavior change is
that a caller may now pass `skip-actors` to this pin without the policy
check failing.

The entry carries no `autoApproved` block, so it is a human-reviewed
contract edit by design.

Known residual gap (follow-up, not this PR): the validator rejects
unexpected inputs but cannot
*require* one, so a future re-pin that drops a caller's `skip-actors`
line passes CI and silently
re-widens the exception. Guarding that needs a `requiredInputs`-style
contract field — filed as
#308, which also records the matching hazard in the parked
`claude-security-review-caller`
component (its bytes pass no `skip-actors`, so an adopter inherits the
widened default when it
unparks).

## Test plan

- `node -e "JSON.parse(...)"` on `components/runner-policy/policy.json`
— parses.
- `biome check components/runner-policy/policy.json` — clean (also clean
via the `pre-commit`
  lefthook run: typos, gitleaks, editorconfig, biome all pass).
- Diff is one line: `"allowedInputs": ["runner", "paths-file"]` →
`["runner", "paths-file", "skip-actors"]`, matching the file's
one-line-array style and the
  schema's `uniqueStringArray`.
- Input verified against the reusable at the pinned SHA: `skip-actors`
is a declared
`workflow_call` input on `claude-security-review.yml@c136b27`,
defaulting to the four-actor
list and gating the `security-review` **job** (not the workflow), so a
skipped actor still
  reports a name-stable passing check.
- Downstream verification: with this change applied locally to the
consumer's materialized
`policy.json`, `runner-policy.mjs` reports `Runner policy passed.`
against the narrowed caller;
without it, exactly one finding (`inputs absent from its reviewed
contract: skip-actors`).

## Related

No linked issue in this repository — deliberately. The deliberation and
its record live in the
consuming repo (melodic-software/claude-code-plugins#1767), which is
closed by its own caller PR;
a cross-repo closing keyword here would close that issue on the wrong
merge.

- Decision: melodic-software/claude-code-plugins#1767 (ADR 0002
re-deliberation)
- Sequencing: this PR → standards→claude-code-plugins sync PR → the
caller + ADR PR in
  claude-code-plugins
- Consuming PR (blocked on this one):
melodic-software/claude-code-plugins#1845 — its
`runner-policy` check stays red until this merges and the sync
materializes
- Follow-ups filed, not implemented here: #308 (`requiredInputs`
contract field) and
melodic-software/ci-workflows#330 (narrow the security reusable's own
`skip-actors` default)
- Contract precedent: #211 (security-review contract), #229
(`paths-file` input), #161
  (`claude-review` runner-input contract)

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

https://claude.ai/code/session_01FVoZoMYXqf8ZVbQYixPVPW

---------

Co-authored-by: Claude Fable 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