T01 · Skill Instruction Hijacking
- Location
reflect_critique_revise.py:71- Finding
Untrusted Draft Content Can Hijack the LLM Review and Revision Workflow
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This code-review skill is purpose-aligned, but it can automatically send full code to a configurable LLM endpoint with weak endpoint controls.
Install only if you are comfortable with reviewed code being sent to the configured LLM service. Use a trusted local or HTTPS endpoint, avoid running it automatically on sensitive or proprietary code, and review revised output manually before saving, executing, or deploying it.
reflect_critique_revise.py:71Untrusted Draft Content Can Hijack the LLM Review and Revision Workflow
reflect_critique_revise.py:129Unrestricted LLM Endpoint Configuration Enables Source Disclosure and SSRF
The trigger "after any code generation producing > 30 lines" is broad enough to activate on many normal coding tasks regardless of risk, sensitivity, or user consent. This increases the chance of unintended review passes over proprietary or sensitive output and can create excessive autonomous behavior, cost amplification, and prompt-scope expansion in orchestrated systems.
The standalone trigger phrases include very common user language like "review," "double check," and "is this right," which can cause this skill to activate unexpectedly in ordinary conversations. In an agent system, overly broad auto-invocation can lead to scope creep, unnecessary processing of sensitive code or prompts, and unintended chaining into additional model calls without clear user intent.
The function sends the full task and draft code to a network LLM endpoint, and the default endpoint is plain HTTP. That creates both a confidentiality risk from undisclosed exfiltration of potentially sensitive source code and an integrity risk because unencrypted transport permits interception or modification of prompts and responses in transit.
The endpoint is sourced from an environment variable, so execution context can silently redirect all reviewed code and task data to an attacker-controlled or third-party service without the user's awareness. In a skill that handles arbitrary draft code, this materially increases the chance of secret leakage, source disclosure, and untrusted model output influencing revisions.
Writing output to args.output can overwrite or modify local files, but the code provides no pre-write confirmation and no earlier disclosure in comments or docstrings about this file-writing behavior. The post-write stderr message appears only after the operation has already occurred.