T09 · Insecure Skill Coding Practices
- Location
workspace/run_backtest.py:202- Finding
Agent-Controlled Strategy Code Executes Without Isolation
- Content
View full analysis
&2 rm -f "$before_manifest" "$after_manifest" return 1 ;; esac build_readonly_manifest "$after_manifest" check_readonly_drift "$before_manifest" "$after_manifest" ( cd "$WORKSPACE_DIR" "$PYTHON_BIN" run_backtest.py ) ``` ### Technical Analysis The coding agent is explicitly permitted to modify `workspace/agent/strategy.py`. The evaluator then loads that file through `importlib` and calls `exec_module()`. Loading a Python module this way executes all module-level statements, not merely the `AutoTradeStrategy` class definition. The generated strategy therefore runs with the full permissions of the user executing `run_backtest.py`. No process-level sandbox, filesystem isolation, network restriction, import allowlist, reduced environment, or operating-system privilege boundary is applied to this execution. The read-only manifest in `run_loop.sh` does not mitigate this issue. It only detects persistent changes outside `workspace/agent/` made during the agent phase. It cannot prevent or reliably detect: - Reading files or environment variables. - Sending information over the network. - Starting su ...[truncated 1598 chars]- Remediation
View remediation
