T08 · Insecure Dependencies
- Location
README.md:27- Finding
Unpinned Third-Party Package Installed Globally
- Content
View full analysis
Vulnerability Details
File Location:
README.md, lines 27-31
Vulnerability Type: Unpinned third-party dependency installed globally
Risk Level: MediumVulnerable Code
markdown The user's machine needs the ClawDNA CLI installed: ```bash npm install -g clawdna clawdna inittext ### Technical Analysis The documented installation command retrieves the latest available `clawdna` package from the configured npm registry without pinning an audited version or verifying package integrity or provenance. The audited project contains only documentation, so the installed CLI implementation and its npm lifecycle scripts could not be reviewed. A global npm installation may execute package lifecycle scripts with the permissions of the invoking user. The subsequent `clawdna init` command also executes code from that externally supplied package. Although the documentation links to a source repository, it provides no cryptographic mechanism proving that the registry artifact corresponds to a reviewed source commit. This creates a supply-chain exposure: compromise of the package publisher, registry account, distribution channel, or a future package release could cause users following these instructions to execute unauthorized code. ### Attack Path 1. An attacker compromises the npm publisher account, package distribution process, or a future release of `clawdna`. 2. The attacker publishes a malicious package version containing a lifecycle script or malicious initialization behavior. 3. A user follows the documented `npm install -g clawdna` instruction, which resolves to that latest malicious version. 4. npm executes applicable package lifecycle scripts during installation under the user's account. 5. The user runs `clawdna init`, providing a second opportunity for the compromised package to execute. 6. Malicious code can access resources available to that user, potentially including identity files, confi ...[truncated 544 chars]- Remediation
View remediation
Remediation Suggestions
- Pin installation instructions to a specific reviewed package version, for example:
bash npm install -g clawdna@1.0.0 - Publish and document integrity hashes, signed provenance, or npm provenance attestations that bind the package artifact to a reviewed source commit.
- Prefer a project-local installation with a committed lockfile over a global installation where operationally feasible.
- Explicitly identify the expected package publisher, registry, and package scope so users can detect dependency-confusion or package-substitution attempts.
- Audit npm lifecycle scripts and minimize or disable them where possible. For verification workflows, consider installing with
--ignore-scriptsbefore inspecting the package. - Document that installation should not be performed with
sudoor another privileged account. - Include the CLI implementation in the auditable artifact, or reference an immutable release commit and reproducible build process, so its secret sanitization and file-handling claims can be independently verified.
- Pin installation instructions to a specific reviewed package version, for example:
