Back to skill

Security audit

Hidden Truth Reveal Video Gen

Security checks for vulnerabilities and agentic risk

Overview

The skill is mainly a disclosed WeryAI video generator, but its documented shell workflow can let crafted prompt text run local commands.

Review before installing. Only run this skill in an isolated environment and only with the WERYAI_API_KEY it needs. The documented command should be changed to pass JSON without a shell, such as an argument array, stdin, or a secure temp file. Do not send confidential prompts, private images, secrets, or proprietary supply-chain details unless you are comfortable sharing them with WeryAI.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:68
Finding

Shell Command Injection Through Interpolated JSON Arguments

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:68-75; additional affected examples in resources/WERYAI_VIDEO_API.md:33-44
Vulnerability Type: Shell command injection caused by unsafe embedding of user-controlled prompt data
Risk Level: High

Vulnerable Code

SKILL.md:68-75:

markdown
6. `node {baseDir}/scripts/video_gen.js wait --json '…'`.
7. Return **`[Video](url)`**; no code fences around links.

## CLI reference

~~~sh
node {baseDir}/scripts/video_gen.js wait --json '{"model":"KLING_V3_0_PRO","prompt":"…","duration":10,"aspect_ratio":"9:16","generate_audio":true,"negative_prompt":"illegible text, watermark, garbled captions"}'
node {baseDir}/scripts/video_gen.js wait --json '{"model":"SEEDANCE_2_0","prompt":"…","duration":10,"aspect_ratio":"9:16","resolution":"720p","generate_audio":true}'
~~~

resources/WERYAI_VIDEO_API.md:33-44:

markdown
node {baseDir}/scripts/video_gen.js wait --json '{"model":"KLING_V3_0_PRO","prompt":"...","duration":5,"aspect_ratio":"9:16"}'
node {baseDir}/scripts/video_gen.js wait --json '{"model":"...","prompt":"...","image":"https://...","duration":5}'
node {baseDir}/scripts/video_gen.js wait --json '{"model":"...","prompt":"...","images":["https://..."],"duration":5}'
node {baseDir}/scripts/video_gen.js wait --json '...' --dry-run

## `submit-*` — submit only (async; no wait)

```sh
node {baseDir}/scripts/video_gen.js submit-text --json '{"model":"…","prompt":"…","duration":5}'
node {baseDir}/scripts/video_gen.js submit-image --json '{"model":"…","prompt":"…","image":"https://…","duration":5}'
node {baseDir}/scripts/video_gen.js submit-multi-image --json '{"model":"…","prompt":"…","images":["https://…"],"duration":5}'

Technical Analysis

The Skill requires an agent to expand a user-supplied topic into a prompt and then insert the resulting JSON into a single-quoted shell argument. JSON escaping and shell escaping are separate secur ...[truncated 2495 chars]

Remediation
View remediation

Remediation Suggestions

  1. Do not construct a shell command by concatenating or interpolating JSON containing user-controlled values.
  2. Invoke Node.js with an argument-array API that does not use a shell. For example, use an execution interface equivalent to:
    javascript
    spawn(
      "node",
      [
        `${baseDir}/scripts/video_gen.js`,
        "wait",
        "--json",
        JSON.stringify(parameters)
      ],
      { shell: false }
    );
    
  3. Prefer passing request data through standard input. Add an option such as --json-stdin, read the complete JSON document from stdin, and invoke the program without embedding the document in shell syntax.
  4. Alternatively, write the JSON to a securely created temporary file with restrictive permissions and pass only the file path as an argument. Ensure the file is created atomically, is not vulnerable to symlink attacks, and is deleted after use.
  5. Update SKILL.md and resources/WERYAI_VIDEO_API.md so they do not instruct agents to interpolate expanded prompts into inline shell commands.
  6. If a shell is unavoidable, apply a well-tested, platform-specific argument-escaping library to the complete argument. Simple replacement of apostrophes or JSON encoding alone is insufficient.
  7. Add regression tests using prompts containing apostrophes, quotes, semicolons, command substitutions, newlines, and shell control operators. Verify that every value reaches video_gen.js literally and that no secondary process is launched.
  8. Continue requiring explicit user confirmation of the expanded prompt, but do not treat confirmation as a substitute for safe process invocation.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The documented behavior promises a tightly scoped, specialized workflow, but the underlying capability is more generic video generation with external model discovery and job management. This mismatch is dangerous because reviewers and users may approve the skill under false assumptions, while the implementation can send broader prompts, images, or metadata to third-party services than expected. Security controls based on the declared purpose may therefore be bypassed in practice.

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
- **API hosts:** `video_gen.js` uses **`https://api.weryai.com`** (tasks) and **`https://api-growth-agent.weryai.com`** (models list).

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill declares network and environment variable requirements but does not define an explicit tool/permission scope. That creates a trust gap: an agent may invoke code with broader-than-expected access to secrets and outbound network, making review and runtime containment weaker. In this skill’s context, the presence of WERYAI_API_KEY and external API calls increases the risk of unintended secret exposure or unauthorized network use.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill states 'English only' on screen unless the user opts out, which makes a language choice mandatory by default rather than user-selected. This is a natural-language policy concern because it forces a specific locale/language behavior without prior opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This line directs the skill to translate user input into English on-screen text by default, instead of obtaining affirmative user choice. That creates a language-policy violation because a specific language is imposed unless the user actively overrides it.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The trigger tests include broad implicit phrases like '99% don’t know,' 'supply chain shock,' and generic contrast-edit language that can match ordinary video-editing or marketing requests beyond the intended skill boundary. This can cause unintended invocation of the skill, leading the agent to activate specialized behavior in unrelated contexts and reducing user control over tool selection.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation explicitly directs users to send prompts and public image URLs to external WeryAI hosts but does not warn that user-supplied content will leave the local environment and be transmitted to third-party services. In this skill context, prompts may include sensitive supply-chain narratives, proprietary product details, or private media, so the omission can cause unintentional data disclosure and poor consent handling.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The top-of-file doc comment presents the CLI description, commands, examples, and environment-variable guidance entirely in Chinese. This imposes a specific language on users without any opt-in, alternative locale, or documented reason that the tool must be Chinese-only, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The file mentions the sensitive WERYAI_API_KEY and only says not to commit it, but gives no broader guidance on secure handling such as avoiding logs, shell history exposure, shared terminals, or accidental inclusion in generated outputs. This increases the chance of credential leakage through normal operational use rather than through code execution.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.