T08 · Insecure Dependencies
- Location
SKILL.md:330- Finding
Automatic Installation of Unpinned Third-Party Dependencies
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 330-345
Vulnerability Type: Unsafe dependency installation and supply-chain exposure
Risk Level: MediumVulnerable Code
bash # Step 1: Check if Python is installed python --version || python3 --version # If not installed, install Python: # macOS: brew install python # Linux: sudo apt-get install python3 python3-pip # Windows: Download from python.org # Step 2: Check if required packages are installed python -c "import pypdf" 2>/dev/null || echo "pypdf not installed" python -c "import docx" 2>/dev/null || echo "python-docx not installed" # Step 3: Auto-install missing packages pip install pypdf python-docxTechnical Analysis
The Skill instructs the agent to install
pypdfandpython-docxautomatically from the package index selected by the localpipconfiguration. It does not pin reviewed versions, verify package hashes, use a lockfile, specify a trusted index, or require approval before installation.Dependency installation can execute package-controlled build or installation logic. Moreover, the subsequently imported modules execute package initialization code. The effective code installed by this instruction may therefore change after the Skill has been reviewed.
The instruction also relies on the ambiguous
pipandpythoncommands rather than invoking a known interpreter through an isolated environment. This could install packages into an unintended interpreter or environment.Attack Path
- A threat actor compromises a dependency release, its publisher account, or the package source configured for
pip. - An unattended document-conversion operation determines that one or both dependencies are missing.
- The agent executes
pip install pypdf python-docxwithout a version or hash constraint. - The compromised package is downloaded and installed.
- Malicious package logic executes during installa ...[truncated 662 chars]
- A threat actor compromises a dependency release, its publisher account, or the package source configured for
- Remediation
View remediation
Remediation Suggestions
- Pin every dependency to a reviewed version, preferably through a committed lockfile.
- Require package hashes and install with hash enforcement, such as
pip install --require-hashes -r requirements.txt. - Configure an explicitly trusted package index or an internally controlled package mirror.
- Create a dedicated virtual environment and invoke pip through its exact interpreter, for example
venv/bin/python -m pip. - Require explicit user approval before the first dependency installation, particularly during unattended maintenance.
- Separate dependency provisioning from document processing so scheduled runs cannot modify the runtime environment.
- Scan and periodically review pinned dependencies for known vulnerabilities and unexpected ownership or release changes.
- Run converters in a sandbox with minimal filesystem and network access.
