AGENTCFG-07: Multi-Tool Auto-Run Harness Arms the Same Script
๐ด High ยท Coding-Agent Configuration
Detects one repository script wired to run from two or more coding-agent or IDE tool families (Claude Code, Gemini CLI, Cursor, VS Code): settings hooks, .cursor/hooks.json, VS Code folder-open tasks, project MCP server commands (.cursor/mcp.json, .mcp.json, .vscode/mcp.json) and Cursor rules (.mdc) that tell the agent to run it. At least one of the entries must be an auto-run hook or folder-open task. Arming the same script in every tool a victim might use is the cross-tool pattern that turns cloning into code execution. Severity policy: high for two tool families; critical for three or more, or when the script is a hidden payload (AGENTCFG-06).
Detailsโ
| Field | Value |
|---|---|
| Rule ID | AGENTCFG-07 |
| Severity | High |
| Category | Coding-Agent Configuration |
| Tags | agent-hooks, testmetest, supply-chain |
| Aliases | AGENTHOOK-03 |
Remediationโ
Remove the auto-run entries and make the script an explicit, documented step. If the entries were not added on purpose, treat the repository as compromised (see AGENTCFG-06) and audit the commits that added them.
Referencesโ
- Anthropic, Claude Code hooks reference (SessionStart and other hook events)
- Visual Studio Code, Tasks: run behavior (runOptions.runOn "folderOpen")
- GitHub Docs, code search limitations (files larger than 384 KB are not indexed)