project-code-style-analyzer
Fail
Audited by Gen Agent Trust Hub on Jul 13, 2026
Risk Level: HIGHCOMMAND_EXECUTIONDATA_EXFILTRATIONPROMPT_INJECTION
Full Analysis
- [PERSISTENCE]: The skill installs a Node.js script as a PreToolUse hook in
.claude/hooks/inject-code-style.jsand modifies the project's.claude/settings.jsonto ensure this script executes every time the agent performs edit or write operations. - [DYNAMIC_EXECUTION]: The skill dynamically creates an executable script by interpolating runtime-detected file extensions into a predefined template (
references/inject-code-style.template.js) and writing the result to the local filesystem. - [COMMAND_EXECUTION]: The instructions require the agent to execute shell commands to validate and test the newly generated script, including
node --checkand running the script with mocked JSON input to verify its output behavior. - [INDIRECT_PROMPT_INJECTION]:
- Ingestion points: The skill reads project source code and linter configuration files across the repository to generate
docs/PROJECT-CODE-STYLE.md(Step 1 and 2 inSKILL.md). - Boundary markers: The injected context generated by the hook (
references/inject-code-style.template.js) lacks protective delimiters or instructions for the agent to ignore potentially malicious directions embedded in the codebase-derived style guide. - Capability inventory: The agent possesses extensive capabilities including file system access and command execution, which are active when the hook injects content during development tasks.
- Sanitization: Content from the analyzed codebase is merged directly into the markdown documentation without validation or escaping, and subsequently injected into the agent's active context via the generated hook.
Recommendations
- AI detected serious security threats
Audit Metadata