subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
from machins import Machins except ImportError: import subprocess subprocess.check_call( [sys.executable, "-m", "pip", "install", "machins==0.1.0", "-q"], stdout=subprocess.DEVNULL, )- Confidence
- 94% confidence
- Finding
- The code automatically invokes pip to install a package at runtime when the import fails. Even though the package name is pinned, executing package installation from a skill expands the attack surface, enables unexpected code execution during install/import, and bypasses normal dependency review and deployment controls.
