AGENTCFG-06: Oversized, Obfuscated or Binary Payload in Agent Folder
๐ด High ยท Coding-Agent Configuration
Detects payloads that reviewers and GitHub code search cannot see in coding-agent and IDE folders and in the GitHub folder, plus any script an auto-run hook executes. Folders: .claude, .gemini, .cursor, .vscode, .codex, .agents, .windsurf, .continue and .github/. Signals: files over 384 KiB (not indexed by code search), large decimal-array blobs decoded at run time (fromCharCode / eval / Function wrappers), packed single-line scripts, native or executable binaries (ELF, Mach-O, PE, .node addons, wasm) and other opaque binary files. Images, fonts and media are ignored, and so are compiled bundles of JavaScript GitHub Actions (a dist/ file under .github/actions/ next to an action.yml) unless a hook runs them. Severity policy: high for oversized or obfuscated scripts and native binaries; medium for oversized data files, packed scripts and other opaque binaries; critical when an auto-run hook or folder-open task executes the file (AGENTCFG-05).
Detailsโ
| Field | Value |
|---|---|
| Rule ID | AGENTCFG-06 |
| Severity | High |
| Category | Coding-Agent Configuration |
| Tags | agent-hooks, testmetest, supply-chain |
| Aliases | AGENTHOOK-02 |
Remediationโ
Remove the file, or move generated and vendored artifacts out of agent and IDE folders and build them in CI from reviewed source. Never commit binaries or packed scripts next to agent settings. If the file was not added on purpose, treat the repository as compromised: check recent commits and collaborators, remove persistence before rotating tokens, and rotate GitHub, npm and cloud credentials of anyone who opened it.
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)