T08 · Insecure Dependencies
- Location
SKILL.md:204- Finding
Unpinned npm Package Execution Through npx
- Content
View full analysis
- Remediation
View remediation
agent ... ``` Do not use version ranges or tags such as `latest`. 2. Prefer declaring the CLI in a project manifest and committing the associated lockfile. Execute the locked local binary with: ```shell npm exec --offline -- onekey agent ... ``` 3. Use lockfile integrity metadata and a trusted, explicitly configured registry. In controlled environments, mirror the approved package and its transitive dependencies in an internal registry. 4. Document the package's official name, publisher, source repository, expected version, and release-verification procedure so users can detect namespace confusion or package replacement. 5. Review the selected package version and all transitive dependencies before approval. Re-run this review before upgrading. 6. Run the CLI in a restricted environment with minimum filesystem and network permissions. Supply the gateway credential only to the process that requires it and avoid exposing unrelated secrets through inherited environment variables. 7. Rotate `DEEPNLP_ONEKEY_ROUTER_ACCESS` promptly if execution of an untrusted package version is suspected, and review gateway usage records for unauthorized activity. ]]>
