Back to skill

Security audit

Drawthings Agent

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent for generating images with Draw Things, but it tells agents to perform an unpinned global npm install if the helper CLI is missing.

Install only if you are comfortable letting the skill add a global third-party npm package. Prefer reviewing or pinning the package version first, avoid sudo/admin installation, and confirm before allowing the agent to change Draw Things paths or start long upscaling jobs.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T08 · Insecure Dependencies

Warning
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: Medium

Vulnerable 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/drawthings from 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

  1. An attacker compromises the package publisher, an applicable dependency, or the package distribution channel and publishes a malicious release.
  2. An agent loads this skill in an environment where dt-skill is absent or reports a module-not-found error.
  3. Following the mandatory instructions, the ...[truncated 1057 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin the dependency to a reviewed exact version, for example @mijuu/drawthings@X.Y.Z, rather than resolving the latest release.
  2. Prefer a project-local dependency recorded in package.json and a committed lockfile instead of a global installation.
  3. Verify package provenance, publisher identity, repository ownership, release signatures or attestations, and integrity hashes before installation.
  4. Audit the package and its transitive dependencies, including all npm lifecycle scripts.
  5. Disable installation scripts with --ignore-scripts where compatible; if scripts are required, review them before permitting execution.
  6. Require explicit user approval before downloading or installing third-party software.
  7. Perform installation in a least-privileged sandbox or isolated environment with restricted filesystem, credential, and network access.
  8. Avoid administrator or sudo execution and document the minimum permissions required.
  9. Document a trusted update process so version changes receive security review before deployment.
Vulnerability Patterns
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (1)

Unbounded Output

Medium
Category
Output Handling
Confidence
60% confidence
Finding

Output size or generation rate is not bounded. Unbounded output enables denial-of-service through resource exhaustion, log flooding, or context-window stuffing.

Content

Scanner excerpt · SKILL.md (reported line 55)May include surrounding context.

md
- **Timeout**: Default is 600s. For heavy 4x upscales, use `--timeout 1200`.

## ⚠️ CRITICAL CONSTRAINTS for AI
1. **NO TRUNCATION**: Never use "..." or "etc." in the prompt. Provide the complete text.
2. **NO POST-PROCESSING**: Upscaling **MUST** be part of the initial `gen` command.
3. **RESPONSE COMPRESSION**: Ensure "Response Compression" (FPY) is **DISABLED** in Draw Things settings.