T08 · Insecure Dependencies
Warning
- Location
- README.md:101
- Finding
- Mutable Third-Party Repositories Are Installed Without Commit Pinning<![CDATA[ ## Vulnerability Details **File Location**: `README.md:101-103` and `README.md:112-114` **Vulnerability Type**: Supply-chain exposure through mutable third-party repositories **Risk Level**: Medium ### Vulnerable Code ```bash # README.md:101-103 git clone https://github.com/christophschuhmann/improved-aesthetic-predictor cd improved-aesthetic-predictor pip install -r requirements.txt ``` ```bash # README.md:112-114 git clone https://github.com/titu1994/neural-image-assessment cd neural-image-assessment pip install -r requirements.txt ``` ### Technical Analysis The installation instructions clone the default branches of two external GitHub repositories without pinning them to reviewed, immutable commit hashes or release tags. The instructions then immediately install each repository's dependency list. Because the effective repository contents and transitive requirements can change after this Skill has been reviewed, the audited package does not fully define the code that users are instructed to trust. If an upstream repository, maintainer account, default branch, or transitive dependency is compromised, later installations can receive content that was not present during this audit. The commands do not directly execute a repository script, but `pip install -r requirements.txt` can install packages that execute build backends or other installation-time behavior. The external requirement files were not included in the audited project, so their complete dependency graphs and integrity controls could not be verified. ### Attack Path 1. An attacker compromises one of the referenced upstream repositories, a maintainer account, or a dependency named in an upstream `requirements.txt`. 2. The attacker modifies the default branch or dependency declarations to introduce a malicious package or build process. 3. A user follows the documented installation procedure and clones the mutable default branch. 4. The user runs `pip install -r requirements.txt`. 5 ...[truncated 828 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin each external repository to a reviewed commit hash: ```bash git clone https://github.com/christophschuhmann/improved-aesthetic-predictor cd improved-aesthetic-predictor git checkout --detach <reviewed-commit-sha> ``` 2. Publish the expected commit hashes in the documentation and verify them before installation. 3. Prefer signed, versioned releases where maintainers provide verifiable signatures or attestations. 4. Audit and lock every transitive dependency from the external repositories. 5. Use an isolated virtual environment or container with minimum filesystem and network privileges. 6. Generate a hash-locked dependency file and install it with: ```bash pip install --require-hashes -r requirements.lock ``` 7. Add automated dependency and repository-integrity monitoring so changes to pinned sources require a new security review. ]]>
