T08 · Insecure Dependencies
- Location
requirements.txt:1- Finding
Unpinned and Unhashed Third-Party Dependencies
- Content
View full analysis
- Remediation
View remediation
scipy== ``` 2. Generate a fully resolved lock file that includes transitive dependencies and SHA-256 hashes. Install with hash enforcement, for example: ```bash python -m pip install --require-hashes -r requirements.lock ``` 3. Generate and review the lock file using a dependency-management tool such as `pip-tools`, while retaining the source requirements separately if needed. 4. Configure an explicit trusted package index and prevent unintended fallback to additional indexes. Use a controlled internal mirror for higher-assurance deployments. 5. Run dependency vulnerability and provenance checks in CI, and review dependency updates before regenerating the lock file. 6. Install dependencies inside an isolated, least-privilege virtual environment or container. Do not perform installation as root or from an account with access to unrelated secrets. 7. Record the locked dependency set with each release so that analysis behavior and resulting statistical outputs remain reproducible. ]]>
