T08 · Insecure Dependencies
- Location
SKILL.md:588- Finding
Unpinned Third-Party Package Execution Through npx
- Content
View full analysis
- Remediation
View remediation
agent ... ``` Do not use version ranges or floating tags such as `latest`. 2. Prefer declaring the package in `package.json`, committing the corresponding lockfile, installing with `npm ci`, and invoking the verified local binary: ```bash npm ci --ignore-scripts ./node_modules/.bin/onekey agent ... ``` 3. Verify the authoritative package name, registry, publisher identity, provenance, and package signatures before documenting it. 4. Enforce lockfile integrity and use an approved registry configuration. Review dependency changes before updating the pinned version. 5. Determine whether installation scripts are required. If they are not, disable them with `--ignore-scripts` to reduce exposure to malicious lifecycle hooks. 6. Run the CLI in a restricted environment or container with minimal filesystem access and no unrelated secrets. Pass only the credential required for the operation. 7. Use a narrowly scoped, revocable API key with usage limits. Rotate the key immediately if an untrusted package version may have been executed. 8. Document the expected package version and checksum so users can verify the retrieved artifact before execution. ]]>
