T08 · Insecure Dependencies
- Location
SKILL.md:12- Finding
Unpinned Third-Party Package Installation Creates a Supply-Chain Risk
- Content
View full analysis
- Remediation
View remediation
``` 2. Generate a lockfile containing exact transitive versions and cryptographic hashes. Install with hash enforcement, for example: ```bash python -m pip install --require-hashes -r requirements.lock ``` 3. Publish the expected official package repository, publisher identity, and package-index URL so users can verify provenance. 4. Verify downloaded distributions against approved SHA-256 hashes or signed release attestations before installation. 5. Prefer immutable wheels from a controlled artifact registry rather than resolving mutable dependencies directly during deployment. 6. Run package installation and trading workloads in an isolated virtual environment or container under a dedicated, unprivileged operating-system account. 7. Restrict outbound network access to required exchange and market-data endpoints where operationally possible. 8. Use exchange credentials with the minimum required permissions. Disable withdrawals, apply account or IP allowlists, and use a dedicated trading subaccount where supported. 9. Keep secrets outside strategy source code. Load them from a protected secret manager or environment at runtime, and ensure credential files have restrictive filesystem permissions. 10. Re-audit package source and dependencies before updating pinned versions. Treat dependency updates as security-sensitive changes. ]]>
