Skip to content

feat(runner-policy): allow environment input on intake-triage and pr-review-cli - #1082

Merged
kyle-sexton merged 1 commit into
mainfrom
feat/runner-policy-environment-input
Nov 21, 2026
Merged

kyle-sexton merged 1 commit into
mainfrom
feat/runner-policy-environment-input

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Closes #1076

Summary

Lists environment in allowedInputs for melodic-software/ci-workflows/.github/workflows/intake-triage.yml and melodic-software/ci-workflows/.github/workflows/pr-review-cli.yml in components/runner-policy/policy.json, matching the optional input added by melodic-software/ci-workflows#1154 (owner decision Q8).

Fix

  • components/runner-policy/policy.json: appends environment to allowedInputs on both intake-triage.yml and pr-review-cli.yml. No secrets, caller permissions, runner routing, or approvedShas change.
  • Both reusables accept environment as an optional string defaulting to "" and apply environment: { name: ${{ inputs.environment }}, deployment: false } to their Claude-secret jobs. Callers that omit environment see no change; callers that pass a branch-protected environment (such as claude-lanes restricted to main) tighten secret scope rather than loosening review.

Verification

  • node --test components/runner-policy/runner-policy.test.mjs: 247/247 pass.
  • node components/runner-policy/runner-policy.mjs --root .: passed.
  • check-jsonschema --schemafile components/runner-policy/policy.schema.json components/runner-policy/policy.json: validation passed.
  • biome check components/runner-policy/policy.json: clean.

Related

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-21T10:12:36.388054Z d6e5953 PR opened
ℹ️ 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

Copy link
Copy Markdown

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

No findings.

Change: appends environment to allowedInputs for the intake-triage.yml (diff line 10) and pr-review-cli.yml (diff line 21) contracts in components/runner-policy/policy.json. No secrets, permissions, runner routing or approvedShas change.

Closing issue #1076: its only requirement is to add environment to allowedInputs for both reusables. The diff does that for both, so the requirement is met. The issue states no further criteria.

Loosened checks: the new entries widen what the runner-target-contract check accepts (kind 4, allowlist entry added). Issue #1076 names both reusables, the input and the reason, since the check failed for environment: claude-lanes. The spec therefore allows it, and I raise no finding. The wrapper supplied no loosened_check_* lines, so I used fail and no consumer patterns. I did not check the decision-record citation requirement; the loosening passes regardless because the spec names it.

Security scope: whether callers may pass arbitrary environment names is a trust-boundary question. I left it to the security lane.

Other: no path-scoped rule matches the changed file, and the PR body follows the contract rule. No settled-threads, prior-findings or TRUSTED PATHS lines were given. The PR's verification claims (247/247 tests, schema validation, biome) are author-claimed and I did not confirm them.

Loosened checks would be marked: fail (defaults, no resolver run); patterns: 0

Verifier dropped 0 of 0 candidates.

@github-actions

Copy link
Copy Markdown

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

I found no security issues in this pull request, so I'm reporting 0 findings.

What changed. components/runner-policy/policy.json adds environment to allowedInputs for two reviewed reusable-workflow contracts. They are intake-triage.yml (line 42) and pr-review-cli.yml (line 183). Nothing else changes. allowedSecrets and allowedCallerPermissions are untouched for both. So are approvedShas, routing and fixedRunsOn. Skip gate 2 didn't apply, since this is a trust-control file and I read the change in full.

Trust-control check. The change widens which inputs a caller may pass. It doesn't widen who is trusted, any token scope, a kill switch or a merge hold. I checked each of the impacts the severity bar requires:

  • Leak or token-scope growth: none. The policy enforces secrets as an exact map. exactMapsError(secrets, contract.allowedSecrets, …) is at runner-policy.mjs:1011. secrets: inherit is rejected just above it. A caller can't pull in any extra secret by naming an environment. Both contracts keep their exact ${{ secrets.… }} expressions.
  • Compromise: none. runner-policy.mjs:1023 only checks input names against allowedInputs. It doesn't check values. Any environment string a caller passes is therefore accepted. The caller is a repository in this org and can only reference its own deployment environments. The reusable workflow still runs its existing token and secret handling and the existing kill-switch and trusted-trigger checks. I found no path where an untrusted actor chooses that value. The value is written in the caller's workflow file, which is reviewed.
  • Charge: none. The change adds no billed resource.
  • Precedent. maintenance-sync-standards.yml already allows environment the same way (policy.json:103).

Limits of this review.

  • I did not read the ci-workflows reusable workflows at the approved SHAs. I couldn't confirm how they consume inputs.environment. For example, a job-level environment: ${{ inputs.environment }} would make environment-scoped secrets and deployment protection rules apply to that job. The reasoning above assumes that model.
  • I did not consult the instruction exception register. No standing instruction was deleted, narrowed or softened, so it wasn't needed.

critical-findings: 0

@kyle-sexton
kyle-sexton merged commit a767b09 into main Nov 21, 2026
22 checks passed
@kyle-sexton
kyle-sexton deleted the feat/runner-policy-environment-input branch November 21, 2026 10:17
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.

runner-policy: allow the environment input on the ci-workflows intake-triage and pr-review-cli contracts

1 participant