Back to skill

Security audit

Wjs Reframing Video

Security checks for vulnerabilities and agentic risk

Overview

This video-cropping skill is coherent and disclosed, with ordinary media-processing risks around dependencies and a first-run model download.

Install this only in an environment where you are comfortable running ffmpeg and Python media libraries on local videos. For stronger safety, pin dependency versions, verify the downloaded MediaPipe model hash, and review output paths because ffmpeg is invoked with overwrite behavior for the chosen output file.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
scripts/crop.py:34
Finding

Unpinned Python Dependencies and Unverified Remote Model Artifact

Content
View full analysis
Path: if MODEL_PATH.exists(): return MODEL_PATH MODEL_PATH.parent.mkdir(parents=True, exist_ok=True) print(f"Downloading face landmarker model -> {MODEL_PATH}") import urllib.request urllib.request.urlretrieve(MODEL_URL, MODEL_PATH) return MODEL_PATH ``` ### Technical Analysis The documented installation command does not pin dependency versions or verify package hashes. Consequently, the exact versions and contents installed for `mediapipe`, `opencv-python`, and `numpy` depend on the package index state at installation time. Python packages may execute installation or imported runtime code with the privileges of the invoking user. The script also downloads a MediaPipe model over HTTPS and immediately treats the resulting file as trusted. HTTPS protects the connection in transit under normal conditions, but the script does not verify an expected cryptographic digest or signature. It also trusts any existing file at `MODEL_PATH` without validating its integrity. A compromised distribution endpoint, altered upstream artifact, or locally re ...[truncated 2472 chars]
Remediation
View remediation
\ --hash=sha256: opencv-python== \ --hash=sha256: numpy== \ --hash=sha256: ``` Install them using hash enforcement: ```bash python -m pip install --require-hashes -r requirements.txt ``` 2. Generate and review hashes separately for each supported platform and Python version. Use a controlled package index or mirror where practical. 3. Record an expected SHA-256 digest for `face_landmarker.task`. Download the model to a temporary file, calculate its digest, reject any mismatch, and atomically rename it into the cache only after successful verification. 4. Validate cached model files on every use rather than trusting existence alone. Remove and securely replace a cache entry whose digest does not match. 5. Apply restrictive permissions to the model directory and file so that unrelated local users cannot replace the cached artifact. 6. Add download timeouts, size limits, and cleanup on failure to reduce denial-of-service and partial-file risks. 7. Consider packaging the reviewed model with the skill when licensing and distribution constraints permit. If remote retrieval remains necessary, publish the expected digest in version-controlled source code or verify a trusted digital signature. ]]>
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (7)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill clearly describes behaviors requiring shell execution, file creation, and network access, including ffmpeg/ffprobe invocation, writing output files and sidecars, and first-run model download, but it declares no explicit tool scope or permissions. This creates an avoidable overreach risk: an agent may grant broader-than-necessary capabilities implicitly, making misuse or accidental execution of external commands and network fetches harder to constrain or audit.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The code introduces network-download capability that is not clearly necessary at runtime for the advertised functionality, making the skill more dangerous than users would reasonably expect. In a media-processing skill, undeclared external fetching is particularly concerning because users may assume their content is handled fully offline while the tool depends on remote resources during execution.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill silently performs runtime network access to download a model, despite its stated purpose being local video reframing. This expands the trust boundary to an external host, can leak usage metadata, and creates a supply-chain risk if the download source, TLS trust store, or fetched artifact is compromised.

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/crop.py (reported line 74)May include surrounding context.

python
# --- input probing ---

def probe(path: Path):
    out = subprocess.run(
        ["ffprobe", "-v", "error", "-select_streams", "v:0",
         "-show_entries", "stream=width,height,avg_frame_rate",
         "-show_entries", "format=duration",

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/crop.py (reported line 122)May include surrounding context.

python
model_path = ensure_face_model()
    with tempfile.TemporaryDirectory() as td:
        td = Path(td)
        subprocess.run(
            ["ffmpeg", "-nostdin", "-y", "-i", str(input_path),
             "-vf", f"fps={sample_fps}", "-q:v", "3",
             str(td / "f_%06d.jpg")],

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/crop.py (reported line 586)May include surrounding context.

python
str(out_path),
    ]
    print(f"Rendering: {out_path}")
    subprocess.run(cmd, check=True)
    print("Done.")

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The description includes mandatory trigger examples in Chinese alongside region-specific platforms, but does not state that other languages are equally supported or that locale is optional. This can create an implicit language/locale constraint in the skill's invocation guidance.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.