T08 · Insecure Dependencies
- Location
SKILL.md:12- Finding
Unpinned npm Dependency Introduces Supply-Chain Risk
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 12
Vulnerability Type: Unpinned and unaudited third-party dependency installation
Risk Level: MediumCode Snippet:
text ## Setup npm install clawhub clawhub publish /home/cc/.openclaw/workspace/skills/msp-toolkitTechnical Analysis
The setup instructions install the
clawhubnpm package without specifying an exact version, lockfile, or integrity hash. Consequently, the package content retrieved when the command is run may differ from the content available when the skill was audited.npm packages can define installation lifecycle scripts, such as
preinstall,install, andpostinstall, which npm may execute automatically. If the package or one of its transitive dependencies is compromised, replaced, or maliciously updated, following this instruction could execute attacker-controlled code. The audited project does not include the dependency source, a package manifest, or a lockfile with which to verify its behavior or provenance.There is no evidence in the reviewed file that the named package is currently malicious. The vulnerability is the unsafe reliance on a mutable, externally maintained dependency without version or integrity controls.
Attack Path
- An attacker compromises the
clawhubnpm package, its maintainer account, or a transitive dependency. - The attacker publishes a malicious release or introduces a malicious npm lifecycle script.
- A user follows the setup instruction and runs
npm install clawhub. - npm retrieves the mutable package release and resolves its dependency tree.
- Malicious lifecycle code executes with the permissions of the user running npm.
- Depending on those permissions, the payload could access user-readable files, modify the workspace, steal available credentials or tokens, or establish additional malicious behavior.
Impact Assessment
Successful exploitation could provide ...[truncated 550 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Pin
clawhubto an exact, reviewed version rather than installing the latest mutable release. - Add a package manifest and committed lockfile containing registry-resolved integrity metadata.
- Use
npm cifor reproducible installations after validating the lockfile. - Prefer
npm ci --ignore-scriptswhen package lifecycle scripts are not required. - If lifecycle scripts are necessary, audit them and all relevant transitive dependencies before permitting execution.
- Verify the package's registry provenance, maintainer identity, signatures or attestations where available, and published integrity values.
- Run dependency installation as an unprivileged user in an isolated environment with no production credentials.
- Document the expected package version and checksum in
SKILL.md.
- Pin
