T08 · Insecure Dependencies
- Location
references/publish.md:8- Finding
Unpinned Global Installation of a Third-Party CLI
- Content
View full analysis
Vulnerability Details
File Location:
references/publish.md, lines 8-10
Vulnerability Type: Unpinned third-party dependency installed globally
Risk Level: MediumVulnerable Code:
bash npm i -g clawhub clawhub login clawhub whoamiTechnical Analysis
The publishing instructions install the latest available version of the third-party
clawhubnpm package globally without pinning an audited version or verifying package integrity. An npm installation may execute package lifecycle scripts with the privileges of the invoking user. The global installation also changes system-wide user tooling rather than isolating the dependency to the project.Because the selected package version can change after this skill has been reviewed, compromise of the package, its dependency chain, or its publishing account could introduce attacker-controlled code. The subsequent authentication command may expose newly created ClawHub credentials or session data to a compromised CLI.
These commands are part of maintainer publishing guidance rather than the skill's declared read-only file-discovery behavior, increasing the exposed supply-chain surface without being required during normal skill operation.
Attack Path
- An attacker compromises the
clawhubnpm package, one of its transitive dependencies, or an authorized package-publishing account. - The attacker publishes a malicious version or adds a malicious installation lifecycle script.
- A maintainer follows
references/publish.mdand runsnpm i -g clawhub, which resolves the mutable latest package version. - npm downloads the compromised package and may execute its lifecycle code with the maintainer's user privileges.
- The maintainer then runs
clawhub login; a compromised CLI can capture authentication material or misuse the authenticated session. - The malicious package can access resources available to that user and alter globally installed ...[truncated 486 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Remove maintainer-only publishing instructions from the runtime skill package when they are not needed for normal operation.
- Pin the CLI to a specific reviewed version, for example
clawhub@<exact-version>, and update it only through a controlled review process. - Use the package manager lockfile and integrity metadata where applicable, and verify the package against official ClawHub documentation and publisher identity.
- Prefer a project-local, isolated installation over
npm i -gto reduce system-wide impact. - Inspect package contents and lifecycle scripts before installation. Where compatible with the trusted installation procedure, disable lifecycle scripts using
--ignore-scripts. - Run publishing operations from a restricted environment with minimal filesystem access and short-lived, least-privilege credentials.
- Separate installation and authentication, and verify the installed executable's provenance before running
clawhub login.
