Back to skill

Security audit

Transcribe audio via Groq API (~10x cheaper than OpenAI API)

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it claims by sending selected audio to Groq for transcription, but its shell script has a real argument-handling flaw that can unintentionally upload other local files.

Review this before installing or using it with automated inputs. It is appropriate for sending chosen audio files to Groq, but avoid passing untrusted values into --prompt, --model, or --language until the script uses literal form fields such as --form-string for non-file parameters. Do not use it for confidential recordings unless you are comfortable sending them to Groq's API.

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/transcribe.sh:75
Finding
Arbitrary Local File Disclosure Through Unsafe curl Multipart Form Values<![CDATA[ ## Vulnerability Details **File Location**: `scripts/transcribe.sh`, lines 75–78 **Vulnerability Type**: Local file disclosure through curl form-value interpretation **Risk Level**: Medium ### Vulnerable Code ```bash -F "model=${model}" \ -F "response_format=${response_format}" \ ${language:+-F "language=${language}"} \ ${prompt:+-F "prompt=${prompt}"} \ ``` ### Technical Analysis The `model`, `language`, and `prompt` variables can be controlled through command-line options. They are passed to `curl` using `-F`, which applies special multipart-form semantics to values beginning with `@`. Such a value is interpreted as a local filename whose contents should be read and included in the multipart request. Consequently, a value such as `--prompt @/etc/passwd` can cause `curl` to read the specified local file and transmit its contents to `https://api.groq.com/openai/v1/audio/transcriptions`. The remote API may reject the malformed field, but the sensitive content has already been transmitted by that point. The audio-file field intentionally requires `-F "file=@${in}"`; however, scalar fields such as the model, language, response format, and prompt should not use file-upload interpretation. ### Attack Path 1. An attacker gains the ability to influence arguments passed to `transcribe.sh`, such as through an automated agent workflow or a wrapper that forwards untrusted values. 2. The attacker supplies a scalar option beginning with `@`, for example: ```bash ./scripts/transcribe.sh audio.m4a --prompt @/home/user/.ssh/id_rsa ``` 3. The script assigns the attacker-controlled value to `prompt`. 4. `curl -F` interprets `@/home/user/.ssh/id_rsa` as a request to read that local file. 5. The file contents are inserted into the multipart request and transmitted to Groq's API endpoint. 6. Even if the endpoint rejects the request, disclosure has already occurred. ### Impact Assessment This issue permits disclosure of arbitrary local files re ...[truncated 472 chars]
Remediation
<![CDATA[ ## Remediation Suggestions Use `--form-string` for every scalar multipart field so values beginning with `@`, `<`, or other special characters are treated as literal strings. Retain `-F` only for the intended audio-file upload. A robust implementation can construct the curl arguments with a Bash array: ```bash curl_args=( -sS "https://api.groq.com/openai/v1/audio/transcriptions" -H "Authorization: Bearer $GROQ_API_KEY" -H "Accept: application/json" -F "file=@${in}" --form-string "model=${model}" --form-string "response_format=${response_format}" ) if [[ -n "$language" ]]; then curl_args+=(--form-string "language=${language}") fi if [[ -n "$prompt" ]]; then curl_args+=(--form-string "prompt=${prompt}") fi curl "${curl_args[@]}" >"$out" ``` Using an argument array also prevents unintended word splitting and preserves prompts containing spaces or shell metacharacters. As defense in depth: 1. Validate `model` against an explicit allowlist of supported model identifiers. 2. Validate `language` against the expected language-code format. 3. Add regression tests using values such as `@/etc/passwd` and verify that no local file content is included in the request. 4. Run the Skill with the minimum filesystem permissions required for its intended operation. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Lp3

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding
The skill invokes shell-based functionality (`curl` via a script) but does not declare any tool scope such as `permissions` or `allowed-tools`. That weakens least-privilege controls and can cause the agent or reviewer to underestimate the skill's execution capabilities, which is especially relevant because the skill handles user-supplied file paths and network access.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill documentation does not clearly warn users that provided audio is transmitted to Groq's remote API for transcription. This creates a privacy and data-handling risk because users may supply sensitive recordings under the assumption processing is local, leading to unintended disclosure of confidential or regulated content to a third party.

External Transmission

Medium
Category
Data Exfiltration
Content
mkdir -p "$(dirname "$out")"

curl -sS https://api.groq.com/openai/v1/audio/transcriptions \
  -H "Authorization: Bearer $GROQ_API_KEY" \
  -H "Accept: application/json" \
  -F "file=@${in}" \
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
This shell script uploads the provided audio file to a remote service using curl, which transmits potentially sensitive user data off-system. Although network transmission is central to transcription, the file itself provides no explicit warning, confirmation, or descriptive comment/log indicating that the audio will be sent to Groq's external API.

Static analysis

No suspicious patterns detected.