Skip to content

fix(security): broker production governance token capability - #396

Merged
seonghobae merged 8 commits into
mainfrom
fix/production-governance-token-capability
Aug 16, 2026
Merged

fix(security): broker production governance token capability#396
seonghobae merged 8 commits into
mainfrom
fix/production-governance-token-capability

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Purpose

Close a bounded credential-ingress inconsistency in the production environment governance audit. Protected cd.yml passed ${{ github.token }} directly as GH_TOKEN to scripts/production-environment-governance-audit.mjs, while current Noema governance/operator paths already use the repository's descriptor-safe delegated token capability reader.

Test-first evidence

  • 551dc135adc52bbafc827f14258413d9e2c0aa04 adds a realistic filesystem regression requiring owner-only capability-file reads, symlink refusal, and cd.yml bootstrap through NOEMA_MAINTAINER_TOKEN_PATH rather than direct GH_TOKEN injection.
  • c212560029a8e23fae5f67e237bacb6576cb847c keeps that regression ESM-safe.
  • 233785735a554323bcf0e219e88a525bae9d3106 converges the production audit on scripts/lib/delegated-github-token.mjs, preserving the bounded shell-free gh subprocess and credential redaction.
  • cc558a980879264c4f84a976c2fb0e7502ede2d6 changes only the governance-audit step in cd.yml to bootstrap the job token into an owner-only ephemeral capability file, unset the bootstrap environment value, remove the file on exit, and pass only its non-secret path to the script.
  • 361ba19fe3865a3b062d9d44540b1cb7c2987b10 adds a public-entrypoint regression proving an ambient GH_TOKEN without a capability path fails closed and is not retained in the report.
  • current exact head 16bf12b4f2b9262bc5acfb813b7727834a808746 removes an unnecessary options branch in the collection seam while keeping production credential ingress explicit and injected tests credential-free.

Current gate boundary

The implementation is intentionally still Draft. Exact-head application CI, reviewer-ci and central Security Scan are queued/pending and therefore non-passing. No predecessor run is promoted to the current head and no merge/Ready claim is made before those workflows produce terminal exact-head evidence.

Authority boundary

This PR does not choose the broader KV-vs-short-lived-Actions-token governance decision in #111. It reuses an already-shipped Noema bootstrap pattern and hardened reader; it does not broaden GitHub permissions, change deployment/release authority, modify production environment policy, alter Cloudflare credentials or reviewer/maintainer identities, mutate a central repository, or add a new long-lived secret/writer.

Related: #40, #111.

@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 53 minutes

Limit details: You’ve used all 1 included review currently available under your plan.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: de422640-097c-441d-85ec-93e19bcbceef

📥 Commits

Reviewing files that changed from the base of the PR and between baf2f66 and 88b2e9a.

📒 Files selected for processing (3)
  • .github/workflows/cd.yml
  • scripts/production-environment-governance-audit.mjs
  • test/production-environment-governance-token-capability.test.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@seonghobae
seonghobae marked this pull request as ready for review August 16, 2026 13:10
@seonghobae
seonghobae merged commit 3843c1c into main Aug 16, 2026
16 checks passed
@seonghobae
seonghobae deleted the fix/production-governance-token-capability branch August 16, 2026 13:13
seonghobae added a commit that referenced this pull request Aug 16, 2026
seonghobae added a commit that referenced this pull request Aug 16, 2026
seonghobae added a commit that referenced this pull request Aug 16, 2026
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