subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
return pdfmuse except ImportError: print("pdfmuse not found -- installing (one-time)...", file=sys.stderr) subprocess.run( [sys.executable, "-m", "pip", "install", "-q", "pdfmuse"], check=True, )- Confidence
- 91% confidence
- Finding
- The script invokes pip at runtime to install a package from the network whenever pdfmuse is missing. This expands the trust boundary to package indexes and the execution environment, enabling supply-chain compromise or unexpected code execution during what should be a local resume-processing task.
