Skip to content

fix(operations): harden runner-audit first-run credential contract - #402

Merged
seonghobae merged 30 commits into
mainfrom
cursor/bc-c0f43bb3-1fdc-4d79-b7a2-caeab65f19ca-647b
Aug 16, 2026
Merged

fix(operations): harden runner-audit first-run credential contract#402
seonghobae merged 30 commits into
mainfrom
cursor/bc-c0f43bb3-1fdc-4d79-b7a2-caeab65f19ca-647b

Conversation

@cursor

@cursor cursor Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Purpose

Land #401 plus the first-run operator contract that review found on 64c6213.

#401 already implements capability-file ingress, exact token redaction, and started_at losing assignment authority. An operator who writes the capability file with echo or printf '%s\n' still fails closed on a trailing newline and does not see the required Actions workflow-run/job read scope. Empty-secret redaction was also a reuse landmine, and the test gh shims interpolated expected tokens into shell.

What to do with this PR

Prefer this branch over merging #401 at 64c6213 or #394 at f4a4bc9. This head is #401 plus one first-run hygiene commit (fddec97). Do not merge #401 or #394 once this PR exists unless those heads are fast-forwarded to include this commit.

Operator next action after merge

  1. Materialize a short-lived Actions workflow-run/job read token with printf '%s' into an owner-only file.
  2. Export NOEMA_MAINTAINER_TOKEN_PATH to that file. Do not export GH_TOKEN.
  3. Run npm run operations:runner-assignment against explicit current-head run IDs.
  4. Treat PASS as runner-assignment evidence only. It is not required Check, formal review, or merge authority.

Test-first evidence

Local Node 24.19.0 / npm 11.17.0: eight runner-assignment and credential-ingress files, 50 tests passed; tsc --noEmit passed.

Added coverage:

  • empty/missing secret leaves diagnostic text unchanged
  • echo-style trailing newline fails closed with the control-character message
  • doctoring names echo/printf '%s\n' as the wrong write path and cites GitHub fine-grained PAT permissions

Authority boundary

This does not close issue #30. It does not change GitHub permissions, reviewer/maintainer identities, workflow authority, release/deployment authority, or any central repository. Exact-head checks on this successor are not GREEN until they terminate on this SHA.

Related: #401, #394, #30.

Open in Web View Automation 

seonghobae and others added 24 commits August 16, 2026 18:11
Name capability-file ingress, exact token redaction, and started_at
losing assignment authority in Unreleased so operators can apply the
hardened production command without treating PASS as merge authority.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
Guard empty-secret redaction, keep test gh shims from interpolating
tokens, and tell operators that echo-style newlines fail closed.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
Preserve the protected-main workflow-registry disablement slice while retaining runner-assignment credential hardening and both Unreleased entries.
@seonghobae
seonghobae marked this pull request as ready for review August 16, 2026 18:02
@cursor

cursor Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor Author

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

Comment thread test/actions-runner-assignment-cli.test.ts Fixed
@seonghobae
seonghobae merged commit db21df2 into main Aug 16, 2026
15 checks passed
@seonghobae
seonghobae deleted the cursor/bc-c0f43bb3-1fdc-4d79-b7a2-caeab65f19ca-647b branch August 16, 2026 20:59
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.

2 participants