T01 · Skill Instruction Hijacking
- Location
SKILL.md:56- Finding
Mandatory Policy Text Hijacks Agent Workflow and Completion Decisions
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a Solidity scanner/fixer, but it gives itself mandatory workflow authority and can automatically rewrite smart-contract source files without clear user control.
Install only after reviewing the script and running it in a clean disposable branch or sandbox. Do not run it on untrusted projects or production worktrees with secrets in the environment, and treat generated contract edits as unreviewed changes that require manual diff review before use.
SKILL.md:56Mandatory Policy Text Hijacks Agent Workflow and Completion Decisions
auto-bug-finder.js:598Failed Verification Leaves Modified Contract in Place and Deletes Its Backup
auto-bug-finder.js:70Unpinned Tool Installation and npx Execution Expose the Scanner to Supply-Chain Code Execution
Referenced artifact was not completely inspected
Edit the config at the top of `auto-bug-finder.js`:
The comment says a design-changing finding should not be auto-fixed because it may break tests, but the later fix logic still auto-applies the self-escrow check if that finding reaches applyFix. In a code-rewriting agent, this contradiction can silently introduce unauthorized behavior changes, break expected contract semantics, or create denial-of-service conditions for valid workflows.
The module header describes an analyze/find issues/generate fixes/test loop, which suggests producing fixes as outputs. In reality, the code goes beyond generation and actively modifies contracts/AgentEscrow.sol, creates backups, restores prior versions, and writes multiple report artifacts to disk.
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
The script overwrites contracts/AgentEscrow.sol automatically after generating patches, with no user confirmation or safe staging workflow. In the context of an agent skill that edits security-sensitive smart contracts, this is dangerous because a flawed heuristic or false positive can directly alter source code, introduce vulnerabilities, or corrupt the repository state before human review.
The script deletes backup and analysis files automatically during cleanup, without confirmation or retention policy. In this context that is risky because it can remove the only easy rollback artifact (.bak) and erase evidence needed to audit what the agent changed, making unsafe modifications harder to detect and recover from.
The skill description says it scans and fixes code, but it does not prominently warn that it will generate patches and write multiple artifacts into the target project directory. That can surprise users, alter repository state, and create unintended commits or overwrites, especially when run in production or CI contexts. The context makes this more concerning because the skill is positioned as a mandatory security gate and iterative fixer, increasing the likelihood that users run it automatically and trust it to make filesystem changes.
The script creates patch markdown files and later writes sprint results and a final report, which are file-writing operations affecting the workspace. While these writes are part of the tool's behavior, the code does not clearly disclose up front that multiple output files will be created or overwritten during execution.
Detected: suspicious.dangerous_exec