Skip to content

fix(providers): strip ambient GitHub credentials from lane child envs#1088

Merged
agents-squads[bot] merged 1 commit into
developfrom
fix/1084-strip-ambient-credentials
Jul 11, 2026
Merged

fix(providers): strip ambient GitHub credentials from lane child envs#1088
agents-squads[bot] merged 1 commit into
developfrom
fix/1084-strip-ambient-credentials

Conversation

@agents-squads

@agents-squads agents-squads Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

What

Fixes #1084 — provider lane children inherited the operator's gh auth; a GLM run created PR #1082 authored by the personal account.

How

providerCredentialGuard (spread into the provider child env) drops GH_TOKEN/GITHUB_TOKEN and points GH_CONFIG_DIR at an empty per-run temp dir, so neither env tokens nor keychain/config-backed gh auth reach the lane. Provider work lands via harvest + the inbox gate (#966) — lanes have no business pushing or PR-ing as anyone. git's own credential helpers/ssh keys are sandbox-P2 scope (noted in code).

Verified

Unit test on the guard shape + live check: env -u GH_TOKEN -u GITHUB_TOKEN GH_CONFIG_DIR=<empty> gh auth status → 'You are not logged into any GitHub hosts'. Typecheck + build green.

🤖 Generated with Claude Code

… — agent PRs can't ride the operator's identity

A GLM lane run created a PR authored by the operator's personal account
by inheriting ambient gh auth. Provider work lands via harvest + the
inbox gate (#966), never the lane's own pushes/PRs: the child env now
drops GH_TOKEN/GITHUB_TOKEN and points GH_CONFIG_DIR at an empty per-run
dir so keychain-backed gh auth can't ride along either. git credential
helpers / ssh keys are sandbox-P2 scope.

Live-verified: env -u GH_TOKEN -u GITHUB_TOKEN GH_CONFIG_DIR=<empty> gh
auth status → 'not logged into any GitHub hosts'.

Fixes #1084

Co-Authored-By: Claude <noreply@anthropic.com>
@agents-squads agents-squads Bot requested a review from kokevidaurre as a code owner July 11, 2026 07:28
@agents-squads agents-squads Bot enabled auto-merge (squash) July 11, 2026 07:28
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/lib/execution-engine.ts 85.71% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@agents-squads agents-squads Bot merged commit 3ffb30b into develop Jul 11, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant