T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:16
- Finding
- Unpinned and Unverified Third-Party Dependencies<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 16–43 **Vulnerability Type**: Unpinned packages and mutable source dependency without integrity verification **Risk Level**: Medium ### Vulnerable Code ```bash # conda installation conda install -c bioconda minimap2 # or compile from source git clone https://github.com/lh3/minimap2.git cd minimap2 && make ``` ```bash # conda installation (recommended) conda install -c bioconda syri # pip installation pip install syri ``` ```bash # conda installation conda install -c bioconda plotsr # pip installation pip install plotsr ``` ```bash pip install biopython ``` ### Technical Analysis The installation instructions do not pin exact package versions, immutable Git commit hashes, release tags, or artifact checksums. Consequently, Conda and pip resolve whichever compatible package versions are available when the commands are run. The source installation is additionally based on the mutable default branch of a remote Git repository. The subsequent `make` command executes build rules obtained from that repository without verifying a trusted commit or release signature. The named repository and packages are consistent with the Skill's declared bioinformatics purpose, and the audited file contains no evidence that these upstream sources are currently malicious. The weakness is that the effective installation and build content can change after the Skill has been reviewed. A compromised upstream project, package registry account, distribution channel, or transitive dependency could therefore introduce attacker-controlled code. ### Attack Path 1. An attacker compromises an upstream repository, package publisher account, registry release, or transitive dependency used by minimap2, SYRI, plotsr, or Biopython. 2. The attacker publishes a modified package version or changes content on the repository's default branch. 3. A user or agent follows the unpinned installation instructions in `SKILL.md`. ...[truncated 1282 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin exact versions for all Conda and pip dependencies rather than allowing installation of the latest available release. 2. Use an environment lock file, such as a fully resolved Conda lock file, and review it before distribution. 3. For pip packages, use a locked requirements file with SHA-256 hashes and install with hash enforcement: ```bash python -m pip install --require-hashes -r requirements.txt ``` 4. Clone an immutable, reviewed minimap2 commit instead of the mutable default branch: ```bash git clone https://github.com/lh3/minimap2.git cd minimap2 git checkout --detach <reviewed-full-commit-hash> ``` 5. Verify the checked-out commit or release artifact using a trusted signature or independently published checksum before running `make`. 6. Review and lock transitive dependencies, not only the four directly named tools. 7. Perform installation in a dedicated, non-privileged virtual or Conda environment. Do not run installation or build commands as root. 8. Where practical, build dependencies in a restricted container or sandbox with limited filesystem access and no access to production credentials. 9. Periodically update pinned versions through a controlled process that includes source review, integrity verification, and compatibility testing. ]]>
