Back to skill

Security audit

Article Illustrator

Security checks for vulnerabilities and agentic risk

Overview

The skill largely fits an article illustration workflow, but it under-discloses local image uploads and has credential-handling risks users should review before installing.

Install only if you are comfortable with WeryAI receiving article prompts, generated-task metadata, and any reference images you provide. Do not provide private local reference files unless you intend to upload them. Prefer environment variables over persisted API keys, review permissions on `.image-skills/article-illustrator/.env`, and use a pinned local Bun runtime rather than allowing `npx -y bun` to fetch one at run time.

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 (4)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/vendor/shared-image-generation/scripts/main.ts:170
Finding

API Key Disclosure to Untrusted Image Download Origins

Content
View full analysis
{ let lastErr = ""; const transientStatus = (status: number) => status === 408 || status === 429 || status === 502 || status === 503 || status === 504 || (status >= 520 && status <= 599); const transientNetwork = (e: unknown) => { const name = e instanceof Error ? e.name : ""; const msg = e instanceof Error ? e.message : String(e); return ( name === "AbortError" || msg.includes("timeout") || msg.includes("Timeout") || msg.includes("fetch failed") || msg.includes("ECONNRESET") || msg.includes("ETIMEDOUT") || msg.includes("EAI_AGAIN") ); }; for (let attempt = 1; attempt <= DOWNLOAD_MAX_ATTEMPTS; attempt++) { let res: Response | null = null; let threw: unknown = null; for (const useAuth of [false, true] as const) { try { const init: RequestInit = { signal: AbortSignal.timeout(DOWNLOAD_TIMEOUT_MS) }; if (useAuth) init.headers = { Authorization: `Bearer ${getApiKey()}` }; res = await fetch(url, init); threw = null; if (res.ok) break; lastErr = `HTTP ${res.status}`; if (!useAuth && (res.status === 401 || res.status === 403)) continue; break; } catch (e) { threw = e; res = null; lastErr = e instanceof Error ? e.message : String(e); if (!useAuth) continue; break; } } ``` The function is called with image URLs returned by the remote generation service: ```ts for (let i = 0; i < images.length; i++) { const { bytes, contentType } = await fetchImageBytes(images[i]!, quietLogs); let ext = ...[truncated 1982 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
scripts/vendor/weryai-image/run-generate.mjs:37
Finding

Unpinned Bun Runtime Downloaded and Executed Through npx

Content
View full analysis
Remediation
View remediation
`. 2. Commit and enforce an appropriate lockfile with integrity metadata. 3. Prefer a preinstalled, trusted Bun binary and verify its version before execution. 4. Remove `-y` so an unexpected package installation cannot occur without notice. 5. In controlled distributions, vendor or cryptographically verify the required runtime. 6. Pass a minimal child-process environment rather than spreading all of `process.env`. 7. Include only required variables such as `PATH`, project location, namespace, and the image credential when generation actually needs it. 8. Separate local preparation and compression commands from the credential-bearing generation environment. 9. Add CI checks that reject unpinned executable dependencies and unexpected lockfile changes. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/vendor/shared-image-generation/scripts/setup.mjs:119
Finding

Plaintext API Key Persisted Without Explicit Restrictive Permissions

Content
View full analysis
/.env`. 3. The file receives permissions derived from the current umask, or an existing file retains overly permissive permissions. 4. Another local account or process with project-directory access reads the file. 5. The recovered token is reused for unauthorized WeryAI API activity. ### Impact Assessment The exposure is limited to attackers with local or shared-filesystem read access, but it can disclose the complete WeryAI bearer token. This ca ...[truncated 196 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/vendor/shared-image-generation/scripts/main.ts:304
Finding

Undisclosed Upload of Local Reference Image Files

Content
View full analysis
0 ? "/v1/generation/image-to-image" : "/v1/generation/text-to-image"; const body: Record = referenceImages.length > 0 ? { ...baseBody, images: referenceImages.map(toImagePayloadValue) } : baseBody; ``` The top-level `SKILL.md` states that local paths and `data:` URLs are unsupported or rejected, while the runtime accepts local paths and uploads their contents. ### Technical Analysis Image-to-image generation legitimately requires transmitting reference-image content. However, the top-level security disclosure tells users that reference images must be public URLs and that local paths and `data:` URLs are rejected. The actual implementation does the opposite for local paths: it resolves the path, reads the complete file, Base64-encodes it, and includes it in a JSON request to WeryAI. This mismatch undermines informed consent and can cause a user or agent to provide a private local image under the assumption that it will fail validation rather than leave the machine. Validation only checks that a non-URL path exists; it does not restrict file type by content, enforce a size limit, or require confirmation before u ...[truncated 1029 chars]
Remediation
View remediation
Vulnerability Patterns
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (80)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description emphasizes illustration generation tooling for creating visuals for an article. However, this code does not generate any images, decide on styles, or create illustrations. Its actual primary function is post-processing markdown: it parses an outline of illustration entries, computes image paths, inserts image markdown at specified anchors, and writes the updated article back to disk, optionally creating a backup. That is a materially different purpose from image generation, and it also involves undeclared file read/write behavior beyond a pure generation description.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared purpose centers on creating illustrations for article content. The supplied code does not generate images from prompts, make style decisions, or operate on article sections. Instead, it accepts file/directory paths, detects installed compression tools, compresses/converts existing images, writes output files, and summarizes file-size changes. This is a materially different primary purpose and includes undeclared file-system and subprocess/external-tool usage.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

The description suggests a higher-level skill focused on creating multiple illustrations for an article with structured type/style decisions. The code instead is a lower-level, generic image-generation CLI integration with WeryAI. It accepts prompts, optional reference images, batch files, and model/aspect/resolution settings; submits generation requests to an external API; polls task status; downloads generated images; and saves them locally. It also reads and merges configuration from local project/home files and exposes legacy subcommands including a status lookup. While this can support article illustration generation, the actual behavior is broader and materially different: it is not specifically article-oriented, does not implement article-section analysis or structured illustration planning beyond simple style presets, and performs undeclared network/file I/O capabilities.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Yes, this is a clear mismatch. The declared purpose is an illustration-generation skill for article visuals, but the supplied code only queries an API balance endpoint and returns available credits. It does not generate images, choose styles/types, bundle generation operations, or process article sections. The primary purpose and accessed resource are materially different from the description.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared purpose is an illustration-generation skill for articles, but the supplied code chunk is purely an error-handling utility module for WeryAI responses. It maps status codes to friendly messages, normalizes failures, and checks success conditions. These are supporting infrastructure concerns and do not themselves implement the described illustration-generation functionality. Because the actual behavior in this chunk is materially different from the declared primary purpose, this is a mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The supplied code does not generate illustrations or make any style/type decisions for article visuals. Its primary purpose is a generic normalization layer for asynchronous task results from a vendor integration. It maps raw statuses, computes phases, and extracts possible media outputs from task payloads. While images are one possible output field, the utility is broader and infrastructure-oriented, covering videos, audio, lyrics, and cover URLs as well. This is materially different from the declared purpose of an illustration-generation skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The declared description says this skill is for creating illustrations for an article. The provided code does not generate illustrations, make style/type decisions, or assemble article visuals. Instead, it validates task or batch identifiers, calls generation status API endpoints, normalizes returned task data, and reports completion/failure plus output URLs and metadata. That is a materially different primary purpose: status inspection for existing generation jobs rather than illustration creation.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

This code chunk does not generate illustrations or make structured visual decisions for article content. Its purpose is to wait for already-submitted generation tasks to complete by polling API status endpoints for single tasks, multiple tasks, or batches. While polling can be a supporting implementation detail inside a larger illustration-generation skill, this specific chunk’s actual behavior is materially different from the declared primary purpose: it is orchestration/status monitoring logic for generic generation jobs. The presence of generic outputs and media-related fields such as lyrics and coverUrl further indicates broader generation-task handling rather than article-illustration-specific functionality.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared purpose centers on creating article illustrations, but this code chunk only retrieves and returns available image-generation models from an external registry. While model listing could support a broader image workflow, the chunk’s primary behavior is model discovery and validation, not illustration generation or style/type decisioning. That is a materially different purpose from the declared description.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
89% confidence
Finding

The declared description suggests a higher-level skill for generating multiple illustrations for an article, including structured decisions about illustration type and style across sections. The supplied code chunk instead implements a low-level submit function for an image-to-image generation endpoint. It normalizes input, validates against a model registry, builds a request body, and submits to /v1/generation/image-to-image. While it can request multiple images via an image_number field, there is no logic for analyzing an article, splitting it into sections, choosing illustration types/styles, or coordinating a bundled generation workflow. Therefore the code’s actual behavior is materially narrower and different from the declared purpose.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `scripts/scaffold.ts`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `scripts/scaffold.ts`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `scripts/build-prompts.ts`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `scripts/build-prompts.ts`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `scripts/build-batch.ts`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `scripts/build-batch.ts`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `scripts/insert-images.ts`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `scripts/insert-images.ts`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `scripts/insert-images.ts`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `scripts/insert-images.ts`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `scripts/insert-images.ts`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `./scripts/vendor/compression-runtime/scripts/main.ts` | Compress output for delivery |

Self-Modification

High
Category
Rogue Agent
Confidence
97% confidence
Finding

The skill explicitly supports overwriting the original article file in place after inserting generated image references. In-place modification of user content is dangerous because a malformed outline, wrong anchor, or unexpected path resolution can alter or damage source material, and repeated automation raises the risk of silent content corruption despite backup behavior.

Content

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

--images-dir illustrations/topic-slug

text

If you do not want to overwrite the original file:

```bash
${BUN_X} {baseDir}/scripts/insert-images.ts \

Self-Modification

High
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · scripts/scaffold.ts (reported line 35)May include surrounding context.

ts
--lang <code>            On-image text language when needed (default placeholder: en)
  --aspect <ratio>         Aspect ratio (default: 16:9)
  --illustrations <count>  Number of illustration slots to scaffold (default: 3)
  --force                  Overwrite existing files
  -h, --help               Show help`);
}

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The manifest says the skill generates multiple illustrations for an article with structured type/style decisions, but this code's core behavior is compressing existing image files, writing temp outputs, renaming prior outputs to backups, and replacing files on disk. That is a materially different operation from illustration generation and broadens the skill into local image-processing/file-management behavior not reflected in the description.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dangerous_exec, suspicious.env_credential_access, suspicious.potential_exfiltration

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/bootstrap.mjs:86

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/illustrate-article.mjs:106

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/setup.mjs:21

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/vendor/compression-runtime/scripts/main.ts:158

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/vendor/shared-image-generation/scripts/bootstrap.mjs:86

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/vendor/shared-image-generation/scripts/doctor.mjs:56

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/vendor/shared-image-generation/scripts/smoke-check.mjs:18

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/vendor/weryai-image/discover-models.mjs:9

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/vendor/weryai-image/doctor.mjs:9

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/vendor/weryai-image/main.ts:15

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/vendor/weryai-image/recommend-model.mjs:9

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/vendor/weryai-image/run-generate.mjs:39

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/vendor/weryai-image/setup.mjs:9

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/vendor/shared-image-generation/scripts/main.ts:51

File read combined with network send (possible exfiltration).

Warn
Code
suspicious.potential_exfiltration
Location
scripts/vendor/shared-image-generation/scripts/main.ts:6