Back to skill

Security audit

financial-card-video

Security checks for vulnerabilities and agentic risk

Overview

This skill coherently generates local financial-style card videos from user-provided JSON, with expected local file and media-tool use and no evidence of hidden network, persistence, or credential behavior.

Install only if you want a local Chinese-language financial card-video renderer and have Chrome plus ffmpeg available. Run it in a dedicated project directory, review the JSON/template/audio paths you pass in, and choose the output path carefully because the script creates parent directories and overwrites the target MP4.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (11)

Lp3

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding
The skill explicitly instructs use of local file access, file creation, and shell execution via Python, Chrome, and ffmpeg, but it does not declare any tool scope or permission boundary. In an agent environment, this can lead to overbroad execution authority, making it easier for a caller to induce reads of arbitrary local files, writes outside intended working directories, or unsafe command execution through the skill workflow.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
The manifest description and main skill content are written entirely in Chinese, and the skill does not indicate that users may choose another language or locale. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified.

Natural-Language Policy Violations

Medium
Confidence
90% confidence
Finding
The module docstring and generated HTML declare a Chinese-language context, and the HTML shell hard-codes lang="zh-CN". This appears to force a specific language/locale without opt-in or configurability, which matches the policy-violation criterion for locale restrictions.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The HTML template wrapper sets <html lang="zh-CN"> unconditionally for all rendered output. Because no alternative locale or user opt-in is provided, this is a clear forced locale choice in natural-language/config content.

subprocess module call

Medium
Category
Dangerous Code Execution
Content
"--screenshot=%s" % png_path,
        url,
    ]
    r = subprocess.run(cmd, capture_output=True, text=True, timeout=120)
    if r.returncode != 0:
        print("  [chrome stderr]", (r.stderr or "")[-600:])
    return Path(png_path).exists()
Confidence
70% confidence
Finding
subprocess module calls execute external commands. Without careful input validation, this enables command injection.

subprocess module call

Medium
Category
Dangerous Code Execution
Content
def probe_duration(path):
    """ffprobe 读媒体真实时长 (秒); 读不到返回 0.0。"""
    try:
        r = subprocess.run([ffprobe_path(), "-v", "error", "-show_entries",
                            "format=duration", "-of",
                            "default=noprint_wrappers=1:nokey=1", str(path)],
                           capture_output=True, text=True, timeout=60)
Confidence
70% confidence
Finding
subprocess module calls execute external commands. Without careful input validation, this enables command injection.

subprocess module call

Medium
Category
Dangerous Code Execution
Content
def probe_streams(mp4):
    r = subprocess.run([ffprobe_path(), "-v", "error", "-show_streams",
                        "-show_format", "-of", "json", str(mp4)],
                       capture_output=True, text=True, timeout=60)
    try:
Confidence
70% confidence
Finding
subprocess module calls execute external commands. Without careful input validation, this enables command injection.

subprocess module call

Medium
Category
Dangerous Code Execution
Content
cmd += ["-c:v", "libx264", "-preset", PRESET, "-crf", str(CRF),
            "-pix_fmt", "yuv420p", "-r", str(FPS),
            "-movflags", "+faststart", "-t", f"{total:.3f}", str(mp4)]
    r = subprocess.run(cmd, capture_output=True, text=True, timeout=1800)
    if r.returncode != 0:
        print("[ffmpeg stderr]", (r.stderr or "")[-2500:])
    return r.returncode == 0
Confidence
70% confidence
Finding
subprocess module calls execute external commands. Without careful input validation, this enables command injection.

subprocess module call

Medium
Category
Dangerous Code Execution
Content
print(f"[时长]    各卡时长 = {['%.2f' % d for d in durs]}")

    if a:
        r = subprocess.run([ffmpeg_path(), "-hide_banner", "-i", str(mp4),
                            "-af", "volumedetect", "-f", "null", "-"],
                           capture_output=True, text=True, timeout=120)
        mm = re.search(r"max_volume: (-?[\d.]+) dB", r.stderr or "")
Confidence
70% confidence
Finding
subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The HTML root sets `lang="zh-CN"`, and the file comments and visible template text are written for a Chinese locale. Under the policy, forcing a specific language/locale without user opt-in can be a natural-language policy violation when no alternative or justification is provided in the file.

Missing User Warnings

Low
Confidence
81% confidence
Finding
This code creates a temporary working directory, writes intermediate HTML/PNG files, creates the output directory, and writes the final MP4. Although the behavior is inferable from the script's purpose, there is no explicit safety disclosure in comments or runtime messaging that local files will be created and, with --keep-workdir, retained on disk.

Static analysis

No suspicious patterns detected.