T09 · Insecure Skill Coding Practices
- Location
orchestrator.py:417- Finding
Unrestricted Execution of LLM-Generated Python Scripts
- Content
View full analysis
Dict[str, Any]: """Step 6: Execute analysis script.""" # ... if script_path and os.path.exists(script_path): print(f"🚀 Executing analysis script: {script_path}") try: result = subprocess.run( [sys.executable, script_path], capture_output=True, text=True, cwd=str(self.session_dir) ) print(result.stdout) if result.stderr: print("⚠️ Warning:", result.stderr) results["status"] = "Execution successful" results["executed"] = True results["script_output"] = result.stdout ``` ### Technical Analysis The workflow intentionally asks an LLM to generate a complete executable Python script and then permits a caller to execute an arbitrary existing `script_path`. The script is not authenticated, inspected, restricted to the session directory, or validated against an import or ...[truncated 2414 chars]- Remediation
View remediation
