T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:28
- Finding
- Unpinned Third-Party Dependency Installation## Vulnerability Details **File Location**: `SKILL.md`, line 28 **Vulnerability Type**: Unpinned third-party dependencies and unrestricted transitive dependency resolution **Risk Level**: Medium ### Vulnerable Code ```bash pip install yfinance mibian pandas numpy # Install dependencies ``` ### Technical Analysis The installation command retrieves the latest available versions of four third-party packages and their transitive dependencies. It provides no exact version constraints, cryptographic hashes, lockfile, reviewed package index, or isolated-environment requirement. Consequently, the code installed when this instruction is followed can differ from the code that existed when the Skill was audited. Package installation hooks and imported package initialization code execute with the permissions of the user running `pip` or the scripts. A compromised package release or transitive dependency could therefore introduce arbitrary code into the execution environment. The dependency declaration is also incomplete: `scripts/greeks_calc.py` imports `scipy.stats.norm`, but `scipy` is absent from the documented installation command. Users may respond to the resulting import error by installing an unreviewed package manually, further weakening dependency control. This finding concerns supply-chain exposure; the audit found no evidence that the currently named packages are malicious. ### Attack Path 1. An attacker compromises the publishing account, build pipeline, or upstream repository of one of the named or transitive packages. 2. The attacker publishes a malicious release to the package index. 3. A user or agent follows line 28 of `SKILL.md` without version or hash restrictions. 4. `pip` resolves and installs the malicious release or compromised transitive dependency. 5. Malicious package code executes during installation or when a project script imports the package. 6. That code operates with the permissions of the invoking user and can access resources ava ...[truncated 556 chars]
- Remediation
- ## Remediation Suggestions 1. Create a dependency manifest containing exact, reviewed versions for every direct dependency, including `scipy`. 2. Generate and commit a lockfile that records all transitive dependency versions. 3. Record cryptographic hashes and require their verification during installation, for example: ```bash python -m venv .venv . .venv/bin/activate python -m pip install --require-hashes -r requirements.txt ``` 4. Avoid floating version ranges in production or agent-executed installation workflows. 5. Install dependencies only from an approved package index over authenticated TLS, and explicitly configure the permitted index rather than relying on ambient `pip` settings. 6. Run the scripts and dependency installation in an isolated, non-privileged environment with minimal filesystem, credential, and network access. 7. Add automated dependency auditing and update dependencies through reviewed pull requests. 8. Document the supported Python version and test the locked dependency set in CI to prevent users from making ad hoc dependency substitutions.
