T08 · Insecure Dependencies
- Location
SKILL.md:15- Finding
Unpinned Global Installation of a Third-Party npm Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 5 and 15
Vulnerability Type: Unpinned third-party dependency installed globally
Risk Level: MediumVulnerable Code
At line 5, the skill metadata specifies an npm dependency without an exact version:
yaml metadata: {"clawdbot":{"emoji":"✍️","requires":{"bins":["balzac"],"env":["BALZAC_API_KEY"]},"install":[{"id":"npm","kind":"npm","package":"balzac-cli","bins":["balzac"],"label":"Install Balzac CLI (npm)"}]}}At line 15, users are instructed to install the latest available release globally:
bash npm install -g balzac-cliTechnical Analysis
The installation instructions do not pin
balzac-clito a reviewed version or verify its integrity. Consequently, executing the documented command resolves and installs whichever release is associated with the package's current npm distribution tag.Because the project contains only
SKILL.mdand does not include the dependency's source code, lockfile, integrity digest, or provenance information, the effective code executed during installation and subsequent CLI use cannot be verified from the audited artifact. npm packages can also define lifecycle scripts that execute during installation.The use of a global installation increases exposure because the package's executable is placed in a shared command path. A compromised package release could therefore execute code during installation or provide a malicious replacement for the expected
balzaccommand.Attack Path
- An attacker compromises the npm account, publication pipeline, or upstream repository associated with
balzac-cli, or otherwise causes a malicious release to become the package's latest version. - A user follows the instruction in
SKILL.mdand runsnpm install -g balzac-cli. - npm retrieves the attacker-controlled release because no exact version or integrity value is specified.
- Malicious lifecycle code ...[truncated 1110 chars]
- An attacker compromises the npm account, publication pipeline, or upstream repository associated with
- Remediation
View remediation
Remediation Suggestions
-
Pin the dependency to an exact, reviewed version, for example:
bash npm install -g balzac-cli@X.Y.Z -
Document the expected official npm package owner, publisher, repository, and provenance so users can verify package authenticity.
-
Prefer a project-local installation governed by a committed lockfile instead of a global installation:
bash npm install --save-exact balzac-cli@X.Y.Z -
Verify the package's integrity and npm provenance before installation. Where the installation mechanism supports it, enforce a reviewed cryptographic digest.
-
Review the package's source, transitive dependencies, and lifecycle scripts before approving version updates.
-
Perform dependency updates through a controlled process that includes security scanning, reproducible validation, and explicit approval.
-
Run the CLI under a least-privileged account and provide
BALZAC_API_KEYonly for operations that require it. Avoid exposing unrelated credentials in the same execution environment.
-
