T08 · Insecure Dependencies
- Location
SKILL.md:44- Finding
Unpinned and Overly Broad Third-Party Dependencies
- Content
View full analysis
- Remediation
View remediation
" ``` 2. **Use hash-verified lock files** - Generate a lock or requirements file containing exact versions and cryptographic hashes for all transitive dependencies. - Install with hash enforcement: ```bash pip install --require-hashes -r requirements.txt ``` 3. **Remove development dependencies from normal installation** - Do not recommend the `dev` extra to ordinary users. - Keep testing, linting, and packaging dependencies in a separate development-only lock file. 4. **Separate optional functionality** - Make `torch`, `tensorflow`, `fastai`, CLI support, and transfer acceleration separate opt-in installation profiles. - Document the minimum package set required for each operation. 5. **Review and automate dependency updates** - Review changelogs and provenance before updating pins. - Run vulnerability and license scanning against the complete locked dependency graph. - Update pins through controlled pull requests rather than resolving current releases during installation. 6. **Reduce runtime credential exposure** - Use fine-grained, repository-scoped Hugging Face tokens. - Avoid exposing write-capable tokens to dependency installation processes. - Perform dependency installation in an isolated build stage that does not contain `HF_TOKEN`. ]]>
