T08 · Insecure Dependencies
- Location
SKILL.md:23- Finding
Unpinned External Trading SDK Creates a Supply-Chain Risk
- Content
View full analysis
- Remediation
View remediation
``` 2. Commit a lockfile containing npm integrity metadata and require reproducible, frozen installations in deployment: ```bash npm ci ``` 3. Record the exact source commit reviewed and verify that the published npm archive is reproducibly built from that commit. 4. Consider vendoring the reviewed implementation into the audited artifact so security review covers the code that handles credentials, signatures, fees, swaps, and orders. 5. Verify package provenance and signatures where supported. Download and inspect the exact npm tarball rather than relying only on the linked GitHub repository. 6. Disable npm lifecycle scripts where they are not required: ```bash npm ci --ignore-scripts ``` If scripts are required, review each script before permitting execution. 7. Run the SDK under a dedicated, least-privileged operating-system account with tightly restricted filesystem and network access. 8. Use a dedicated trading wallet with limited funds and permissions. Do not reuse a high-value wallet or expose unrelated credentials to the process. 9. Add transaction-policy enforcement outside the dependency, including limits on markets, order size, leverage, slippage, fee recipients, collateral transfers, and destination contracts. 10. Require human confirmation of the final serialized transaction—not merely the SDK-generated quote—before signing financially sensitive actions. ]]>
