Back to skill

Security audit

Apple Music DJ

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this Apple Music skill suspicious with medium confidence: scanners report account changes that can bypass promised confirmation, behavior and activation phrases that may exceed the stated scope, and incomplete inspection of some files.

Consider avoiding installation until the account-change confirmation behavior and unattended playlist creation are reviewed, and the partial scan coverage is resolved. The verdict is suspicious, not malicious; the scan does not establish harmful intent, and its incomplete coverage means it cannot provide full assurance.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (45)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

The release scanning, profile access, API queries, and optional playlist creation match the declared music-curation purpose. However, although --create-playlist makes creation opt-in, the script performs no confirmation step and passes --yes to the playlist builder. The supplied code therefore does not enforce the separate assurance that account changes are confirmed first. An upstream confirmation may exist, but none is shown here.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
86% confidence
Finding

The supplied chunk implements playlist health checking and repair, capabilities not disclosed in the otherwise extensive description of curation, recommendations, imports, and taste analysis. In particular, deleting duplicate entries from existing playlists is an additional account-modification capability, not merely an implementation detail of creating recommendations. The code does preserve an explicit opt-in gate for modifications, so it does not independently demonstrate a violation of the confirmation promise. No unrelated resource access or data exfiltration is evident in this chunk.

Content

No source excerpt is available for this finding.

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 156)May include surrounding context.

md
`verify_setup.sh` warn when the developer token is within 14 days of expiry or the user token is

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 538)May include surrounding context.

md
- To keep tokens off the process list, the API wrapper and `verify_setup.sh` hand them to `curl` through

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 582)May include surrounding context.

md
| `scripts/verify_setup.sh` | Bash | Setup verification (prereqs, tokens, API) |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 469)May include surrounding context.

md
| `references/troubleshooting.md` | User hits errors, things aren't working |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 562)May include surrounding context.

md
| `scripts/apple_music_api.sh` | Bash | API wrapper — all endpoints, retry logic |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 580)May include surrounding context.

md
| `scripts/concert_prep.sh` | Bash | Concert prep playlist builder |

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/api-reference.md (reported line 131)May include surrounding context.

Remove Tracks from Playlist

text
DELETE /v1/me/library/playlists/{id}/tracks
Content-Type: application/json

Same body shape as adding tracks. Wrapper: apple_music_api.sh remove-from-playlist <playlist_id> <json_file> --yes.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/api-reference.md (reported line 178)May include surrounding context.

Rate a Song

text
PUT    /v1/me/ratings/songs/{id}     body: {"type":"rating","attributes":{"value":1}}   (1 = love, -1 = dislike)
DELETE /v1/me/ratings/songs/{id}

Wrappers: apple_music_api.sh rate <id> <1|-1> --yes and apple_music_api.sh unrate <id> --yes. Writes to the account (need --yes).

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/troubleshooting.md (reported line 152)May include surrounding context.

Or remove just the cached profile (keeps your history, snapshots and config).

Ask before deleting — it's the user's data.

rm ~/.apple-music-dj/taste_profile.json

text

---

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/apple_music_api.sh (reported line 51)May include surrounding context.

sh
if [[ -n "${_CURL_PID:-}" ]]; then
    kill "$_CURL_PID" 2>/dev/null || true
  fi
  rm -f "${TMPDIR:-/tmp}"/am_api_$$_* "${TMPDIR:-/tmp}"/am_auth_$$_* "${TMPDIR:-/tmp}"/am_code_$$_* \
        "${TMPDIR:-/tmp}"/am_rate_$$_* 2>/dev/null || true
  return 0
}

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
70% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/apple_music_api.sh (reported line 138)May include surrounding context.

sh
}

_with_auth() {
  # Usage: _with_auth <dev|both> <curl args...>
  # Runs _retry with a temporary auth config that is always removed afterwards.
  local mode="$1"; shift
  local cfg rc=0

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
70% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · scripts/demo.py (reported line 574)May include surrounding context.

python
def demo_env(api_url: str) -> dict:
    """The child's environment: real Apple credentials removed, demo ones and a sandbox HOME set."""
    env = {k: v for k, v in os.environ.items() if not k.startswith("APPLE_")}
    env.update({
        "HOME": str(DEMO_HOME),
        "APPLE_MUSIC_API_BASE": api_url,

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/verify_setup.sh (reported line 27)May include surrounding context.

sh
if [[ -n "${_CURL_PID:-}" ]]; then
        kill "$_CURL_PID" 2>/dev/null || true
    fi
    rm -f "${TMPDIR:-/tmp}"/am_verify_$$_* 2>/dev/null || true
}
_CURL_PID=""
trap _cleanup EXIT

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
70% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/verify_setup.sh (reported line 34)May include surrounding context.

sh
trap '_cleanup; exit 130' INT
trap '_cleanup; exit 143' TERM

# _http_status <curl-config> <url> — sets HTTP_CODE ("000" on failure). curl runs in the
# background and we `wait` for it: bash defers traps until a foreground command finishes, so a
# plain `$(curl ...)` would ignore Ctrl-C/TERM until the request ended.
HTTP_CODE="000"

Generic invocation examples can activate music workflows outside a music-related request.

Medium
Category
Trigger Abuse
Confidence
96% confidence
Finding

The commands table maps everyday phrases such as "Surprise me" and "Show me what you can do" directly to music discovery and the demo tour. It does not require an established Apple Music context or provide exclusions, so unrelated requests could invoke this skill.

Content

No source excerpt is available for this finding.

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

Scanner excerpt · SECURITY.md (reported line 55)May include surrounding context.

md
2. **Keep `.env` in `.gitignore`** — The repo ships with this configured
3. **Rotate tokens periodically** — Dev tokens support up to 6-month lifetime
4. **Review cache contents** — `~/.apple-music-dj/` contains your taste profile
5. **Clear the cache when sharing machines** — list it first (`ls -la ~/.apple-music-dj`), then delete
   the folder yourself. It holds your taste profile, snapshots, playlist history and cron logs, and
   deleting it can't be undone. An agent should never do this without being asked.

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

Scanner excerpt · SKILL.md (reported line 553)May include surrounding context.

md
**Cache management:**
- Taste profile cache has a 7-day TTL by default
- The user can clear it by deleting the `~/.apple-music-dj/` folder (list it first with
  `ls -la ~/.apple-music-dj`; it holds their profile, snapshots, history and cron logs). Never delete
  it on your own initiative.
- Use `--max-age 0` to bypass cache and fetch fresh data

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_read, file_write, network, shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Activation conditions include common words and phrases without a music-context requirement.

Medium
Category
Trigger Abuse
Confidence
99% confidence
Finding

The activation instructions include unqualified phrases such as “similar to,” “more like,” “blend,” and “try the demo,” which routinely occur outside music requests. This can misroute unrelated tasks into music workflows and potentially trigger unnecessary listening-data access, although the separate write-confirmation requirements limit account-modification risk.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · SKILL.md (reported line 397)May include surrounding context.

md
OpenClaw has first-class cron and heartbeat support. This skill can automate the jobs below.
Unlike interactive requests, **a scheduled job runs unattended and writes on its own** if it is a
writing job. By default `setup_cron.py install` only schedules the report-only jobs (new releases,
daily drop, health check). The **weekly mix creates a playlist in the library without asking**, so it is opt-in: it is installed only when named
(`--jobs weekly-mix`). Installing any job is the user's approval, which is why `install` needs a
reviewed `--confirm` digest — say so when setting one up, and tell the user plainly that the weekly
mix will create playlists without asking each time.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · SKILL.md (reported line 400)May include surrounding context.

md
daily drop, health check). The **weekly mix creates a playlist in the library without asking**, so it is opt-in: it is installed only when named
(`--jobs weekly-mix`). Installing any job is the user's approval, which is why `install` needs a
reviewed `--confirm` digest — say so when setting one up, and tell the user plainly that the weekly
mix will create playlists without asking each time.

Jobs: **weekly-mix** (opt-in; creates a Trend Radar playlist every Monday), **new-releases** (weekly
report), **daily-drop** (daily pick), **health-check** (monthly report) and **monthly-drift** (opt-in,

Unrestricted Tool Access

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill grants unrestricted tool access without appropriate constraints. An agent with unfettered tool access can perform arbitrary actions including file modification, network requests, and code execution.

Content

Scanner excerpt · SKILL.md (reported line 568)May include surrounding context.

md
| `scripts/build_playlist.sh` | Bash | Playlist creation & refresh (create or add tracks); previews unless `--yes` is the last argument |
| `scripts/generate_dev_token.py` | Python | Developer JWT generator |
| `scripts/setup_auth.py` | Python | Guided setup: dev token + browser sign-in for the user token; `status` shows time left |
| `scripts/demo.py` | Python | Demo mode — tour or run any script against a local sample catalog, no tokens |
| `scripts/taste_card.py` | Python | Shareable Taste DNA Card (SVG/text) |
| `scripts/compatibility.py` | Python | Taste compatibility scoring (artist or profile) |
| `scripts/listening_insights.py` | Python | Timeline, streaks, milestones, year in review |

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/automation.md (reported line 23)May include surrounding context.

md
| Job | When | Runs | Writes to the account? |
|---|---|---|---|
| `weekly-mix` (opt-in: `--jobs weekly-mix`) | Mondays 7:00 | `strategy_engine.py --strategy trend --create` | **Yes** — creates a playlist each week without asking |
| `new-releases` | Wednesdays 8:00 | `new_releases.sh <profile> <storefront>` | No (report only; no `--create-playlist`) |
| `daily-drop` | Every day 8:30 | `daily_pick.py daily <profile> <storefront>` | No — the pick includes a token-renewal reminder when one is due |
| `health-check` | 1st of each month, 9:00 | `playlist_health.py check all` | No — to fix, run `playlist_health.py fix <id>` (a preview), show it, and add `--apply` only after a yes; `fix` is never scheduled |