Back to skill

Security audit

Audio Handler

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a coherent audio-processing helper, but one bundled conversion script has an artifact-backed command-injection risk through its quality argument.

Review before installing if the agent may process untrusted audio requests or parameters. The skill should validate numeric quality inputs and use shell arrays for ffmpeg options before relying on convert_audio.sh; until then, only invoke it with trusted, simple numeric quality values and inspect side-effecting commands before execution.

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

Error
Location
scripts/convert_audio.sh:53
Finding

Command and Argument Injection Through Unvalidated Audio Quality Input

Content
View full analysis
Remediation
View remediation
&2 exit 1 fi ``` 2. **Apply format-specific numeric ranges.** For example, reject zero, negative, excessively large, or otherwise unsupported bitrate values. For OGG, calculate the mapped quality only after validation and clamp or reject results outside ffmpeg's accepted range. ```bash if (( QUALITY < 1 || QUALITY > 512 )); then echo "Error: Quality is outside the supported range." >&2 exit 1 fi ``` 3. **Use a Bash array for ffmpeg options instead of constructing a string.** ```bash qual_opts=() case "$OUT_EXT" in mp3) CODEC="libmp3lame" if [[ -n "$QUALITY" ]]; then qual_opts=(-b:a "${QUALITY}k") else qual_opts=(-qscale:a 2) fi ;; ogg) CODEC="libvorbis" if [[ -n "$QUALITY" ]]; then ogg_quality=$((10#$QUALITY / 40)) qual_opts=(-qscale:a "$ogg_quality") else qual_opts=(-qscale:a 5) fi ;; esac ffmpeg -y -v warning -i "$INPUT" -codec:a "$CODEC" \ "${qual_opts[@]}" "$OUTPUT" ``` 4. **Use `10#` for validated decimal arithmetic** to prevent values with leading zeroes from being interpreted under an unintended numeric base. 5. **Reject unexpected argument counts** so trailing or malformed inputs cannot be silently ignored. 6. **Consider restricting ffmpeg protocols** if the Skill only needs local file conversion. A suitable protocol allowlist reduces the impact of future ffmpeg argument-handling defects. 7. **Add regression tests** covering nonnumeric values, whitespace, shell metacharacters, arithmetic expressions, command substitutions, negative numbers, leading zeroes, and out-of-range values. The tests should verify that validation fails before ffmpeg is invoked. ]]>
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (3)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger text is very broad: it activates on generic mentions of audio files, paths, or requests to process audio without meaningful narrowing conditions. In an agent environment, this can cause the skill to engage unexpectedly on ordinary conversation or unrelated tasks, increasing the chance that powerful file-processing commands are suggested or run in the wrong context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This section includes system-affecting commands such as background playback, process termination with killall, file creation/overwrite, and file deletion in command chains, but it does not warn users about side effects. In a semi-autonomous agent setting, missing safety notes makes it easier to disrupt running processes, overwrite files, or remove temporary data without informed consent.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The comment on L32 says the script will 'encode for accuracy,' but the primary ffmpeg invocation on L33 uses '-c:a copy', which performs stream copy rather than encoding. Re-encoding only happens in the fallback path on L35, so the documentation of the main behavior is contradictory rather than merely incomplete.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.