Back to skill

Security audit

sn-motion-html

Security checks for vulnerabilities and agentic risk

Overview

This video-story builder needs review because its API key can be sent to an unchecked server address.

Before use, require a verified HTTPS API destination and prevent credentials from following redirects to other origins. Avoid running unfamiliar project configurations with an inherited API key. Use a dedicated key with spending limits, approve uploads and retry costs, and exclude .env from hosting and version control. Restore the missing .env.example before initialization. Live provider behavior was not tested.

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/seedance_pipeline.py
Finding

Paid-generation phases lack an enforced authorization gate

Content
View full analysis

Impact

An Agent invocation before approval or outside its scope can initiate paid generation and incur unauthorized charges.

Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (12)

Tainted flow: 'request' from os.getenv (line 51, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Authenticating to the intended generation provider is legitimate, but the bearer token is sent to an unrestricted ARK_BASE_URL without enforcing HTTPS or an approved origin. Because project-local .env values can supply that URL while an existing environment supplies the API key, an attacker-controlled project configuration could redirect a real credential to an attacker endpoint.

Content

Scanner excerpt · scripts/seedance_pipeline.py (reported line 62)May include surrounding context.

python
},
        )
        try:
            with urlopen(request, timeout=120) as response:
                return json.loads(response.read().decode("utf-8"))
        except HTTPError as exc:
            detail = exc.read().decode("utf-8", errors="replace")

Tainted flow: 'request' from os.getenv (line 94, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

The reported credential flow is inaccurate: this download request carries no API key. However, it opens an unvalidated provider-supplied video URL and follows redirects, so a compromised or attacker-controlled provider response could trigger requests to internal services or retrieve local files through supported URL schemes.

Content

Scanner excerpt · scripts/seedance_pipeline.py (reported line 95)May include surrounding context.

python
def download(url: str, path: Path) -> None:
    path.parent.mkdir(parents=True, exist_ok=True)
    request = Request(url, headers={"User-Agent": "sn-motion-html/1.0"})
    with urlopen(request, timeout=180) as response, path.open("wb") as target:
        shutil.copyfileobj(response, target)

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python scripts/seedance_pipeline.py . plan

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python scripts/seedance_pipeline.py . all --workers 4

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/init_project.py (reported line 68)May include surrounding context.

python
if relative != "tmp":
            (directory / ".gitkeep").touch()

    env = output / ".env"
    if not env.exists():
        shutil.copyfile(output / ".env.example", env)
        env.chmod(0o600)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/seedance_pipeline.py (reported line 27)May include surrounding context.

python
def load_dotenv(root: Path) -> None:
    path = root / ".env"
    if not path.exists():
        return
    for raw in path.read_text(encoding="utf-8").splitlines():

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/seedance_pipeline.py (reported line 288)May include surrounding context.

python
raise SystemExit("ffmpeg is required")
    key = os.getenv("ARK_API_KEY") or os.getenv("VOLCENGINE_API_KEY")
    if not key:
        raise SystemExit("ARK_API_KEY is not set in the project-local .env file")
    client = ArkClient(key, os.getenv("ARK_BASE_URL", "https://ark.cn-beijing.volces.com/api/v3"))
    if args.phase in {"dives", "all"}:
        run_dives(root, client, manifest, args)

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_read, file_write, network, shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/contact_sheet.py (reported line 39)May include surrounding context.

python
frames: list[tuple[str, Path]] = []
    for index, (kind, item) in enumerate(records):
        frame = frame_dir / f"{index:03d}-{kind}-{item['id']}.jpg"
        subprocess.run([
            "ffmpeg", "-v", "error", "-y", "-ss", str(duration / 2),
            "-i", str(root / item["output"]), "-frames:v", "1", str(frame),
        ], check=True)

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/seedance_pipeline.py (reported line 100)May include surrounding context.

python
def run_ffmpeg(args: list[str]) -> None:
    subprocess.run(["ffmpeg", "-v", "error", "-y", *args], check=True)


def normalize_video(source: Path, target: Path, manifest: dict[str, Any]) -> None:

Local prompts and conditioning images are uploaded to an external generation service without disclosure.

Medium
Category
Output Handling
Confidence
88% confidence
Finding

The submitted payload contains local prompt text and base64-encoded conditioning images (L139–L145), which are transmitted to the configured Ark endpoint. The script describes clip generation and prints progress, but does not disclose that these local contents leave the system.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/verify_media.py (reported line 43)May include surrounding context.

python
"-show_entries", "stream=codec_name,width,height,r_frame_rate,nb_frames:format=duration",
            "-of", "json", str(path),
        ]
        data = json.loads(subprocess.check_output(command, text=True))
        stream = data["streams"][0]
        duration = float(data["format"]["duration"])
        okay = (