T08 · Insecure Dependencies
- Location
requirements.txt:2- Finding
Unbounded Python Dependencies Permit Unreviewed Package Code Execution
- Content
View full analysis
=0.7 # Data visualization (interactive HTML export) plotly>=5.0 # Static charts (SVG/PNG/PDF export) matplotlib>=3.7 # Statistical visualization seaborn>=0.12 # Numerical computing (for box plots, distributions) numpy>=1.24 ``` The Skill also directly recommends installing an unpinned package: ```markdown **Primary: termaid** (`pip install termaid`) ``` ### Technical Analysis Every dependency is specified using only a minimum version constraint. Consequently, future installations can resolve to package releases that did not exist when the Skill was audited. The direct `pip install termaid` instruction has the same issue and does not constrain the package to a reviewed version. Python package installation can process package metadata, build source distributions, install executable entry points, and place importable code in the active environment. The installed libraries are subsequently imported or executed by visualization workflows. A compromised upstream account, malicious future release, or dependency-chain compromise could therefore introduce code that is not represented in this repository. No evidence indicates that the currently named packages are malicious. The vulnerability is the absence of version locking and artifact verification. ### Attack Path 1. An attacker compromises a listed package, one of its transitive dependencies, or its package-publishing account. 2. The attacker publishes a malicious version satisfying the broad lower-bound constraint. 3. A user or Agent follows the documented `pip install -r requirements.txt` or `pip install termaid` instruct ...[truncated 992 chars]- Remediation
View remediation
matplotlib== seaborn== numpy== ``` 2. Generate a lock file containing resolved transitive dependencies. 3. Record package hashes and install with: ```bash python -m pip install --require-hashes -r requirements-lock.txt ``` 4. Replace `pip install termaid` in `SKILL.md` with installation from the locked dependency set. 5. Require installation inside a dedicated virtual environment with no administrator privileges. 6. Periodically update dependencies through a controlled review process that includes vulnerability scanning and verification of package provenance. 7. Prefer binary wheels from trusted indexes and disable unexpected source builds where operationally practical. ]]>
