Skip to content

fix(api): require mutation grants for GitHub write tokens - #27828

Merged
teamleaderleo merged 2 commits into
feat-cmux-nextfrom
lane/c5-github-grants
Oct 30, 2026
Merged

teamleaderleo merged 2 commits into
feat-cmux-nextfrom
lane/c5-github-grants

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

GitHub token minting now enforces the install grant before any token cache lookup or provider mint. Every non-VM install request requires read; any requested GitHub write permission also requires mutate-own. The VM path retains its existing live-machine ownership check and write access, so no existing caller loses write.

Leo's request:

"there's the GitHub connector integration MCP thing in the ChatGPT chat mode, which I think is quite convenient. So that kind of setup flow, I think, should be doable, should be possible. Like just having our own MCP endpoint, I don't think is too big of a deal ... the second edition, second version of MCP, everybody kind of, you know, unanimously-ish thinks it's pretty good"

Verification:

  • Red on tests-only head 1619275f5b3a4d40116d4cc9be64a8e59e9b660c: github-token.test.ts had 7 passing cases and 1 failure because a read-only grant received HTTP 200 for a mixed read/write request (run 40990137138).
  • Green on final head 204474add9ff59a6ae0152b0829a5143a5807b63: all 8 github-token.test.ts cases passed (run 40991900571).
  • API typecheck passed at the final head (run 41063462701).
  • Independent review: Review (codex gpt-6-astra): SHIP at 204474add9ff59a6ae0152b0829a5143a5807b63.
  • Full-check release-notary and Guard status failures are base failures; the changed backend test and typecheck are green.

Changelog

Fixed GitHub write token requests exceeding an install's grant.

Agent session: agent session

@github-actions github-actions Bot added the risk:low Risk tier (docs/ci/risk-tiers.md) label Oct 30, 2026
@blacksmith-sh

blacksmith-sh Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Found 1 test failure on Blacksmith runners:

Failure

Test View Logs
test_every_listed_hook_is_one_glaeda_released_with_the_check (main.SigningHooksInSt
epWithGlaedaTests.test_every_listed_hook_is_one_glaeda_released_with_the_check)/
test_every_listed_hook_is_one_glaeda_released_with_the_check (main.SigningHooksInSt
epWithGlaedaTests.test_every_listed_hook_is_one_glaeda_released_with_the_check)
View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Hosted regression at 1619275: github-token.test.ts has 7 passing cases and read-only write failing (200 vs 403), run 40990137138. Preserve VM writes behind the live-machine ownership gate.

Agent-Session: https://cmux.com/deeplink/agent?id=aid-7b191c38902b8b818181
@github-actions github-actions Bot added risk:normal Risk tier (docs/ci/risk-tiers.md) and removed risk:low Risk tier (docs/ci/risk-tiers.md) labels Oct 30, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex-review-box/gpt-6-astra high, lane-place): SHIP at 204474a

SHIP

  1. No correctness or security findings.

@teamleaderleo
teamleaderleo marked this pull request as ready for review October 30, 2026 13:45
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review 204474a: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr27828 -f ref=lane/c5-github-grants -f platform=macos -f backend_mode=local

The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/41070142155 at 99e8529 failed: cmux-next generated files (shared build).
Those jobs last passed at 483fbe3. This pull request is one of 4 merged since: #27828, #28258, #28334, #28088.
If the failure is in your change, fix forward on feat-cmux-next. Pull requests run only the tiers their paths reach (docs/ci/cmux-next-tiers.md); label a batch PR full-ci to run them all before merging.

@cmux-bot cmux-bot 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.

cmux-bot approves 204474a: an independent review passed this exact head (review box review-27828-c5-resume receipt by teamleaderleo). A push needs a new review; a later BLOCK at this head dismisses this approval.

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

This branch was previously deployed

1 inactive deployment
ci-routing-agent — 204474ad Deployed Oct 30, 2026 by teamleaderleo via cmux-tui tree preflight #79755
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant