Back to skill

Security audit

ControlFoley Audio Generator

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent cloud audio generator, but its script has concrete flaws that can expose local files or fetch untrusted URLs during normal use.

Review before installing. Use only non-sensitive media and avoid prompt/model/negative values beginning with @ or < until the curl form handling is fixed. Treat returned downloads as untrusted and prefer a patched version that uses a native multipart HTTP client, validates download URLs, and enforces size limits.

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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/foley.py:20
Finding

Local File Disclosure Through curl Multipart Form Argument Injection

Content
View full analysis
str: """Submit text-to-audio task. Returns task_id.""" import subprocess cmd = [ "curl", "-s", "-X", "POST", f"{API_BASE}/api/v1/v2a/submit", "-F", f"model={model}", "-F", f"prompt={prompt}", "-F", f"duration={duration}", "-F", f"cfg_strength={cfg_strength}", "-F", f"count={count}", ] if negative_prompt: cmd += ["-F", f"negative_prompt={negative_prompt}"] if seed is not None: cmd += ["-F", f"seed={seed}"] ``` The same unsafe pattern is present in the video submission function: ```python cmd = [ "curl", "-s", "-X", "POST", f"{API_BASE}/api/v1/v2a/submit", "-F", f"model={model}", "-F", f"file=@{video_path}", "-F", f"cfg_strength={cfg_strength}", "-F", f"count={count}", ] if prompt: cmd += ["-F", f"prompt={prompt}"] if negative_prompt: cmd += ["-F", f"negative_prompt={negative_prompt}"] if reference_audio and os.path.isfile(reference_audio): cmd += ["-F", f"reference_audio=@{reference_audio}"] ``` ### Technical Analysis Although `subprocess.run` receives an argument list and therefore does not invoke a shell, the values are still interpreted by curl's multipart form parser. The `-F`/`--form` option gives values beginning with `@` or `<` special local-file semantics. Consequently, an attacker-controlled textual field such as `prompt`, `negative_prompt`, or `model` can cause curl to read a local file rather than transmit the value as literal text. For example, a prompt value of `@/home/use ...[truncated 1293 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/foley.py:111
Finding

Unrestricted Fetching of Server-Controlled Result URLs

Content
View full analysis
str: """Download file from URL. Falls back to API download endpoint for internal URLs.""" filename = url.split("/")[-1] output = os.path.join(output_dir, filename) try: url = urllib.parse.quote(url, safe=':/') print(f"[..] Downloading {url} to {output}", file=sys.stderr) data = urllib.request.urlopen(url, timeout=60).read() except (urllib.error.URLError, urllib.error.HTTPError): # Internal URLs (.xiaomi.srv) may not be accessible; use API download endpoint if task_id and filename: fallback = f"{API_BASE}/api/v1/v2a/ControlFoley_output/{task_id}/{filename}" print(f"[!!] Direct URL failed, trying API endpoint: {fallback}", file=sys.stderr) data = urllib.request.urlopen(fallback, timeout=60).read() else: raise with open(output, "wb") as f: f.write(data) ``` ### Technical Analysis The URLs passed to `download` originate from the remote status response: ```python urls = resp.get("processed_urls") or resp.get("urls") or [] ``` The code opens each supplied URL without validating its scheme, hostname, resolved IP address, port, or redirects. `urllib.request.urlopen` can therefore be directed to destinations other than the documented ControlFoley HTTPS service. Depending on available URL handlers and runtime behavior, this can include local files, loopback services, private network endpoints, link-local cloud metadata services, or attacker-operated servers. Checking only the original hostname would also be insufficient because HTTP redirects are followed automatically. Every redirect target and resolved address must be ...[truncated 1511 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (8)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill documentation describes both shell and network-capable behavior, including local command execution via Python/curl/ffmpeg and uploads to a remote API, but it does not declare any explicit tool scope such as allowed-tools or permissions. This creates a trust and review gap: an agent platform may permit broader capabilities than users expect, increasing the chance of unintended command execution or external data transfer.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The API reference instructs clients to upload video and optional reference audio files to a remote third-party service but provides no privacy, consent, retention, or data-handling warning. This can cause users or downstream integrators to transmit sensitive media without understanding that personal, proprietary, or biometric content is leaving the local environment.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest describes an audio generation tool for text-to-audio and video-to-audio, which reasonably implies network access to a generation API. However, spawning an external command-line program is a broader execution capability than necessary for that purpose, since the rest of the file already uses Python HTTP libraries for similar API calls.

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

python
if seed is not None:
        cmd += ["-F", f"seed={seed}"]

    result = subprocess.run(cmd, capture_output=True, text=True, timeout=30)
    if result.returncode != 0:
        raise RuntimeError(f"Submit failed: {result.stderr}")
    resp = json.loads(result.stdout)

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
76% confidence
Finding

The manifest says the skill supports video-to-audio, so reading a local video file is expected. But this implementation also conditionally uploads an additional arbitrary reference_audio file to the remote API, expanding local-file exfiltration capability beyond the clearly stated text-to-audio and video-to-audio scope.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The code uploads local video and optional reference-audio files to a remote service without any explicit user-facing warning, consent prompt, or privacy disclosure. This can lead users to unknowingly transmit sensitive local media or embedded metadata to a third party, which is a meaningful privacy and compliance risk.

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

python
if seed is not None:
        cmd += ["-F", f"seed={seed}"]

    result = subprocess.run(cmd, capture_output=True, text=True, timeout=60)
    resp = json.loads(result.stdout)
    tid = resp.get("task_id") or resp.get("taskId")
    if tid:

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The script writes downloaded output files into the chosen output directory, creating persistent local files. Although the code logs the save path after writing, it does not clearly warn beforehand in documentation or help text that running the skill will create files on disk.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.