T08 · Insecure Dependencies
Warning
- Location
- skill.md:157
- Finding
- Unpinned and Unreviewable Third-Party npm Package Installation## Vulnerability Details **File Location**: `skill.md:157-177`; repeated in `readme.md:63`, `readme.md:240`, and `readme.md:266` **Vulnerability Type**: Unpinned third-party dependency and unsafe package execution **Risk Level**: Medium ### Vulnerable Code ```bash # Install from npm registry npm install openclaw-intent-router # Verify installation node -e "console.log(require('openclaw-intent-router'))" ``` The documentation also recommends a global installation: ```bash # Install CLI globally npm install -g openclaw-intent-router ``` ### Technical Analysis The instructions install `openclaw-intent-router` without pinning an exact version or verifying a package integrity digest. The audited project contains only `skill.md` and `readme.md`; it does not include the referenced package's source code, `package.json`, lockfile, checksums, or a vendored release. Consequently, the code ultimately installed and executed cannot be verified from this artifact. An npm installation can execute package lifecycle scripts such as `preinstall`, `install`, and `postinstall`. The subsequent `require('openclaw-intent-router')` command also executes the package's module initialization code. Because registry resolution is mutable, the effective code may differ from the content originally reviewed. Global installation can additionally expose a malicious or compromised CLI executable through the user's command search path. This finding does not establish that the referenced package is currently malicious. It identifies a supply-chain boundary that the submitted artifact does not secure or make auditable. ### Attack Path 1. A user follows the documented installation instructions. 2. npm resolves the latest package version allowed by the registry because no exact version is specified. 3. An attacker compromises the publisher account, registry package, or another component in the package's dependency chain. 4. npm downloads the al ...[truncated 1207 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the dependency to a reviewed, exact version rather than relying on mutable registry resolution: ```bash npm install --save-exact openclaw-intent-router@1.0.0 ``` 2. Publish and verify the expected npm integrity digest before installation. 3. Include a lockfile and retain its integrity metadata in the audited artifact. 4. Bundle or vendor the relevant source code so package behavior can be reviewed with the skill. 5. Initially inspect the package without running lifecycle scripts: ```bash npm install --ignore-scripts --save-exact openclaw-intent-router@1.0.0 ``` 6. Review package contents, lifecycle scripts, dependency trees, publisher provenance, and release signatures before enabling scripts or importing the module. 7. Avoid global installation unless operationally necessary. If a CLI is required, run a pinned version in an isolated, least-privileged environment. 8. Perform installation as an unprivileged user and never use administrator or root privileges solely to install this package. 9. Update the documentation to perform verification before installation rather than relying only on `npm audit` after package code may already have executed.
