T08 · Insecure Dependencies
- Location
SKILL.md:10- Finding
Unpinned Global Installation of a Third-Party npm Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 10–13
Vulnerability Type:T08: Insecure Dependencies
Risk Level: MediumVulnerable code snippet:
markdown ## 🛠 Setup & Verification (AI ACTION REQUIRED) If `dt-skill` is not found or fails with "module not found", you **MUST** perform these steps: 1. **Global Installation**: Run `npm install -g @mijuu/drawthings` to ensure the CLI and MCP entry points are available. 2. **Verify Environment**: Run `dt-skill doctor`. If paths are missing, ask the user for their Draw Things model and server binary paths, then run `dt-skill config --server-path "..." --models-path "..."`.Technical Analysis
The skill mandates installation of
@mijuu/drawthingsfrom the npm registry without specifying an exact version, lockfile, integrity hash, or independently verified source. Consequently, the installed artifact depends on whichever release and transitive dependencies the registry resolves at execution time.npm packages can define lifecycle scripts that execute during installation. Because the command uses
-g, those scripts run during a global installation and the resulting executables become available outside the project. This creates a supply-chain boundary in which a compromised publisher account, malicious future release, registry compromise, or compromised transitive dependency could introduce executable code after this skill has been reviewed.The finding does not establish that the named package is currently malicious. The vulnerability is the mandatory use of a mutable, unverified dependency with global installation scope.
Attack Path
- An attacker compromises the package publisher, an applicable dependency, or the package distribution channel and publishes a malicious release.
- An agent loads this skill in an environment where
dt-skillis absent or reports a module-not-found error. - Following the mandatory instructions, the ...[truncated 1057 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to a reviewed exact version, for example
@mijuu/drawthings@X.Y.Z, rather than resolving the latest release. - Prefer a project-local dependency recorded in
package.jsonand a committed lockfile instead of a global installation. - Verify package provenance, publisher identity, repository ownership, release signatures or attestations, and integrity hashes before installation.
- Audit the package and its transitive dependencies, including all npm lifecycle scripts.
- Disable installation scripts with
--ignore-scriptswhere compatible; if scripts are required, review them before permitting execution. - Require explicit user approval before downloading or installing third-party software.
- Perform installation in a least-privileged sandbox or isolated environment with restricted filesystem, credential, and network access.
- Avoid administrator or
sudoexecution and document the minimum permissions required. - Document a trusted update process so version changes receive security review before deployment.
- Pin the dependency to a reviewed exact version, for example
