subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
from patchright.sync_api import sync_playwright except ImportError: log("patchright not installed, installing...") subprocess.run([sys.executable, "-m", "pip", "install", "patchright"], check=True) from patchright.sync_api import sync_playwright if not os.path.exists(CHROME_PROFILE):- Confidence
- 92% confidence
- Finding
- The script executes a runtime package installation via pip during normal operation, which introduces a software supply-chain risk and permits execution of arbitrary code from the fetched package and its install hooks. In this skill's context, the install is triggered automatically if a dependency is missing, so simply running the script can cause unreviewed network retrieval and code execution on the host.
