Back to skill

Security audit

Dark Ritual Transform Video Gen Seedance2.0

Security checks for vulnerabilities and agentic risk

Overview

This paid WeryAI video skill is mostly transparent, but its bundled tool can use the user's API key for broader video-generation models and modes than the skill advertises.

Review before installing. Use a separate or minimally scoped WeryAI API key if possible, expect paid credit consumption, and do not submit confidential prompts or private/internal image URLs. The agent instructions say to use only SEEDANCE_2_0, but the bundled CLI itself does not enforce that limit.

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

Warning
Location
scripts/video_gen.js:161
Finding

Executable Does Not Enforce the Skill's Declared Model and Input Restrictions

Content
View full analysis

Vulnerability Details

File Location: scripts/video_gen.js:161-164, 173-191, 195-212
Vulnerability Type: Missing server-request scope validation
Risk Level: Medium

Complete Code Snippet

js
function detectMode(params) {
  if (Array.isArray(params.images) && params.images.length > 0) return 'multi_image';
  if (typeof params.image === 'string' && params.image) return 'image';
  return 'text';
}

function coerceBool(v, defaultVal = false) {
  if (v == null) return defaultVal;
  if (typeof v === 'boolean') return v;
  return String(v).toLowerCase() === 'true';
}

function hasNonEmptyModel(params) {
  const m = params.model;
  return m != null && String(m).trim() !== '';
}

function buildRequestBody(params) {
  const model = String(params.model).trim();
  const body = {
    prompt: params.prompt,
    model,
    duration: Number(params.duration) || 5,
  };
  if (params.aspect_ratio) body.aspect_ratio = params.aspect_ratio;
  if (params.resolution) body.resolution = params.resolution;
  if (params.generate_audio != null) body.generate_audio = coerceBool(params.generate_audio, false);
  if (params.negative_prompt) body.negative_prompt = params.negative_prompt;
  if (params.image) body.image = params.image;
  if (params.images) body.images = params.images.slice(0, 3);
  return body;
}

async function submitTask(params, apiKey) {
  if (!hasNonEmptyModel(params)) {
    return {
      ok: false,
      phase: 'failed',
      errorCode: 'MISSING_PARAM',
      errorMessage: "'model' is required in JSON parameters (no default model).",
    };
  }
  const mode = detectMode(params);
  const pathMap = {
    text: '/v1/generation/text-to-video',
    image: '/v1/generation/image-to-video',
    multi_image: '/v1/generation/multi-image-to-video',
  };
  const body = buildRequestBody(params);
  let res;
  try {
    res = await apiRequest('POST', pathMap[mode], body, apiKey);

Technical Analysis

The Skill documentation limits execution to the `SEEDANCE ...[truncated 2246 chars]

Remediation
View remediation

Remediation Suggestions

  1. Enforce the model in executable code:
js
if (String(params.model).trim() !== 'SEEDANCE_2_0') {
  return validationError("Only SEEDANCE_2_0 is permitted by this Skill.");
}
  1. Reject negative_prompt and images rather than silently forwarding them.
  2. Permit only text-to-video and single-image-to-video requests.
  3. Bind each command to its declared endpoint. For example, submit-text must reject image and images, while submit-image must require exactly one image.
  4. Validate image with new URL() and require the https: protocol. If the threat model requires it, resolve and reject loopback, link-local, private-network, and otherwise non-public destinations.
  5. Enforce the documented allowlists:
    • Duration: 5, 10, or 15
    • Aspect ratio: 9:16, 1:1, or 16:9
    • Resolution: 480p or 720p
    • Prompt length: no more than 2,000 characters
    • generate_audio: strict Boolean input
  6. Reject unknown JSON fields so future or undocumented API capabilities cannot be reached accidentally.
  7. Perform validation before any paid API request and return a structured validation error.
  8. Add automated negative tests covering arbitrary models, multi-image payloads, forbidden fields, malformed URLs, local URLs, invalid durations, and command/mode mismatches.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (12)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill markets itself as tightly constrained to a specific gothic Seedance 2.0 workflow, but the referenced behavior indicates broader video-generation and model-discovery capabilities. That mismatch can mislead operators into granting trust, secrets, or execution approval under false assumptions, while the underlying script may perform actions outside the advertised scope.

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 20)May include surrounding context.

md
- `WERYAI_API_KEY` **must be set** before running `video_gen.js`.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `WERYAI_API_KEY` **must be set** before running `video_gen.js`.

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
- `WERYAI_API_KEY` **must be set** before running `video_gen.js`.

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
- `WERYAI_API_KEY` **must be set** before running `video_gen.js`.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `WERYAI_API_KEY` **must be set** before running `video_gen.js`.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill is presented as a narrowly scoped 'Seedance 2.0-only' gothic transformation tool, but the implementation is a generic WeryAI video generation CLI that accepts arbitrary prompts, arbitrary model identifiers, and multiple generation modes. This scope mismatch is dangerous because it defeats least-privilege and reviewer/user expectations, enabling broader capability than advertised and creating an opportunity to bypass policy or marketplace controls tied to the declared skill purpose.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill declares runtime requirements for environment secrets and network access, but does not explicitly scope or constrain tool permissions. In an agent ecosystem, missing tool-scope declarations make it harder for reviewers and enforcement layers to limit what the skill can access, increasing the chance of overbroad secret exposure or unintended outbound requests.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The markdown instructs that prompts must be turned into a full English production prompt before every run, making English mandatory regardless of the user's preferred language. This is a natural-language policy concern because it forces a specific language without documenting user choice, opt-in, or a justified locale restriction.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documentation directs users to send prompts, API-authenticated requests, and public media URLs to external WeryAI endpoints but does not clearly disclose that potentially sensitive prompts and media will leave the local environment and be processed by a third-party service. This creates a real privacy and data-handling risk because users may unknowingly transmit confidential text, proprietary images, or internal URLs to an external vendor.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The top-level doc comment presents the skill’s commands, examples, and environment-variable guidance entirely in Chinese. For a general-purpose CLI, this imposes a specific language/locale on users without any opt-in, alternative language support, or documented region-specific justification.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The model-registry enumeration capability exposes broader platform functionality than the skill description suggests and is unrelated to a narrowly scoped transformation skill. While not directly leading to code execution, it increases capability discovery and can help users or downstream agents pivot to unintended models or workflows outside the declared safety and product boundary.

Content

No source excerpt is available for this finding.