T08 · Insecure Dependencies
- Location
SKILL.md:4- Finding
Unpinned npm Package Execution with Privileged Agent-Hook Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 4 and 19-23
Vulnerability Type: Unpinned third-party package execution
Risk Level: HighVulnerable Code Snippet:
yaml metadata: {"clawdbot":{"emoji":"🧰","requires":{"bins":["thumbgate"]},"install":[{"id":"npm","kind":"npm","module":"thumbgate","bins":["thumbgate"],"label":"Install ThumbGate (npm)"}]}}markdown ## Quick Start ```bash npx thumbgate initBootstraps
.thumbgate/and wiresPreToolUsehooks into your agent. Works out-of-the-box with Claude Code, Cursor, Codex, Gemini CLI, Amp, OpenCode, and any MCP-compatible agent.text ### Technical Analysis The skill directs users to execute `npx thumbgate init` without specifying an exact package version or validating package integrity. By default, `npx` can retrieve the current package release from the configured npm registry and execute its lifecycle and command code with the invoking user's privileges. Because neither an exact audited version nor an integrity hash is supplied, the effective executable payload can change after this skill has been reviewed. A compromised maintainer account, malicious package release, registry compromise, or other supply-chain incident could therefore cause arbitrary code to run when the initialization command is invoked. The initialization operation is especially sensitive because it is explicitly described as installing `PreToolUse` hooks into supported agents. Such hooks occupy a privileged interception point where they may inspect, block, or alter subsequent tool-call behavior. The package implementation and lockfile are absent from the audited project, so its installation behavior, configuration changes, and data handling cannot be independently verified here. ### Attack Path 1. An attacker compromises the npm package, its publisher account, or the relevant package-distribution channel. 2. The attacker publishes a malicious release un ...[truncated 1285 chars]- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to an exact, reviewed version, such as
thumbgate@X.Y.Z, rather than resolving the latest release dynamically. - Commit an appropriate lockfile and verify package integrity through npm integrity metadata or an independently maintained checksum.
- Avoid direct execution of remotely resolved packages. Install the reviewed artifact first, verify it, and invoke the locally pinned binary afterward.
- Disable or carefully review npm lifecycle scripts during installation where operationally possible.
- Document every file and agent configuration modified by
init, including the exact hook definitions that will be installed. - Require explicit user confirmation before changing agent configuration or enabling
PreToolUsehooks. - Provide documented inspection, disablement, uninstall, and rollback procedures for all installed hooks and generated files.
- Run initialization with the least privileges necessary and avoid using an administrator or root account.
- Vendor or include the security-relevant hook implementation in the reviewed project so its behavior and data flows can be audited.
- Clearly disclose whether intercepted tool-call data, feedback, lessons, or audit records leave the local system, and require explicit consent before any remote transmission.
- Pin the dependency to an exact, reviewed version, such as
