Claude Code Action: malicious .mcp.json in PRs enables RCE and secret exfiltration on GitHub Actions runners
Untrusted pull requests can supply a malicious .mcp.json in the working directory; when a privileged user triggers anthropics/claude-code-action on the PR, enableAllProjectMcpServers loads all project MCP servers without sandbox or approval checks — yielding code execution on the Actions runner and exfiltration of any secrets the workflow can reach. The attack chain is: checkout PR head → read .mcp.json → run arbitrary MCP server process under workflow permissions. Any public repository using this action on bare pull_request triggers is exposed today. Switch to pull_request_target, gate behind a maintainer-approval label, and pin the action to a verified commit SHA rather than a mutable version tag.