Back to skill

Security audit

DJ mp3 sourcer

Security checks for vulnerabilities and agentic risk

Overview

This skill is coherent for user-directed music sourcing and MP3 cleanup, but it uses external downloader tools and can rename local files in place.

Install the downloader tools in an isolated environment, use the skill only for music you are allowed to access, and run the normalization script only on a dedicated download folder or backup copy because it renames files in place.

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

T08 · Insecure Dependencies

Warning
Location
SKILL.md:21
Finding
Unpinned Third-Party Executable Dependencies<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 21-26 **Vulnerability Type**: Supply-chain risk from unpinned executable dependencies **Risk Level**: Medium ### Vulnerable Code ```bash pip install yt-dlp spotdl brew install ffmpeg # needed by yt-dlp for audio extraction # optional pip install bandcamp-dl # for free bandcamp downloads ``` ### Technical Analysis The documented setup installs third-party executable packages without fixed versions, cryptographic hashes, a lockfile, or explicit trusted repository constraints. Consequently, the code installed by the same instructions can change over time without any corresponding change to the reviewed skill. Python packages can execute code during installation and subsequently when their command-line entry points are invoked. The Homebrew package is similarly obtained from a mutable external package ecosystem. A compromised upstream release, compromised package account, dependency-confusion event, or malicious transitive dependency could therefore introduce code that was not included in this audit. There is no evidence that the currently named packages are malicious. The vulnerability is the absence of controls ensuring that future installations resolve to reviewed artifacts. ### Attack Path 1. An attacker compromises a named package, one of its transitive dependencies, or the relevant distribution channel. 2. The attacker publishes a malicious release under a version accepted by the unpinned installation command. 3. A user or agent follows the skill instructions and runs `pip install` or `brew install`. 4. The package manager retrieves the mutable malicious release. 5. Malicious code executes during installation or when `yt-dlp`, `spotdl`, `bandcamp-dl`, or `ffmpeg` is subsequently invoked. ### Impact Assessment Successful exploitation can provide arbitrary code execution with the privileges of the user performing installation or running the installed tools. This may expose fil ...[truncated 546 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin every Python package to a reviewed, exact version. 2. Maintain a lockfile containing all transitive dependency versions. 3. Require cryptographic hashes, such as with `pip install --require-hashes -r requirements.txt`. 4. Explicitly use trusted package indexes and disable unintended extra indexes. 5. Pin or otherwise document a reviewed Homebrew formula version or immutable package artifact. 6. Install Python dependencies inside a dedicated virtual environment or isolated container. 7. Add automated dependency scanning and update dependencies only through reviewed changes. 8. Verify package publisher identities, release signatures, checksums, and expected package names before installation. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/normalize-filenames.sh:33
Finding
Unsanitized Track Metadata Used in Destination Paths and Regular Expressions<![CDATA[ ## Vulnerability Details **File Location**: `scripts/normalize-filenames.sh`, lines 33-70 **Vulnerability Type**: Path traversal, unsafe filename construction, and regular-expression injection **Risk Level**: Medium ### Vulnerable Code ```bash for i in $(seq 0 $((COUNT - 1))); do ARTIST=$(jq -r ".[$i].artist" "$TRACKLIST") TITLE=$(jq -r ".[$i].title" "$TRACKLIST") # Skip ID tracks if [[ "$ARTIST" == "ID" && "$TITLE" == "ID" ]]; then continue fi TARGET="${ARTIST} - ${TITLE}.mp3" # If target already exists, skip if [[ -f "$DIR/$TARGET" ]]; then ((SKIPPED++)) continue fi # Extract keywords for fuzzy matching (longest word from artist + title) # Use the first artist name and key title words ARTIST_KEY=$(echo "$ARTIST" | awk -F'[,&]' '{print $1}' | xargs | tr '[:upper:]' '[:lower:]') TITLE_KEY=$(echo "$TITLE" | sed 's/([^)]*)//g' | xargs | tr '[:upper:]' '[:lower:]') MATCH="" for f in "$DIR"/*.mp3; do [[ ! -f "$f" ]] && continue BASENAME=$(basename "$f") [[ "$BASENAME" == *"Full Mix"* ]] && continue LOWER=$(echo "$BASENAME" | tr '[:upper:]' '[:lower:]') # Check if filename contains key parts of both artist and title if echo "$LOWER" | grep -qi "$ARTIST_KEY" && echo "$LOWER" | grep -qi "$TITLE_KEY"; then MATCH="$f" break fi done if [[ -n "$MATCH" ]]; then mv "$MATCH" "$DIR/$TARGET" echo "✅ $(basename "$MATCH") → $TARGET" ((RENAMED++)) fi done ``` ### Technical Analysis The `artist` and `title` properties are read from the supplied JSON tracklist and incorporated directly into `TARGET`. Quoting prevents shell word splitting and command substitution, but it does not make the resulting value a safe filename. An attacker-controlled value can contain `/` and `..` path components. As a result, the destination passed to `mv` can resolve outside `DIR`. Whether a particular payload succeeds depends on the generated path and whether it ...[truncated 2318 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Validate that `artist` and `title` are JSON strings and reject null values, arrays, objects, and malformed entries. 2. Reject path separators, `.` and `..` path components, control characters, and newline characters. 3. Convert metadata into a sanitized basename using an explicit allowlist of acceptable filename characters. 4. Canonicalize both `DIR` and the proposed destination, then verify that the destination remains directly beneath `DIR`. 5. Use fixed-string matching rather than regular expressions: ```bash grep -Fqi -- "$ARTIST_KEY" grep -Fqi -- "$TITLE_KEY" ``` 6. Prefer shell-native literal comparisons where practical, avoiding subprocess parsing of attacker-controlled patterns. 7. Use `printf '%s\n'` instead of `echo` for untrusted strings. 8. Prevent replacement by using `mv -n -- "$MATCH" "$DESTINATION"` and report destination conflicts. 9. Consider assigning each track a stable identifier instead of relying on ambiguous fuzzy filename matching. 10. Add tests covering traversal strings, slashes, newlines, leading hyphens, regex metacharacters, duplicate targets, and concurrent destination creation. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (5)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The declared description is for a multi-platform music acquisition/downloading skill. The supplied code does something materially different: it validates a local directory and tracklist file, reads artist/title entries with jq, fuzzy-matches existing .mp3 filenames, and renames matched files. There is no network access, no link handling, no downloader logic, no source prioritization, no paid/free platform logic, and no output-format conversion. This is a clear description-behavior mismatch because the code’s primary purpose is filename normalization of already-downloaded MP3s, not music downloading.

Vague Triggers

Medium
Confidence
88% confidence
Finding
The invocation scope is broad enough that the skill may trigger on ordinary music-link requests without strong user confirmation or narrowing conditions. In context, that can cause the agent to perform external lookups and downloads for many benign prompts, increasing the chance of unintended network access, copyright-sensitive actions, and unsafe handling of untrusted URLs.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The skill explicitly directs downloading from external services but does not prominently warn about privacy, network, or untrusted-content risks. Because it processes arbitrary user-supplied links and invokes external tools, users may unknowingly expose IP address, system metadata, or local environment to third-party services and downloaded media could be malicious or unwanted.

Behavior Manipulation

Medium
Category
Prompt Injection
Content
## Core Rule: Prefer Extended Mixes

**Always prefer the extended mix over radio edits.** An extended mix from a lower-priority source beats a radio edit from a higher-priority one.

Example: extended mix on YouTube > radio edit on Spotify.
Confidence
70% confidence
Finding
Subtle instructions detected that may alter agent decision-making or introduce hidden biases.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
This shell script performs in-place file rename operations via mv, which can materially alter user data organization. Although each rename is echoed after it happens, there is no prior confirmation prompt or explicit warning before changes begin.

Static analysis

No suspicious patterns detected.