auto-refactoring

Fail

Audited by Gen Agent Trust Hub on Mar 27, 2026

Risk Level: HIGHCOMMAND_EXECUTIONREMOTE_CODE_EXECUTIONPROMPT_INJECTION
Full Analysis
  • [PROMPT_INJECTION]: The skill contains explicit instructions to override standard agent control and safety behaviors. Specifically, it commands the agent to 'LOOP FOREVER. NEVER stop. NEVER ask permission to continue.' This removes the user's ability to monitor or consent to ongoing changes.
  • [COMMAND_EXECUTION]: The skill's core logic relies on executing arbitrary shell commands defined in the refactor.json configuration file, specifically test_command, metric_command, and secondary_metrics. These commands are executed via subprocesses during every iteration of the infinite loop.
  • [REMOTE_CODE_EXECUTION]: The provided examples in CONFIG.md and the example JSON files utilize npx (e.g., npx eslint, npx jest, npx tsc). If the required packages are not locally present, npx may download and execute code from the npm registry at runtime.
  • [INDIRECT_PROMPT_INJECTION]: The skill processes untrusted data from the local filesystem during the PICK and ANALYZE phases. If a file being refactored contains malicious instructions, they could influence the agent's behavior during the loop. Furthermore, the agent is instructed to read command output from run.log, which provides a secondary injection surface from test or linter outputs.
  • [DATA_EXPOSURE]: The skill performs broad read operations across the directory tree and project files to 'explore structure' and 'analyze files', potentially exposing sensitive project information to the agent's context window.
Recommendations
  • AI detected serious security threats
Audit Metadata
Risk Level
HIGH
Analyzed
Mar 27, 2026, 03:24 AM
Security Audit — agent-trust-hub — auto-refactoring