Back to skill

Security audit

Dnd Character Generator

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it claims, but a command-line parsing bug can accidentally send the user's API token as image prompt text.

Review before installing. Use only a token you are comfortable sending to the Neta/Tales of AI service, avoid the documented token-only command until the parser is fixed, and prefer a pinned or ClawHub-managed install path instead of the unpinned npx command.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
dndcharactergenerator.js:4
Finding
API Token Can Be Misclassified and Transmitted as Image Prompt Data<![CDATA[ ## Vulnerability Details **File Location**: `dndcharactergenerator.js:4-10` and `dndcharactergenerator.js:80-87` **Vulnerability Type**: Sensitive credential exposure through unsafe command-line argument parsing **Risk Level**: Medium ### Vulnerable Code ```js const args = process.argv.slice(2); const PROMPT = args.find(a => !a.startsWith('--')) || 'DnD fantasy character portrait, detailed armor and weapons, dramatic lighting, epic fantasy art style, highly detailed character design, tabletop RPG hero'; const tokenIndex = args.indexOf('--token'); const tokenFlag = tokenIndex !== -1 ? args[tokenIndex + 1] : null; ``` The resulting value is subsequently inserted into the API request body: ```js const body = { storyId: 'DO_NOT_USE', jobType: 'universal', rawPrompt: [{ type: 'freetext', value: PROMPT, weight: 1 }], width, height, meta: { entrance: 'PICTURE,VERSE' }, context_model_series: '8_image_edit', }; ``` The README explicitly documents a prompt-free invocation at `README.md:29`: ```bash node dndcharactergenerator.js --token YOUR_TOKEN ``` ### Technical Analysis The program identifies the prompt by selecting the first command-line argument that does not begin with `--`. This logic does not distinguish positional arguments from values belonging to named options. For the documented command `node dndcharactergenerator.js --token YOUR_TOKEN`, the argument array contains `--token` followed by `YOUR_TOKEN`. Because the token value does not begin with `--`, it is selected as `PROMPT`. The same value is also correctly selected as `TOKEN`. As a result, the credential is transmitted both as the authentication header and as the image-generation prompt: ```js const HEADERS = { 'x-token': TOKEN, 'x-platform': 'nieta-app/web', 'content-type': 'application/json', }; ``` Prompt data may be handled by additional backend components such as moderation, generation, telemetry, debugging, or prompt-retention systems. This unnecessarily e ...[truncated 1148 chars]
Remediation
<![CDATA[ ## Remediation Suggestions Use a command-line parser that distinguishes positional arguments from option values, or explicitly consume recognized options before selecting the prompt. A safe manual approach would be: 1. Iterate over the argument array. 2. When `--token`, `--size`, or `--ref` is encountered, consume both the option and its following value. 3. Treat only remaining arguments as positional prompt text. 4. Reject missing option values rather than allowing another flag to become the value. 5. Avoid including authentication values in errors, diagnostic output, request bodies, or generated content. 6. Add automated tests for: - Token-only invocation. - Prompt followed by token. - Token followed by prompt. - Missing token value. - Missing size or reference value. - Option values that begin with `--`. 7. Consider accepting the token through a protected environment variable or secret manager so it does not appear in process listings or shell history. For example, a dedicated argument parser should produce separate fields such as `options.token`, `options.size`, `options.ref`, and `positionals`, with only `positionals` used to construct `rawPrompt`. ]]>

T08 · Insecure Dependencies

Note
Location
README.md:7
Finding
Documented Installation Command Executes an Unpinned Third-Party Package<![CDATA[ ## Vulnerability Details **File Location**: `README.md:7-10` and `SKILL.md:32-34` **Vulnerability Type**: Unpinned executable installation dependency **Risk Level**: Low ### Vulnerable Documentation `README.md:7-10`: ```bash npx skills add omactiengartelle/dnd-character-generator ``` `SKILL.md:32-34`: ```bash npx skills add omactiengartelle/dnd-character-generator ``` ### Technical Analysis The documented installation procedure invokes the `skills` package through `npx` without specifying an audited version or integrity constraint. If the package is not already available locally, `npx` may resolve and download the current package release from its configured registry and execute it. This makes the effective installer mutable after the audited project files have been reviewed. Although the project's own `package.json` declares no runtime dependencies, the documented setup process introduces executable third-party code whose version is not fixed by this repository. The audit found no evidence that the current installer is malicious. The security concern is that users are instructed to execute whatever package version the registry resolves at installation time, creating avoidable supply-chain exposure. ### Attack Path 1. A user follows the documented `npx skills add ...` installation command. 2. `npx` resolves the unversioned `skills` package using the user's configured package registry. 3. If necessary, the resolved package is downloaded to the local system. 4. The package executes with the operating-system privileges of the invoking user. 5. If the package, registry account, release process, or registry resolution is compromised, malicious installer code could run before the Skill is installed. ### Impact Assessment Any malicious code introduced through the installer would execute with the privileges of the user running `npx`. Depending on those privileges and the host environment, it could access user-readable files, environment variables, ...[truncated 364 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the installer to a specific reviewed version, for example by using an explicit `package@version` reference. 2. Record and verify package integrity information where the installation tooling supports it. 3. Document the expected registry and official package source to reduce registry substitution risk. 4. Review the pinned installer's package contents, lifecycle scripts, and transitive dependencies before recommending it. 5. Use a lockfile or equivalent reproducible dependency manifest when installation occurs through a local project. 6. Provide a manual installation alternative that does not require immediate execution of remotely resolved code. 7. Establish a controlled update process so installer-version changes are reviewed before documentation is updated. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Rp1

Medium
Category
MCP Rug Pull
Confidence
87% confidence
Finding
The README instructs users to install the skill via `npx skills add omactiengartelle/dnd-character-generator` without pinning a specific package or skill version. This creates a supply-chain risk because future changes to the remotely fetched installer or referenced package could cause users to execute unexpected code at install time, and README copy-paste commands are commonly trusted and run verbatim.

Vague Triggers

Medium
Confidence
89% confidence
Finding
The phrase "Use when someone asks to generate or create dnd character art generator images" is awkward and underspecified, and it does not clearly define what user requests should or should not invoke this skill. It lacks concrete trigger examples or exclusion conditions, which can lead to unintended activation from loosely related requests about character art or image generation.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

External Transmission

Medium
Category
Data Exfiltration
Content
}

  let taskUuid;
  const makeRes = await request('POST', 'https://api.talesofai.com/v3/make_image', body);

  if (typeof makeRes === 'string') {
    taskUuid = makeRes.trim();
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
}

  let taskUuid;
  const makeRes = await request('POST', 'https://api.talesofai.com/v3/make_image', body);

  if (typeof makeRes === 'string') {
    taskUuid = makeRes.trim();
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Static analysis

No suspicious patterns detected.