Repository navigation
ci: float first-party ci-workflows refs on @main and key runner-policy by path - #911
Merged
Merged
Conversation
…y by path Owner decision Q23: first-party refs float on @main, so a ci-workflows change needs no standards sync. - Every melodic-software/ci-workflows ref in this repository's workflows and in the distributed caller components (claude-lanes, claude-lanes-hosted, managed-files-guard, lychee-online) moves to @main. - runner-policy keys approvedReusableWorkflowContracts by workflow path. The 109 path@SHA entries collapse to 12, one per path, each the newest SHA's entry by ancestry on ci-workflows origin/main. A caller matches at @main (melodic-software paths only) or at a full SHA, so consumers still SHA-pinned stay green while the sync lands; tags and other branches are refused. schemaVersion 4 -> 5. - The deterministic auto-approval (path@SHA surface diffing, release-commit check) is removed with its tests: path keys leave it nothing to approve. - maintenance-repin-ci-workflows, the claude-lanes repin scripts and the pin-comment-convention component are removed. - dependabot automerge-lockstep reads the reusable at main; pr-convention lockstep-drift accepts a composite at @main. - A new .github/zizmor.yml ref-pins melodic-software/* and keeps hash-pin for every third party (https://docs.zizmor.sh/audits/#unpinned-uses). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…le path Accepting any full 40-hex SHA let an impostor commit through: anyone can fork the public ci-workflows repository, push a commit, and GitHub serves it as melodic-software/ci-workflows/...@<sha>. - Each path contract carries an approvedShas list. A ref passes only at @main (melodic-software paths) or at a listed SHA; an unlisted SHA, tag or branch is refused with a reason naming the path. - The 112 listed SHAs are the 109 path@SHA keys bf26b85 approved plus three tagged releases consumers still pin that the removed release-commit auto-approval admitted (v0.42.1 4cfd14e8, v0.50.0 d223a644). Every one is an ancestor of ci-workflows main. - README and THREAT-MODEL name the impostor-commit risk and mark the list migration-only, deleted once consumers are on @main. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0f9b9e8058
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Add a zizmor component whose payload is this repository's own .github/zizmor.yml: the org 3-day Dependabot cooldown floor plus an unpinned-uses policy that lets melodic-software/* refs ref-pin and keeps every other ref hash-pinned, so the @main ci-workflows callers audit clean. Managed for every target that runs zizmor: ci-runner, claude-code-plugins, claude-code-proxy, dotfiles, github-iac, medley and provisioning. The sync overwrites the existing repo-local copies in claude-code-plugins, github-iac and medley. ci-workflows is locally owned: its copy adds a repo-specific self-repository ignore. Both rules only relax zizmor's defaults, so the file cannot add a finding to any target. zizmor.test.sh proves the policy against fixtures with a configless control run. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The org Actions policy requires every action, first-party included, to be pinned to a full-length commit SHA; only reusable workflows may be referenced by a branch or tag. standards#911's ci-status failed at job setup on `pr-require-checks/check-contract@main`. Pin every ci-workflows action ref in pr-require-checks.yml and the managed-files-guard caller components to 2476d5dde897 (ci-workflows main), keep reusable workflows on @main, and say so in the zizmor, dependabot, managed-files-guard and runner-policy text and tests. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The zizmor component made .github/zizmor.yml a managed destination for seven targets, but neither guard caller's paths filter listed it, so managed-files-guard.test.sh failed its managed-union check. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Owner decision Q3 (a): the org keeps "require actions pinned to a full-length commit SHA" on, so first-party ci-workflows actions stay SHA-pinned while reusable workflows float on @main, and the existing repin automation stays, scoped to action pins. - Restore maintenance-repin-ci-workflows.yml and components/claude-lanes/repin-callers.sh with its test. PIN_RE matches only melodic-software/ci-workflows/.github/actions/...@<sha>, so a reusable-workflow ref is never moved, at @main or SHA-pinned. - Targets are the tracked .github/workflows files plus the distributed caller components Dependabot cannot see (claude-lanes, claude-lanes-hosted, lychee-online/targets, managed-files-guard); each directory must exist. - An upstream change under .github/workflows/ is inert to action pins. - The runner-policy lockstep scripts and pin-comment-convention stay deleted: composite actions have no contract to copy, and the script reads and writes both pin comment forms itself. - CI runs repin-callers.test.sh; dependabot, managed-files-guard, runner-policy, zizmor and distribution docs say how action pins move. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The rename guidance still said runner policy approves path@SHA, and the lockstep descriptions still said the check reads every approved SHA at fixed revisions. Contracts are keyed by bare path and the lockstep reads the reusable at main only. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…unreleased pin Restrict the @main float to paths under melodic-software/ci-workflows/, so another melodic-software repository's reusable must pin an approved SHA. repin-callers: decide returns ahead whenever the compare reports the pin behind or diverged, and fenced covers every pin whatever its comment form, so a tag-form pin the release does not contain is reported and never moved backwards. THREAT-MODEL and README name the third source of approvedShas: release-commit SHAs the removed auto-approval added, kept because consumers pin them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
kyle-sexton
added a commit
that referenced
this pull request
Oct 30, 2026
#911 removed the path@SHA surface-diff auto-approval that this branch amended (runner-policy now keys contracts by path and admits @main or a listed approvedShas entry). The three conflicted runner-policy files (README.md, runner-policy.mjs, runner-policy.test.mjs) take main's version: the code and docs this branch changed no longer exist, so the branch's net diff against main is empty. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VcupojYKhHyDni9LuAXBuX
This was referenced Oct 30, 2026
kyle-sexton
added a commit
to melodic-software/ci-runner
that referenced
this pull request
Oct 30, 2026
No related issue: local adaptation that standards-sync #504 needs under owner decision Q23 ([standards#911](melodic-software/standards#911)). ## Summary Owner decision Q23 floats first-party ci-workflows reusable workflows on `@main`. Standards-sync #504 delivers that to `pr-review-hosted.yml` and `pr-review-security-hosted.yml`. This repository's two pin checks still require a full SHA in every SYNC-MANAGED caller, so #504 fails Product policy at `workflow-pin-metadata.test.cjs:137` and, after that, at `Test-ReleasePins.ps1:362`. ## Fix - `.github/scripts/workflow-pin-metadata.test.cjs`: a SYNC-MANAGED caller may reference `melodic-software/ci-workflows/.github/workflows/<name>.yml@main` - `scripts/Test-ReleasePins.ps1`: the same exemption, applied before the full-SHA check Nothing else changes: - Actions (`.github/actions/...`) still need a 40-hex SHA. The org Actions policy also enforces this. - Locally owned callers (`pr-require-checks.yml`, `pr-automerge-dependabot.yml`) keep the canonical SHA and release form. - Any other branch, tag or `@main-*` ref is refused. ## Verification - On main: `node --test .github/scripts/*.test.cjs` passes 23/23, and `./scripts/Test-ReleasePins.ps1` passes. - On #504's head (`d32e685`) with these two files copied in: both pass. Without them, both fail. - Regex spot checks: `pr-review.yml@main` is admitted. `@main-x`, `@v1` and `.github/actions/x@main` are refused. ## Related Unblocks #504. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01VcupojEVPjg9zYgTTu3TNk Co-authored-by: Claude Opus 5.5 <[email protected]>
kyle-sexton
added a commit
that referenced
this pull request
Oct 30, 2026
…r-input legs (#921) Closes #817 ## Summary Decision: add an optional `fixedRunsOn` field to the runner-input contract shape, and require a hosted exception when an enrolled private repository passes the fleet label to a reusable that records it. Record `fixedRunsOn: ["ubuntu-24.04"]` on intake-triage. The issue still applies after #911, and it now covers more of the workflow than when it was filed. On ci-workflows main (`a52dbe5`), three jobs in `intake-triage.yml` ignore `inputs.runner` and run on `ubuntu-24.04`: `subscription`, `fallback` and `apply`. `apply` runs on every triage. The contract still said `routing: runner-input`. A caller that passed the fleet label classified as `managed-literal`, which the private-repository pass skipped (`runner-policy.mjs`, "an admitted fleet literal needs no exception entry"). The billed hosted legs therefore produced no finding, and a caller could not even declare an exception, because an unconsumed one fails as `exception-inventory-drift`. Options considered: 1. **Free-text note on the contract.** Both contract shapes are `additionalProperties: false`, so this still needs a schema change. No code reads the note, so runner-policy would still not flag the call, which is the impact the issue describes. 2. **Per-job routing map naming callee job ids.** runner-policy reads only caller files and never sees callee job names, so it cannot verify the map. The map would also drift as legs are added, which has already happened: the issue named one job and there are now three. 3. **Reclassify intake-triage as `hosted-only`.** That is wrong for the `claude` and `status` jobs, which do honor the runner input. It would also drop the contract's `role`, `allowedCallerPermissions` and secret-mapping checks, which the hosted-only shape does not carry. 4. **Contract-level `fixedRunsOn` on runner-input contracts (chosen).** It reuses the field name and the known-hosted-label validation that hosted-only contracts already have. It feeds the existing `hosted-exception-required` and exception-inventory path, so no new finding rule or mechanism is added. 5. **Route the fixed legs onto `inputs.runner` in ci-workflows.** Rejected. Those jobs stay on a fresh hosted VM so that a caller's runner cannot carry state into the credential-bearing jobs (`intake-triage.yml` header and the `subscription` and `apply` job comments). Basis: `components/runner-policy/runner-policy.mjs` (the `managed-literal` early `continue` in the private pass, and the hosted-only `fixedRunsOn` label check in policy loading); `components/runner-policy/policy.schema.json` (`runnerInputContract` and `hostedOnlyContract`); ci-workflows `.github/workflows/intake-triage.yml` at `a52dbe5f5ae227da6bd3f07d7f1eed8b03ec259b` (`subscription`, `fallback` and `apply` all set `runs-on: ubuntu-24.04`, and `apply` writes with its own `permissions: issues: write` `GITHUB_TOKEN`, not a broker token, so a private repository can adopt the reusable without a broker change). ## Fix - `policy.schema.json`: `runnerInputContract` accepts an optional `fixedRunsOn`. - `runner-policy.mjs`: `fixedRunsOn` labels are validated against the known GitHub-hosted labels for either contract shape. On an enrolled private repository, a fleet-label call to a contract that has `fixedRunsOn` consumes a hosted exception, or reports `hosted-exception-required` when there is none. - `policy.json`: intake-triage records `fixedRunsOn: ["ubuntu-24.04"]`. - `README.md`: the runner-input bullet describes the field, and the lockstep section names which jobs ignore the runner input as part of the routing surface. Blast radius: none today. The only caller is claude-code-plugins, which is public (an org code search for `intake-triage.yml` found no private caller). On a public repository `routingEnabled` is false, so a public caller gets no new finding. ## Verification - `node --test components/runner-policy/runner-policy.test.mjs`: 225 pass, 0 fail. The four new tests cover a private fleet-label call with no exception (flagged), the same call with an exception (clean), a public hosted call (clean), and an unknown label in `fixedRunsOn` (refused at load). Three of them fail against the origin/main `runner-policy.mjs`. - `node components/runner-policy/runner-policy.mjs --root .` with `CI_REPOSITORY_VISIBILITY=public`: passed. - `markdownlint-cli2` on the README, and `biome check` on the four changed files: clean. - Other readers of `policy.json` contracts: `node --test components/dependabot-policy/automerge-lockstep.test.mjs` (14 pass) and `harness/shell/run-tests.sh components/claude-lanes/repin-callers.test.sh` (passed). - `schemaVersion` stays 5. The precedent is #385 (`536252a`), which added `minimumCallerPermissions` as an optional field without a version bump. The sync manifest ships `policy.json`, `policy.schema.json` and `runner-policy.mjs` together (`distribution/sync-manifest.yml`, `runner-policy` entry), so a consumer never sees the new key with an old schema. ## Related - #803: the security review that raised this. - #911: re-keyed contracts by path and moved first-party reusables to float on `@main`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01VcupojYKhHyDni9LuAXBuX --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No related issue: owner decision Q23 (2026-10-29), first-party reusable workflows float on @main
Summary
The owner asked: "If it's our own shit, like our own workflows ... can we just stop doing that so it doesn't eat up our time?" Under decision Q23, first-party ci-workflows reusable workflows float on
@main. First-party actions stay pinned to a full commit SHA, because the org Actions policy "Require actions to be pinned to a full-length commit SHA" is on and covers actions from the organization, while "Reusable workflows can still be referenced by tag" (GitHub docs). An earlier head of this PR floated the actions too, andci-statusfailed at job setup: "The action melodic-software/ci-workflows/.github/actions/pr-require-checks/check-contract@main is not allowed in melodic-software/standards because all actions must be pinned to a full-length commit SHA." runner-policy now keys contracts by workflow path, so a change to a ci-workflows reusable workflow no longer needs a standards sync. Under owner decision Q3 (a) (2026-10-30) the org setting stays on and the repin automation stays, scoped to action pins: a change to a ci-workflows action reaches callers throughmaintenance-repin-ci-workflows's reviewed repin PR and then the sync.Merge order:
ci/float-first-party-refs).Fix
Refs
melodic-software/ci-workflowsreusable-workflow ref moves to@main. That covers the workflows in.github/workflows/and the distributed callers incomponents/claude-lanes*/andcomponents/lychee-online/targets/.uses:lines inpr-require-checks.yml, pluscheck-managed-filesin bothcomponents/managed-files-guard/callers) is pinned to2476d5dde8979eab34374150b7e4b0a2b99f4e88 # 2476d5d 2026-10-29, the ci-workflowsmaincommit at the time of the change. Each action path exists at that commit and everywith:key is a declared input there.pathsfilter now lists.github/zizmor.yml, which the new zizmor component manages.runner-policy
approvedReusableWorkflowContractsis keyed by path. The 109 path@SHA entries collapse to 12, one per path. Each kept entry is the one for the newest SHA by ancestry on ci-workflowsorigin/main, with its allowedInputs, allowedSecrets and allowedCallerPermissions unchanged.@main(melodic-software paths only) or at a full SHA listed in that contract'sapprovedShas. Any other SHA, tag or branch is refused. An unlisted SHA is refused because anyone can fork the public ci-workflows repository, push a commit, and GitHub serves it asmelodic-software/ci-workflows@<sha>(an impostor commit).approvedShasholds 112 SHAs across the 12 paths. 109 are the path@SHA keys the previous policy listed. The other 3 are tagged releases that consumers still pin and that the removed release-commit auto-approval used to admit:intake-label-needs-triage.ymlandpr-automerge-dependabot.ymlat v0.42.1 (4cfd14e8), andpr-audit-workflows.ymlat v0.50.0 (d223a644). Every listed SHA is an ancestor of ci-workflowsorigin/main. The list exists only for the migration: a path's list is deleted once no consumer pins that path to a SHA. THREAT-MODEL names the impostor-commit risk.schemaVersiongoes from 4 to 5.Repin automation (owner decision Q3 (a), 2026-10-30: kept, scoped to action pins)
maintenance-repin-ci-workflows.ymlandcomponents/claude-lanes/repin-callers.sh(+ its test) stay, narrowed to first-party ACTION pins.PIN_REmatches onlymelodic-software/ci-workflows/.github/actions/...@<40-hex>, so a reusable-workflow ref is never moved, whether at@mainor still SHA-pinned. Daily, it resolves the newest full-SemVer ci-workflows release and moves each action pin whose action that release changed to<sha> # vX.Y.Z, in one reviewed pull request that is never auto-merged..github/workflows/*.ymlthat carries an action pin (todaypr-require-checks.yml) plus the distributed caller components Dependabot cannot see:components/claude-lanes,claude-lanes-hosted,lychee-online/targets,managed-files-guard. Each of those directories must exist; test corpora such ascomponents/zizmor/fixtures/are never reached..github/workflows/upstream counts as inert for action pins: a composite action cannot run a workflow file, so a reusable-only release moves no action pin. At2476d5d, no file under ci-workflows.github/actions/reads a workflow file. A localgit grepfinds only REST API routes and README examples..cursor/install.test.shchecks that its shellcheck pin matches the one inpr-require-checks.yml..cursor/is outside the repin'sadd-paths, so a repin PR that moves the shellcheck action fails that test until someone updates the copy by hand in the same PR.repin-policy-lockstep.mjsandrepin-lockstep-args.mjs(they copied runner-policy reusable contracts forward; composite actions have none, and reusables are now path-keyed) and thepin-comment-conventioncomponent (the script reads and writes both comment forms itself, and runner-policy'spin-provenance-driftaccepts both).2476d5d) are on ci-workflowsmain, ahead of the newest release. Until a release contains that commit, the job logs "not an ancestor of vX.Y.Z; left as is" and opens nothing. That is the downgrade fence working, not a fault.Lockstep checks
dependabot-policy/automerge-lockstepreads the reusable atmainand requires its path-keyed contract.pr-convention-policy/lockstep-driftaccepts a composite at@main.zizmor
zizmorcomponent (components/zizmor/): its payload is this repository's own.github/zizmor.yml, which ref-pins"melodic-software/*", keeps"*": hash-pin(zizmor unpinned-uses) and sets the org 3-daydependabot-cooldownfloor. It is managed for every target that runs zizmor (ci-runner, claude-code-plugins, claude-code-proxy, dotfiles, github-iac, medley, provisioning), so their sync PRs carrying@maincallers pass zizmor. The sync overwrites the cooldown-only copies in claude-code-plugins, github-iac and medley. ci-workflows islocally-owned: its copy adds aself-repositoryignore. Both rules only relax zizmor's defaults, so the file adds no finding anywhere. zizmor finds the file without--configfor any input inside the Git repository, from v1.29.0 (configuration).What the sync will carry
components/runner-policy/{policy.json,policy.schema.json,runner-policy.mjs,...}into.github/standards/runner-policy/..github/zizmor.yml.@main, the guard action SHA-pinned and repinned bymaintenance-repin-ci-workflows). For claude-code-plugins that ismaintenance-check-links-online-claude-code-plugins.ymlandpr-check-managed-files-hosted.yml.Verification
@mainpassing, a third-party@mainrefused, and the live policy admitting a listed SHA while refusing an unlisted one.lint:runner-policypasses. The new runner-policy also passes over the claude-code-plugins worktree with its@mainrefs.managed-files-guard.test.shandclaude-lanes.test.sh: both pass.repin-callers.test.sh: 163 assertions pass, including the narrowing cases: a SHA-pinned reusable and an@mainreusable beside an action pin stay byte-identical, a caller holding only a SHA-pinned reusable is not touched,--rooton a consumer moves no reusable, and the zizmor fixture corpus is byte-identical after a run. shellcheck clean.actionlint: clean.zizmor --offlineover the lane'spaths:: 0 unpinned-uses findings. Without the config there are 32. A probe showsactions/checkout@v4is still flagged under the config.zizmor.test.shpasses: a first-party reusable on@main, a SHA-pinned first-party composite and a 3-day cooldown audit clean for inputs.,.githuband.github/workflows, a third-party tag still fails, and a configless control run flags the reusable and the cooldown. The policy behaves the same under zizmor 1.29.0, 1.30.0 and 1.31.1, in a plain clone and in a git worktree.sync-manifest.sh validatepasses (47 components, 14 targets), andsync-manifest.test.shpasses. Anapplyinto a local github-iac clone replaced its tracked.github/zizmor.yml, andzizmor --offline .there reports no findings.dependabot-cooldownwarnings are gone;zizmor --offline .reports 0 low, medium or high findings.actionlintclean;zizmor --offline .reports 0 low, medium or high findings;lint:runner-policypasses (itspin-provenance-driftcheck accepts the# 2476d5dcomment); runner-policy tests 220 pass, lockstep-drift 94, dependabot-policy 51, naming-lint 14;managed-files-guard.test.sh(now asserting a full-SHA action pin),claude-lanes.test.sh,zizmor.test.shandactionlint.test.shpass..cursor/install.test.shneeds a full-SHA action pin, which@mainhad broken; the four engine defaults it compares (shellcheck, typos, gitleaks, editorconfig-checker) are identical at594987aand2476d5dby localgit show.Related
ci/float-first-party-refsci/float-first-party-refsdocs/actions-stay-sha-pinned: its action READMEs stop telling callers to use@main🤖 Generated with Claude Code