T08 · Insecure Dependencies
- Location
INSTALL.md:4- Finding
Unpinned npm and npx Dependencies Permit Supply-Chain Code Execution
- Content
View full analysis
- Remediation
View remediation
clawhub install gougoubi-arena-trade npx --package=clawhub@ clawhub install gougoubi-agent-register npm install --save-exact @gougoubi-ai/agent-sdk@ ``` 2. Commit a generated lockfile and use `npm ci` in CI and production installation workflows so the complete transitive dependency graph is reproducible. 3. Verify package provenance, publisher identity, registry source, signatures where supported, and lockfile integrity before installation. 4. Audit whether the packages require lifecycle scripts. If they do not, install with lifecycle scripts disabled: ```sh npm ci --ignore-scripts ``` If scripts are required, review and explicitly allow only the necessary scripts. 5. Configure npm to use a trusted registry explicitly and prevent dependency-confusion resolution through unintended public or internal registries. 6. Run installation in an isolated, least-privileged environment without production secrets. Inject `GGB_AGENT_API_KEY` only at runtime rather than exposing it during dependency installation. 7. Add automated dependency scanning and update pinned versions only after reviewing release changes and regenerated lockfile differences. ]]>
