sec(mcp): launch pwd is the credential boundary — dir= must never become a token selector #90
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sixfold-space/madtea#90
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Decision
Decision (2026-07-15): an agent must be prevented from crossing outside the launch pwd and using auth tokens it finds in other checkouts on disk. The launch scope is the credential boundary. Credential-borrowing
dir=is an anti-goal, not a missing feature — this inverts #87 (closed by this decision) and puts #59's ask in question (flagged there for decision).Demonstrated the same day: I was in an unauthed clone, needed forge access, and the working path was
cdinto a different, correctly-authed checkout and running CLI ops on its token. Nothing in madtea defines or defends against that: the agent was onecdaway from every identity configured anywhere on the disk it can read. The sanctioned remedies are #88 (know at connect) + #89 (authenticate the launch scope in-session) — never token discovery.Current exposure
dir=tools resolve per-repo credentials for foreign clones. The sanctioned foreign-repo flow (worktree add → finishbranch=, ADR 0019) legitimately depends on this — but its credential scope has never been stated: which tools may resolve a foreign checkout's token, for which operations, and why those and no others.Ask
dir=is a repo/tree selector, never a token selector. Enumerate the explicit carve-out for the worktree→finish foreign-repo flow (exactly which tools, exactly which ops) rather than leaving it implicit.madtea auth loginin the launch dir; #89 once it exists). Same refusal-with-remedy shape as the foreign-primary guards.Needs decision
Acceptance
Refs #87 (inverted by this decision), #59 (needs reconciling), #88, #89 (the sanctioned remedies), ADR 0009, ADR 0019.
ADR 0027 is merged (PR #92, docs/adr/0027-launch-scope-credential-boundary.md) — the 'ADR merged documenting scope + carve-outs' half of this issue's acceptance is done, refined per the owner's follow-up ruling: TWO enumerated crossings (contribute = the ADR 0019 worktree→finish flow; report = issue filing bound to a foreign clone's own origin), both bound to the target checkout's own remote. Remaining here: the refusals themselves and the parity test pinning which tools may resolve foreign credentials. Note #94 before building the refusals: the contribute carve-out is currently BROKEN for repo-config-authed targets (GetConfigForDir never reads dir-local madtea.token), so enforcement work should land the sanctioned resolution shape and the refusals together.
As these are locally cloned repos with code forge credentials the user/agent controls, the limited two exception carve out is an acceptable boundary softening. The very "on-rails" worktree finish flow, and the "need to report a bug" are the only outside pwd paths allowable.