T09 · Insecure Skill Coding Practices
- Location
references/phase-e-execution.md:11- Finding
LLM-Generated Experiment Code Is Executed Without an Enforced Sandbox
- Content
View full analysis
&1 ``` 3. Capture JSON metrics from stdout. 4. Write stdout, stderr, exit code, and duration to `stage-12/runs/run-1.json`. 5. Record errors if execution fails or times out. 6. Push a summary describing whether execution succeeded. ### Timeout and Security - Maximum execution time: 300 seconds. - Network access is not allowed. - Writing outside the experiment directory is not allowed. ``` The preceding generation phase validates only Python syntax: ```markdown ### Code Validation Loop After generating code: 1. Run `python3 -c "import ast; ast.parse(open('experiment.py').read())"` to check syntax. 2. If syntax errors occur, send the error to the LLM for repair, for at most three rounds. 3. Optionally perform a 30-second trial run in the sandbox. ``` ### Technical Analysis The generated `experiment.py` and associated Python files are untrusted executable content. They are produced by an LLM from research plans derived from user input and externally retrieved literature. The documented validation uses `ast.parse`, which only establishes that a file is syntactically valid Python. It does not ...[truncated 3090 chars]- Remediation
View remediation
