T08 · Insecure Dependencies
- Location
SKILL.md:49- Finding
Mutable npm Package Is Downloaded and Executed Without Integrity Verification
- Content
View full analysis
``` Concrete examples also execute the same mutable package: ```bash npx daxiapi-cli@latest dividend score -c 2.H30269 ``` ```bash npx daxiapi-cli@latest dividend score -c 1.000922 ``` ### Technical Analysis The `npx` command can download a package from the configured npm registry and execute its code immediately. The `@latest` distribution tag is mutable: the package version resolved when the Skill runs may differ from the version that existed when the Skill was reviewed. The project does not include a pinned package version, lockfile, package integrity hash, signature-verification procedure, or vendored and reviewed implementation. The code ultimately executed by these instructions is therefore outside the immutable audit boundary. This creates a supply-chain risk. If the package publisher account, npm package, transitive dependency, or configured package registry is compromised, a future package release could execute arbitrary JavaScript during package installation or CLI startup. The project itself contains no evidence that the current package is malicious; the vulnerability is the unsafe dependency retrieval and execution mechanism. ### Attack Path 1. An attacker co ...[truncated 1483 chars]- Remediation
View remediation
``` 2. Prefer installing the reviewed package as a declared local dependency and commit the corresponding lockfile. Use deterministic installation, such as: ```bash npm ci --ignore-scripts ``` Only use `--ignore-scripts` if the package does not legitimately require lifecycle scripts. 3. Verify package integrity using the lockfile integrity value or a separately trusted checksum before execution. 4. Document the expected npm registry and package publisher. Reject package resolution through untrusted mirrors or user-controlled registry configuration where practical. 5. Review the pinned package and its transitive dependencies, including lifecycle scripts, before approving version updates. 6. Run the CLI with least privilege in a restricted environment. Limit filesystem access, environment variables, and outbound network destinations to those required for the API operation. 7. Ensure `config get token` masks the credential rather than printing the complete token. Prefer an environment variable or operating-system credential store over plaintext configuration. 8. Introduce a controlled dependency-update process so version changes are reviewed, tested, and audited before the pinned version is updated. ]]>
