T08 · Insecure Dependencies
- Location
SKILL.md:8- Finding
Unpinned Third-Party Dependencies Allow Unreviewed Package Releases
- Content
View full analysis
=1.12", "pandas>=1.5", "ta>=0.11"] install: - id: pip-install kind: pip packages: ["akshare>=1.12", "pandas>=1.5", "ta>=0.11"] ``` `SKILL.md:36`: ```bash pip install akshare pandas ta ``` `_meta.json:12`: ```json "dependencies": ["akshare>=1.12", "pandas>=1.5", "ta>=0.11"], ``` ### Technical Analysis The project installs dependencies using open-ended minimum-version constraints and also documents installation without any version constraints. It does not provide a lockfile, cryptographic hashes, or another mechanism that guarantees installation of previously reviewed artifacts. Consequently, installation results can change over time. Any future release satisfying these constraints can be selected without a corresponding review of this Skill. Python packages may execute code during build or installation, and their imported modules execute initialization code at runtime. A compromised maintainer account, malicious upstream release, or compromised distribution artifact could therefore introduce code execution through an otherwise normal installation workflow. The runtime script also imports `requests` in `scripts/analysis.py:78` and `scripts/analysis.py:133`, but that dependency is not declared in the Skill metadata. Relying on an undeclared transitive or preinstalled package further reduces reproducibility and dependency provenance. ### Attack Path 1. An attacker compromises an upstream dependency publisher, package repository account, or distribution artifact for `akshare`, `pandas`, or `ta`. 2. The attacker publishes a malicious release whose version satisfies the project's open-ended constraint, such as a release later than the stated minimum. 3. A user installs the Skill dependencies through th ...[truncated 1089 chars]- Remediation
View remediation
pandas== ta== requests== ``` 2. Generate and commit a lockfile containing the complete transitive dependency graph. 3. Use cryptographic artifact hashes and install with `pip --require-hashes` to prevent substitution of unreviewed distributions. 4. Explicitly declare and pin `requests`, because it is directly imported by the runtime script. 5. Install packages only from an approved package index over TLS. Disable unexpected extra indexes to reduce dependency-confusion risk. 6. Review dependency changes before updating the lockfile, including package ownership, release history, build scripts, and known vulnerabilities. 7. Run installation and execution in an isolated virtual environment or container under a non-privileged account with limited filesystem and credential access. 8. Add automated dependency and provenance scanning to the release process. ]]>
