subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
try: with tempfile.NamedTemporaryFile(mode='w', suffix='.json', delete=False) as f: out = f.name result = subprocess.run( [sys.executable, str(checker), str(skill_dir), "--output", out], capture_output=True, text=True, timeout=30 )- Confidence
- 92% confidence
- Finding
- The updater spawns an external Python script (`permission_checker.py`) via `subprocess.run`, which creates an execution boundary to another file without any integrity check, explicit trust validation, or user confirmation at the call site. In a skill update/check tool, executing another local script is risky because compromise or replacement of that helper script turns a documentation/update workflow into arbitrary code execution with the current user's privileges.
