Skip to content

feat(runner-policy): approve the macos-26 hosted runner label - #845

Merged
kyle-sexton merged 4 commits into
mainfrom
feat/runner-policy-macos-26
Oct 22, 2026
Merged

kyle-sexton merged 4 commits into
mainfrom
feat/runner-policy-macos-26

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

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

Summary

Adds macos-26 to approvedHostedRunnerLabels so a public repository can pin a macOS job. The owner decided on 2026-10-22 to run the claude-code-plugins planning shared Python suites on macOS. The policy forbids macos-latest, and today it rejects macos-26 with runner-target-contract: runner target "macos-26" is not in the approved hosted-runner label allowlist.

Fix

  • components/runner-policy/policy.json: approvedHostedRunnerLabels is now ["ubuntu-24.04", "windows-2025", "macos-26"].
  • runner-policy.test.mjs: public + macos-26 passes, and macos-26-xlarge is still rejected (runner-target-contract). Private + selfHostedCi: false + macos-26, and private enrolled + a windows exception + macos-26, both report private-macos-runner. So does a private matrix with a macos-26 entry. A private ubuntu job whose matrix name: [skip-macos-legs] and reusable with: path: tools/macos/setup.sh only mention the word reports no private-macos-runner.

Why this label: GitHub-hosted runners reference lists macos-26 with macos-latest in the arm64 standard row. In runner-images README, macos-latest and macos-26 both map to macOS 26 Arm64, and "the -latest label is used for the latest OS image version that is GA." That matches how ubuntu-24.04 and windows-2025 were chosen: pin the image -latest points to now. Per Actions billing, standard hosted runners in public repositories are free, and larger runners are always billed.

  • runner-policy.mjs: macOS labels are public-only. A private repository that names a macOS label anywhere (runs-on, a matrix value or a reusable with: value) gets the new private-macos-runner finding. Each runner string is split on whitespace, commas, brackets and quotes, and a label counts when any token matches /^macos(-|$)/i: macos, macos-26, macos-latest, macos-26-xlarge or macos-14-large. The split catches a JSON array such as '["macos-26"]' passed through a reusable with: to runs-on: ${{ fromJSON(inputs.runs-on) }}, a list such as macos-26, ubuntu-24.04, and a quoted 'macos-latest'. A matrix or with: value that only contains the word, such as skip-macos-legs or tools/macos/setup.sh, does not count. A runs-on expression is left to runner-target-contract. This holds whatever the repository's selfHostedCi or exceptions say. Without this, approving the label would have opened a way to be charged. On a private repository with selfHostedCi: false, routing is off (routingEnabled = private && selfHostedCi), so no exception is required. An enrolled private repository could have used any exception reason, windows included. Either way the job would run macos-26, which bills on private repositories.
  • README.md: the hosted-only paragraph now says macOS labels are public-only.

Verification

  • Red first: before the analyzer change, the three private cases failed with actual: [] / actual: false, and the public case passed.
  • Red first for the narrowing: before the matcher change, the mention-only case failed, with both tools/macos/setup.sh and skip-macos-legs flagged.
  • Red first for the token split: the anchored match failed on ["macos-26"] with '["macos-26"]' is not refused. It also misses 'macos-latest' (/^macos(-|$)/i gives false), while it already matched macos-26, ubuntu-24.04.
  • Green: node --test components/runner-policy/runner-policy.test.mjs gives 334 pass, 0 fail. Biome and markdownlint are clean.
  • GITHUB_REPOSITORY=melodic-software/standards node components/runner-policy/runner-policy.mjs --root .: Runner policy passed.
  • I copied this policy.json and runner-policy.mjs into the claude-code-plugins branch (public) and ran the analyzer there. The macos-26 job passes with it and fails without it.

Related

  • The consumer change is ci(planning): run the shared Python suites on macOS claude-code-plugins#9080 and its draft PR. That PR's runner-policy gate fails until the standards sync delivers this policy.
  • Trust boundary: the review triggers in THREAT-MODEL.md ("Review triggers") list new runner expressions, exception reasons and similar items. A new approved hosted label is not among them, and README.md calls adding one "a reviewed, data-only policy change". The owner still decides, because this widens the allowlist for every consumer.

🤖 Generated with Claude Code

kyle-sexton and others added 2 commits October 22, 2026 11:06
Add macos-26, the arm64 standard image macos-latest points to, to
approvedHostedRunnerLabels so a public repository can pin a macOS
job. macos-latest stays forbidden, and a larger runner label such as
macos-26-xlarge stays unapproved; a new test pins both.

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

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0134VnRFcSNehg9ngFzVCxFh
Approving macos-26 let a private repository reach it: with routing off
(selfHostedCi false) no exception is required, and an enrolled one
could consume any exception reason such as windows. macOS minutes bill
on private repositories, so any private job naming a macOS label in
runs-on, a matrix or a reusable with: value now reports
private-macos-runner, whatever its enrollment or exceptions.

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

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review October 22, 2026 15:41
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 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-22T15:43:13.877648Z 727b33b 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 727b33b7e7

ℹ️ 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".

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

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

Incremental review of 247b94b (runner-policy.mjs and its test)

I reviewed only the changes since 3f5b450. These make private-macos-runner split each runner string on whitespace, commas, brackets and quotes. That lets it catch a macOS label inside a JSON array passed to fromJSON, in a comma list, or in quotes.

Finding (1, posted inline at components/runner-policy/runner-policy.mjs:3350): the split is applied to every string in job.with and strategy.matrix, not only values that reach runs-on. Free text that contains the bare word macos is now flagged on a private repository, for example description: "skip macos legs", os-names: "linux macos windows" or note: [macos-only]. The old whole-string anchor did not flag these. The new test covers only the positive cases, and the existing negative test (skip-macos-legs, tools/macos/setup.sh) doesn't exercise the bare-word case. I reasoned this through from the regex and did not run it, because the sandbox blocked an ad hoc node command. Either narrow the split or pin the conservative behaviour with a test.

Checked and fine:

  • The three new positive cases ('["macos-26"]', "macos-26, ubuntu-24.04", "'macos-latest'") each contain a token that matches /^macos(-|$)/i.
  • Path-style values such as tools/macos/setup.sh are not split on /, so they still don't match.

I ran no tests. The PR body's verification claims are author-claimed and unverified by me.

Closing issues: the PR says Refs: only, so there are no closing-issue criteria to check. No manifests changed.

…unner

The check flagged any matrix or with: value containing "macos", such as
a matrix name skip-macos-legs or a path tools/macos/setup.sh on an
ubuntu job. It now matches a trimmed value of the form /^macos(-|$)/i,
which covers macos, macos-26, macos-latest and the larger-runner labels.

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

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

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

Security review: incremental (3f5b450 → 247b94b)

No security findings.

The change touches components/runner-policy/runner-policy.mjs and its test file. The private-macos-runner check used to match only a runs-on value that was a bare macOS label. It now splits each value on whitespace, commas, brackets and quotes. It flags the value if any token looks like a macOS label, so it also catches a JSON array handed to fromJSON, such as ["macos-26"].

  • Direction of the change: the audit rule gets stricter. It catches more private-repository macOS runner usage and no longer lets a quoted or listed label through.
  • No new attack surface: the split uses a fixed character-class regex with no backtracking or ReDoS risk. The code doesn't execute the input, build shell commands from it, or touch tokens, secrets or file paths. Tokens are only tested against /^macos(-|$)/i.
  • Possible false positives: a value that contains a macOS-shaped token inside a larger string will now be flagged. That is a policy-strictness choice, not a vulnerability.
  • Manifests and instruction surfaces: the diff includes no plugin manifests, no userConfig keys and no instruction-surface deletions, so there are no manifest <field> lines to report.
  • Test coverage: the added test covers JSON-array, comma-list and quoted forms through a reusable workflow.

The skip gate (no security-relevant surface) applied in substance. I read the diff and the surrounding code in runner-policy.mjs before concluding.

The anchored match missed a runner string that does not start with the
label, such as a reusable with: value '["macos-26"]' that the called
workflow passes to fromJSON, or a quoted 'macos-latest'. Each runner
string is now split on whitespace, commas, brackets and quotes, and any
token of the form /^macos(-|$)/i reports private-macos-runner.

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

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton merged commit 7e36007 into main Oct 22, 2026
55 of 56 checks passed
@kyle-sexton
kyle-sexton deleted the feat/runner-policy-macos-26 branch October 22, 2026 16:24
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