Repository navigation
feat(agents): enforce scoped run token for investigate MCP - #2078
Conversation
Observe mode proved the path on live runs: every exchange and revoke succeeded, and the shadow scope refused nothing. In enforce the investigator's MCP connection uses its own scoped, run-bound token instead of the shared admin credential, and a failed exchange fails the run rather than falling back. The pod's REST clients are unchanged.
|
Claude finished @mashkovd's task in 36s —— View job Review complete ✅
Diff analyzed: This is a trivial, single config-value change (env var) with no template/RBAC/resource logic touched, so per review policy it's approved without inline findings:
Rollback path (set back to |
Antigravity (agy) review — informationalModel: gemini-3.8-flash-high · commit No significant issues found. |
Least-privilege credentials for agent runs, stage 1 step 2 (mctlhq/mctl-agents#737): switch the issue investigator's MCP connection from
observetoenforce.Change
cwft-mctl-agents-investigate.yaml:MCTL_RUN_TOKEN_MODE: observe→enforce.In
enforce(mctl-agents 1.90.0,orchestrator/run_token.py):issue-investigator, scopeinvestigate, expiry no later than the Workflow's deadline) and connects MCP with it instead of the shared credential;investigatescope (read tools, the run's own work item) with 403 and anagent_scope.deniedaudit row;Evidence from observe (since #2059, 2026-10-22)
agent_run_token.exchangeandagent_run_token.revokeboth succeeded each time; the first run was followed end to end and succeeded.mctl_agent_scope_decisions_total{mode="shadow",scope="investigate"}: 18 REST and 1 MCP decisions, allallow, 0deny.Not in this PR
The pod's own REST clients still use
MCTL_TOKEN; moving them, the other agent surfaces and revoking the static credential are tracked in mctlhq/mctl-agents#752.Rollback
Set the value back to
observe(no image change needed).Refs mctlhq/mctl-agents#737
🤖 Generated with Claude Code