subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
stdin_payload = json.dumps({"action": action, **params}, ensure_ascii=False) try: # v2.6修复(BUG-E2E-020): 添加PYTHONUTF8=1环境变量+errors=replace result = subprocess.run( cmd, capture_output=True, text=True, timeout=300, encoding="utf-8", errors="replace", cwd=str(_PROJECT_ROOT), env={**os.environ, "PYTHONUTF8": "1", "PYTHONIOENCODING": "utf-8"},- Confidence
- 95% confidence
- Finding
- The orchestrator executes skill scripts via subprocess using paths derived from runtime-discovered files under a project root that can be influenced by environment/configuration and external pipeline definitions. Although shell injection is mitigated by argument lists and a skill-name regex, this still creates a code-execution surface where untrusted or tampered skill files can be launched with attacker-controlled parameters.
