Back to skill

Security audit

Surreal Art Generator

Security checks for vulnerabilities and agentic risk

Overview

This skill behaves like a disclosed surreal image generator, with cautions around third-party API use, token handling, and unpinned install instructions.

Before installing, understand that this skill sends your image prompt, API token, selected size, and optional reference image UUID to api.talesofai.com to generate images. Prefer a ClawHub install or a pinned installer version, avoid placing real tokens directly in shell history, and rotate any token you previously exposed on a command line.

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)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:32
Finding

Unpinned Package Execution Through the Documented npx Installation Command

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:32-34 and README.md:9-13
Vulnerability Type: Supply-chain exposure caused by unpinned package execution
Risk Level: Medium

Vulnerable Code Snippets

SKILL.md:32-34:

bash
## Install
```bash
npx skills add omactiengartelle/surreal-art-generator
text

`README.md:9-13`:

```bash
## Install

```bash
npx skills add omactiengartelle/surreal-art-generator
text

### Technical Analysis

The documented installation procedure invokes the `skills` package through `npx` without specifying a reviewed version or package integrity value. If the package is not already installed locally, `npx` can retrieve and execute the currently resolved package release from the configured package registry.

This creates a mutable supply-chain execution boundary: the effective code executed by the installation command may differ from the version that was reviewed when this skill was published. The project does not include a lockfile, integrity hash, or other mechanism that authenticates the expected `skills` CLI artifact.

The finding does not establish that the current package is malicious. The vulnerability is that the documented command trusts future registry resolution and immediately executes the resolved third-party code.

### Attack Path

1. An attacker compromises the registry account, publication pipeline, or another distribution component associated with the unpinned `skills` package.
2. The attacker publishes a malicious package release under the package name resolved by `npx`.
3. A user follows the documented installation command.
4. `npx` downloads the current mutable package version because no version or integrity constraint is specified.
5. The malicious CLI or package lifecycle behavior executes under the user's account.
6. The payload can access resources available to that user, subject to operating-system controls and the environment from 
...[truncated 679 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin the CLI to a specifically reviewed release, for example:

    bash
    npx --yes skills@REVIEWED_VERSION add omactiengartelle/surreal-art-generator
    
  2. Verify and document the official package namespace and registry source before recommending the command.

  3. Where supported, use a lockfile and registry integrity metadata to authenticate the downloaded package.

  4. Prefer a trusted, preinstalled version of the CLI in controlled deployment environments instead of downloading executable code during installation.

  5. Periodically review pinned versions and update them only after validating the package contents, publisher identity, provenance, and release signatures.

  6. Apply the same hardened installation instructions consistently in both SKILL.md and README.md.

T09 · Insecure Skill Coding Practices

Note
Location
surrealartgenerator.js:18
Finding

API Token Exposure Through Command-Line Arguments

Content
View full analysis

Vulnerability Details

File Location: surrealartgenerator.js:18-29, with affected usage documented at SKILL.md:16-20 and README.md:58-69
Vulnerability Type: Sensitive token passed through process arguments and shell command history
Risk Level: Low

Vulnerable Code Snippets

surrealartgenerator.js:18-29:

javascript
function parseArgs(argv) {
  const args = { prompt: null, size: 'square', token: null, ref: null };
  const rest = argv.slice(2);
  for (let i = 0; i < rest.length; i++) {
    const a = rest[i];
    if (a === '--size') { args.size = rest[++i]; }
    else if (a === '--token') { args.token = rest[++i]; }
    else if (a === '--ref') { args.ref = rest[++i]; }
    else if (!a.startsWith('--') && args.prompt === null) { args.prompt = a; }
  }
  return args;
}

SKILL.md:16-20:

bash
Requires a Neta API token (free trial at <https://www.neta.art/open/>). Pass it via the `--token` flag.

```bash
node <script> "your prompt" --token YOUR_TOKEN
text

`README.md:58-69`:

```bash
Pass the token to the script with the `--token` flag:

```bash
node surrealartgenerator.js "your prompt" --token YOUR_TOKEN

You can also expand it from a shell variable:

bash
node surrealartgenerator.js "your prompt" --token "$NETA_TOKEN"
text

### Technical Analysis

The application obtains the API token directly from `process.argv`. Command-line arguments are not an appropriate secret transport mechanism because they can be retained in shell history and may be exposed through process-inspection interfaces, telemetry, crash diagnostics, audit logs, command wrappers, or job-management systems.

Expanding an environment variable into the `--token` argument does not resolve the process-argument exposure. Although the literal token may be absent from the typed shell command, the shell substitutes its value before creating the Node.js proce
...[truncated 1608 chars]
Remediation
View remediation

Remediation Suggestions

  1. Read the token from a dedicated environment variable rather than a command-line option:

    javascript
    const TOKEN = process.env.NETA_TOKEN;
    

    Invoke the program without placing the token in its argument vector:

    bash
    export NETA_TOKEN="..."
    node surrealartgenerator.js "your prompt"
    
  2. For interactive use, support reading the token from hidden terminal input so it is neither echoed nor stored in shell history.

  3. For automation, support a protected credential file or secret-manager integration. Require restrictive file permissions and avoid storing the token in the repository.

  4. Deprecate the --token option. If temporary backward compatibility is necessary, display a warning explaining that command-line secrets may be exposed.

  5. Update README.md and SKILL.md so that secure environment-variable, protected-file, or secret-manager usage is the primary documented method.

  6. Ensure errors, telemetry, and debug output never serialize process.argv, request headers, or the token.

  7. Advise users who previously placed tokens literally on command lines to remove affected shell-history entries and rotate potentially exposed credentials.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documented behavior says the skill uses the Neta AI API, but the analysis indicates the actual implementation calls a different external service and supports reference-image inheritance that is not properly disclosed. This mismatch is dangerous because it defeats informed consent: user prompts, tokens, or reference-image identifiers may be sent to an unexpected third party with different privacy, retention, or billing behavior.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

The README instructs users to install and execute the skill via npx skills without pinning a specific version. This creates a supply-chain risk because users may fetch whatever package version is current at execution time, including a compromised or maliciously replaced release. In a skill-install context, that can lead to arbitrary code execution on the user's machine during installation or runtime.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill declares only tools: Bash and provides no explicit tool-scope restrictions even though its stated function depends on external network access. That creates an overbroad execution context where a shell-capable skill may make arbitrary outbound requests without clear user-visible permission boundaries, increasing the chance of unintended data exposure or abuse.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The phrase "Use when someone asks to generate or create surreal art generator images" is ambiguous and does not clearly define the trigger scope or provide exclusion examples. It could match a wide range of ordinary requests about generating images, increasing the chance of unintended invocation.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
87% confidence
Finding

The install command uses npx skills without pinning a specific version, so future executions may fetch and run whatever package version is current at install time. This creates a supply-chain risk where a compromised or malicious upstream release could execute attacker-controlled code on the user's system.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill metadata and user-facing description claim it uses the Neta AI API, but the implementation actually sends prompts and tokens to TalesOfAI endpoints. This mismatch is dangerous because it can trick users into providing credentials and content under false pretenses, defeating informed consent and potentially enabling credential harvesting or unauthorized third-party data sharing.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script tells users to obtain a token from Neta while authenticating requests against TalesOfAI, creating a deceptive credential flow. Even if the token is rejected, this is a phishing-like pattern that can induce users to disclose sensitive API credentials to a different service than the one advertised.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
92% confidence
Finding

This request transmits user prompts and an authentication token to an external TalesOfAI endpoint, which is not the provider described in the skill metadata. External transmission is expected for an image generator, but in this context it is dangerous because the undisclosed destination receives both potentially sensitive prompts and user-supplied credentials.

Content

Scanner excerpt · surrealartgenerator.js (reported line 67)May include surrounding context.

js
console.error(`→ Submitting prompt (${dims.width}×${dims.height})...`);

  const submitRes = await fetch(`https://api.talesofai.com/v3/make_image`, {
    method: 'POST',
    headers,
    body: JSON.stringify(body),

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

The polling request continues sending the same authentication headers to TalesOfAI to retrieve task results, reinforcing ongoing data exchange with an undisclosed third party. While polling itself is normal for async jobs, it compounds the risk created by the provider mismatch and extends credential exposure to repeated requests.

Content

Scanner excerpt · surrealartgenerator.js (reported line 97)May include surrounding context.

js
for (let attempt = 0; attempt < 90; attempt++) {
    await new Promise((r) => setTimeout(r, 2000));
    const pollRes = await fetch(`https://api.talesofai.com/v1/artifact/task/${taskUuid}`, { headers });
    if (!pollRes.ok) {
      const t = await pollRes.text();
      console.error(`✗ Poll failed: ${pollRes.status} ${t}`);