feat(mcp): add one-shot auth descriptor handoff - #158
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs real behavior proof before merge. Reviewed August 17, 2026, 5:53 PM ET / 21:53 UTC. ClawSweeper reviewWhat this changesAdds one-shot MCP OAuth credentials from an inherited descriptor plus temporary MCP URL and channel-type overrides for Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 9 items remain Keep open: the PR still sends a one-shot bearer credential to any endpoint supplied through Priority: P1 Review scores
Verification
How this fits togetherThe sync command resolves MCP connector settings and OAuth credentials, then supplies them to the HTTP MCP client that retrieves Slack data into the local archive. These new flags alter that credential and endpoint selection for one invocation. flowchart LR
Parent[Trusted parent process] --> CLI[Sync command]
CLI --> Overrides[Temporary MCP settings]
Overrides --> Auth[Credential resolution]
Auth --> Client[HTTP MCP client]
Client --> Archive[Slack archive sync]
Decision needed
Why: This determines the permanent bearer-token audience boundary and needs maintainer security intent. Before merge
Findings
Agent review detailsSecurityNeeds attention: The PR combines bearer-token handoff with caller-selectable HTTP endpoint routing. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep descriptor-backed credentials bound to an approved HTTPS MCP endpoint, then provide a redacted local trace proving one-shot consumption and a successful authenticated sync. Do we have a high-confidence way to reproduce the issue? Yes, from source: invoke sync with both descriptor and URL flags; credential resolution prefers the descriptor and the MCP client sends it as a bearer header to that URL. A live transport trace has not been provided. Is this the best way to solve the issue? No; the current approach needs an enforceable endpoint/audience boundary before pairing a descriptor token with an endpoint override is safe. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: not found in the target repository. Codex review notes: model internal, reasoning high; reviewed against 526888485c56. LabelsLabel justifications:
EvidenceSecurity concerns:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
d744e23 to
6a41db4
Compare
|
Maintainer triage: NEEDS-PETER. Recommend CLOSE in its current form unless Peter explicitly wants this new credential-handoff API. Left open; no implementation changes made. The code introduces three CLI flags, gives an inherited descriptor precedence over ambient MCP credentials, and lets the same invocation replace the HTTP endpoint. This is a new auth/API contract, not a repair to existing behavior. The descriptor read is bounded to 64 KiB and closed after consumption, but the token-to-endpoint trust contract remains a product/security decision. A trusted parent intentionally choosing both values is not by itself proof of an exploit; the question is whether endpoint control and credential selection are expected to cross a trust boundary. Decision needed: approve or decline the descriptor workflow; if approved, define whether the parent may choose arbitrary endpoints or credentials must be bound to configured/approved HTTPS destinations, and define credential-read cancellation behavior when the parent never closes the pipe. Then validate a real authenticated MCP sync from the intended parent, with secrets redacted, including successful one-shot consumption and failure/cancellation cases. The submitted tests do not provide that integration proof. No owner approval was found in the comments. |
Summary
The descriptor is consumed and closed, bounded to 64 KiB, and takes precedence over ambient connector environment variables. This keeps short-lived user tokens out of argv, environment variables, and named files while preserving Slacrawl's existing incremental upserts and thread repair.
Validation
GOWORK=off go test ./internal/slackmcp ./internal/cliGOWORK=off go test -count=1 ./...make checkpassed module verification, formatting, vet, vulnerability scan, dead-code analysis, tests, and CLI smoke; the final release snapshot step could not run locally becausegoreleaseris not installed