You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ci(claude): apply inspector PR review findings to fork-review job
Cross-applied from the review on the parallel inspector PR
(modelcontextprotocol/inspector#1339). Findings 1, 3, 4, 6 from
modelcontextprotocol/inspector#1339 (comment)
Inspector finding 1 (defense-in-depth): expand strip step beyond .mcp.json.
Renamed "Prepare trusted MCP config" → "Strip fork-supplied CLI config +
write trusted MCP config" and expanded the find sweep to cover the full
set of files that Claude Code (and the action's restoreConfigFromBase)
auto-discover from the working directory:
files: .mcp.json .claude.json .gitmodules .ripgreprc CLAUDE.md CLAUDE.local.md
dirs: .claude .husky
The highest-impact vector in that set is `.claude/settings.json` — its
`SessionStart` / `PreToolUse` hooks execute arbitrary shell BEFORE any
--allowedTools allowlist applies. A fork shipping such hooks could
exfiltrate ANTHROPIC_API_KEY (still in process env at hook time) or
anything else on the runner. The action's restoreConfigFromBase
currently neutralizes this in v1.0.99, but that's an internal
implementation detail; if a future bump narrows or removes that
behavior — the same regression class we SHA-pin against — the hole
silently reopens. Stripping here is defense-in-depth that holds
regardless of what the action does internally. The comment block on
the step now leads with the hooks threat and explains the
defense-in-depth framing.
Inspector finding 3: add concurrency group to the fork-review job.
concurrency:
group: claude-fork-review-${{ github.event.pull_request.number }}
cancel-in-progress: false
Prevents label→unlabel→relabel races from spawning parallel reviews on
the same PR (duplicate comments, doubled API spend, label-removal race).
`cancel-in-progress: false` so an in-flight review finishes and removes
its own label cleanly.
Inspector finding 4: drop `issues: read` from the fork-review
permissions block. Label removal on a PR is covered by
`pull-requests: write` alone — issues: read was dead.
Inspector finding 6 (phrasing): reworded "the only outbound HTTP this
job can make is to modelcontextprotocol.io" → "the only outbound HTTP
Claude can direct". The runner itself still talks to api.anthropic.com,
api.github.com, the Actions cache, etc.; the claim is about Claude's
tool surface, not the runner. Same fix applied to the job-header
threat-model comment.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments