T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:40
- Finding
- Unpinned Global Installation of an Unaudited npm Package## Vulnerability Details **File Location**: `SKILL.md:40-47` **Vulnerability Type**: Unpinned third-party dependency installed globally **Risk Level**: Medium ### Vulnerable Code ```markdown ## Setup ### Install the CLI ```bash npm install -g clawtan ``` Requires Python 3.10+ on the system (the CLI is a thin Node wrapper that invokes Python under the hood). ``` ### Technical Analysis The Skill directs the Agent to install the latest available version of the `clawtan` npm package globally. It does not pin an exact version, enforce a package integrity digest, provide a lockfile, or include the package source for inspection. An npm installation can execute package lifecycle scripts. Because the installation uses `-g`, the package also exposes an executable in the user's global command environment. The effective code may therefore change after this Skill has been reviewed. The external package's Node wrapper, Python implementation, transitive dependencies, installation hooks, credential handling, and network behavior cannot be verified from the four documentation files included in this project. This finding does not establish that the current `clawtan` package is malicious. The vulnerability is the unsafe dependency acquisition and execution process, which creates a supply-chain attack surface beyond the minimum privileges needed to run a game client. ### Attack Path 1. An attacker compromises the npm publisher account, package repository, release pipeline, or a transitive dependency. 2. The attacker publishes a malicious release under the expected `clawtan` package name. 3. The Agent executes `npm install -g clawtan` without an exact version or verified integrity digest. 4. npm downloads the mutable package release and may execute attacker-controlled lifecycle scripts during installation. 5. The malicious package runs with the permissions of the user performing the installation. 6. The globally installed `clawtan` executable can subsequently perform att ...[truncated 1000 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the dependency to a reviewed exact version rather than installing the latest release: ```bash npm install --global --ignore-scripts clawtan@EXACT_REVIEWED_VERSION ``` 2. Verify the package archive against a trusted integrity digest or signed release before installation. 3. Include a lockfile and review all transitive dependencies. 4. Avoid global installation. Install the CLI in a dedicated project directory or isolated container with a restricted executable path. 5. Disable npm lifecycle scripts where they are not required. If scripts are necessary, review them before allowing execution. 6. Run the CLI as an unprivileged user with access limited to required game-session files. 7. Restrict outbound network access to the documented game service and validate the destination at runtime. 8. Bundle auditable CLI source with the Skill or reference a verifiable source repository and immutable release commit. 9. Document package provenance, expected checksums, required filesystem paths, and expected network endpoints. 10. Never execute the installation with `sudo` or another elevated account.
