T08 · Insecure Dependencies
- Location
SKILL.md:21- Finding
Unpinned Global Installation of Third-Party npm Packages
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 21–25
Vulnerability Type: Supply-chain exposure through unpinned global dependencies
Risk Level: MediumVulnerable Code
bash # Option A: MCP Server (if your platform supports MCP) npm install -g @clawdactual/carapace-mcp-server # Option B: Chitin CLI (if you use Chitin for personality persistence) npm install -g @clawdactual/chitin chitin initEquivalent installation instructions are repeated at lines 78 and 88–90.
Technical Analysis
The Skill directs users to install the latest registry versions of two third-party npm packages globally. It does not pin reviewed versions or require lockfiles, integrity hashes, signature verification, lifecycle-script restrictions, or package-content inspection.
npm packages can execute installation lifecycle scripts under the invoking user's account. Because
-ginstalls commands into a shared user or system-level executable location, a malicious or compromised release could persistently expose attacker-controlled commands beyond the immediate Skill operation. Runningchitin initimmediately afterward additionally executes newly downloaded code.This behavior is not proven to be intentionally malicious, and the packages may be legitimate. The vulnerability is the unnecessary trust placed in mutable registry content and the absence of supply-chain controls.
Attack Path
- An attacker compromises a package publisher account, package release process, or relevant registry distribution path.
- The attacker publishes a malicious version under one of the package names referenced by the Skill.
- A user follows the unversioned
npm install -ginstruction, causing npm to resolve the current package release. - npm downloads the malicious package and may execute its lifecycle scripts with the invoking user's privileges.
- The installed package can read files available to that user, modify use ...[truncated 1211 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin each dependency to an explicitly reviewed version rather than resolving the latest release:
bash npm install -g @clawdactual/carapace-mcp-server@<reviewed-version> npm install -g @clawdactual/chitin@<reviewed-version> - Publish expected package integrity hashes or signed release provenance and require verification before installation.
- Prefer project-local or isolated installations over
-g, such as a dedicated container or restricted runtime environment. - Avoid immediately executing newly installed packages. Require package review and provenance validation before running
chitin init. - Disable npm lifecycle scripts during acquisition where compatible, then explicitly review and run only necessary setup actions.
- Document the exact publisher, source repository, reviewed release, and verification process.
- Run the packages under a least-privileged account with access limited to required Carapace data.
- Ensure
~/.config/carapace/credentials.jsonremains mode0600, and support environment-based or operating-system credential stores where appropriate. - Rotate the Carapace API key immediately if package compromise or unauthorized access is suspected.
- Pin each dependency to an explicitly reviewed version rather than resolving the latest release:
