T08 · Insecure Dependencies
- Location
scripts/token_count.py:252- Finding
Unpinned Third-Party Dependency Installation Recommendation
- Content
View full analysis
- Remediation
View remediation
``` 2. Generate and enforce cryptographic hashes: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` 3. Include hashes for every transitive dependency or use a lockfile generated by a trusted dependency-management tool. 4. Recommend installation inside a dedicated virtual environment: ```bash python3 -m venv .venv . .venv/bin/activate python3 -m pip install --require-hashes -r requirements.txt ``` 5. Pin the package index to an approved source and avoid untrusted additional indexes. 6. Consider removing the installation recommendation entirely. The script already has a functional `chars/4` fallback, so the optional dependency is not necessary for basic operation. 7. Periodically review and deliberately update the pinned version and hashes after checking release provenance and known vulnerabilities. ]]>
