Back to skill

Security audit

netease-music-assistant

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent NetEase music assistant, but its scheduling feature requires persistent system cron/plist jobs that users should review carefully before installing.

Install only if you are comfortable with the assistant storing music preference/history files and sending recommendation content to configured IM channels. Do not enable scheduled pushes unless you can review and revoke the exact cron/plist jobs it creates; a safer version should use a managed scheduler and provide clear list, disable, and delete controls.

Vulnerability Patterns
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • 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)

T06 · System Persistence

Error
Location
SKILL.md:258
Finding

Mandatory Registration of Persistent System Cron Tasks

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 258–270; reiterated at lines 300–303
Vulnerability Type: System-level scheduled-task persistence
Risk Level: High

Vulnerable Code

The Skill requires checking, modifying, and verifying the current user's crontab. The vulnerable command is reproduced below with its placeholders rendered in English:

bash
crontab -l
(crontab -l 2>/dev/null; echo "MINUTE HOUR * * * /usr/local/bin/node /path/to/main.js SCENARIO") | crontab -
crontab -l

It also states that updating the scheduling configuration must be synchronized to system cron and that missing rules must be registered.

Technical Analysis

The instruction installs a scheduled task that survives the current Skill invocation and executes a Node.js process in future sessions. This constitutes system persistence under T06: System Persistence.

Although scheduling recommendations is part of the declared functionality, directly changing the operating system's crontab exceeds the privileges needed for ordinary music searches, preference analysis, playback, and one-time recommendations. The scheduled command references an unspecified placeholder script and does not require validation of the executable's existence, ownership, integrity, permissions, or expected contents.

The command reconstructs the user's crontab by combining its current contents with a new entry. The instructions do not provide robust deduplication, transactional updates, shell-argument escaping, collision-resistant job identifiers, or removal and rollback procedures. Repeated scheduling requests could therefore create duplicate jobs. A mutable or incorrectly substituted script path could later cause unintended code to execute automatically with all permissions available to the account that owns the crontab.

Attack Path

  1. A user requests a scheduled recommendation, such as a daily music push.
  2. The Agent updates `ncm-schedu ...[truncated 1401 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove the requirement to modify crontab directly from the Skill instructions.
  2. Use a platform-managed scheduling API that provides scoped permissions, user-visible jobs, audit logs, and explicit consent.
  3. Require confirmation immediately before creating, changing, or enabling any persistent schedule.
  4. Use a fixed, application-owned executable path rather than a placeholder or user-controlled path.
  5. Validate the executable's canonical path, ownership, permissions, and integrity before registration.
  6. Pass scenario data through a structured configuration file or safely escaped arguments; never concatenate untrusted text into a shell command.
  7. Assign each schedule a stable unique identifier and perform idempotent updates to prevent duplicate jobs.
  8. Provide explicit disable, removal, rollback, and job-listing operations.
  9. Apply least privilege so scheduled jobs can access only the music configuration and messaging capabilities required for recommendations.
  10. If no trusted scheduler is available, retain the schedule only as inactive application configuration and clearly report that automatic execution is unavailable.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (14)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill mandates updating schedule files and system cron while presenting this as routine behavior, without requiring prominent warning or consent for host-level persistent changes. This is dangerous because it creates durable side effects beyond the conversation and can leave background jobs running indefinitely on the host.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill instructs the agent to manipulate system cron directly, creating persistent OS-level scheduled tasks outside the narrow scope of a music recommendation assistant. This introduces host-level side effects, persistence, and a path to unintended command execution if schedule parameters or command templates are ever influenced by user input or misconfigured paths.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The description includes pushing recommendation results to external IM channels such as Feishu but does not warn users that their music preferences or generated recommendations may be transmitted to third-party services. This creates privacy and data-sharing risk, particularly if recommendations embed inferred preferences or behavioral patterns.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger conditions include broad natural-language phrases like wanting to listen to music or get recommendations, which can activate the skill unexpectedly in ordinary conversation. Overbroad activation increases the chance of unanticipated tool use, profile access, file writes, or external pushes without the user clearly intending to invoke this skill.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill defines local state files for preferences, history, and schedules and instructs reading and writing them without any user-facing notice or consent. Persisting behavioral data and recommendation history to disk creates privacy and transparency risks, especially when the files reveal listening habits and timing patterns.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The instructions prescribe a fixed Chinese response string for blocked requests, and the document consistently assumes a single language experience without user opt-in. There is no explicit statement that the skill is intentionally limited to Chinese users or that users may choose another language, which creates a language policy concern.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
86% confidence
Finding

Referring to updates of schedule state alongside plist indicates intent to create platform-level persistent scheduling artifacts beyond the current session. Even without full implementation detail here, it signals expansion into durable background execution that exceeds the least-privilege needs of a music assistant.

Content

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

md
| **模糊/自动推送** | 单独"网易云",无具体描述 | 读偏好缓存 → 自主决策搜索策略 |
| **明确搜索** | 含具体描述(心情/场景/曲风/艺人/片名等) | 直接进入搜索策略 |
| **需要澄清** | 描述模糊、方向不明确 | **先问 1~2 个问题**,再搜索 |
| **调度管理** | 含"推送时间/开启/关闭/几点"等调度语义 | 更新 ncm-schedule.json + plist,输出确认 |
| **偏好分析** | 含"分析偏好/我喜欢什么" | 强制刷新偏好分析 |

**澄清原则**:问题简洁、不超过2个、优先问最影响搜索结果的维度(如:心情/场景/偏中文还是英文/节奏快慢)。

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

The skill directs downloading remote cover images to local temporary files for later delivery, expanding its behavior into remote fetch and filesystem write operations not essential to core music recommendation. That broadens attack surface for malicious URLs, oversized content, unsafe file handling, and privacy leakage through external fetches.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
96% confidence
Finding

Checking and reconciling cron jobs is part of establishing persistence across sessions on the host. For a music assistant, this persistence is more dangerous because it is unrelated to immediate user interaction and can survive beyond the current conversation, increasing the blast radius of mistakes or abuse.

Content

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

md
1. 解析自然语言 → 更新 `ncm-schedule.json`(见格式)
2. **【关键】同步注册到系统 cron** - 必须执行以下步骤:
   - 检查当前 cron 任务:`crontab -l`
   - 对比 `ncm-schedule.json` 中的规则,确认每个规则都在 cron 中注册
   - 对于新添加的规则,使用以下命令注册(示例):
     ```bash

Session Persistence

Medium
Category
Rogue Agent
Confidence
98% confidence
Finding

The provided command appends a new crontab entry, directly creating persistent execution on the system. Because it writes OS-level scheduled commands, any misuse or parameter injection can result in repeated unauthorized execution long after the user interaction ends.

Content

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

md
- 对比 `ncm-schedule.json` 中的规则,确认每个规则都在 cron 中注册
   - 对于新添加的规则,使用以下命令注册(示例):
     ```bash
     (crontab -l 2>/dev/null; echo "分 时 * * * /usr/local/bin/node /path/to/main.js 场景") | crontab -
     ```
   - 验证注册成功:再次执行 `crontab -l` 确认任务存在
3. 检测你是否有调度能力

Session Persistence

Medium
Category
Rogue Agent
Confidence
95% confidence
Finding

Verifying task existence in cron confirms successful persistence and encourages the agent to maintain durable background execution state. In a music skill, this persistence is not inherently necessary and increases operational and security risk if stale or malicious tasks remain installed.

Content

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

bash
     (crontab -l 2>/dev/null; echo "分 时 * * * /usr/local/bin/node /path/to/main.js 场景") | crontab -
     ```
   - 验证注册成功:再次执行 `crontab -l` 确认任务存在
3. 检测你是否有调度能力
   - 如果你拥有定时调度能力,请一定将用户诉求写入你的调度系统中!然后做下面的操作:
      - 输出确认:「已设置:[规则描述],下次触发:[时间]」

Session Persistence

Medium
Category
Rogue Agent
Confidence
95% confidence
Finding

Requiring cron synchronization after updating a schedule file ties application state to persistent host-level execution. This creates a durable side effect beyond session scope and makes accidental or unauthorized background actions more likely.

Content

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

md
- 用户主动搜索结果**不计入** history(不影响自动推送去重)
- 推荐时主动考虑是否适合创建歌单——尤其是"特定主题/影视/艺人"类需求
- **【调度关键】更新 `ncm-schedule.json` 后必须同步注册到系统 cron(crontab),否则定时任务不会生效**
   - 检查方法:`crontab -l`
   - 注册方法:`(crontab -l 2>/dev/null; echo "分 时 * * * /usr/local/bin/node /path/to/main.js 场景") | crontab -`
   - 验证方法:再次执行 `crontab -l` 确认新任务存在

Session Persistence

Medium
Category
Rogue Agent
Confidence
98% confidence
Finding

The registration example explicitly writes a shell command into crontab, establishing persistent execution using host binaries and paths. This is high risk because any path misuse, environment discrepancy, or future injection into the command string can become recurring arbitrary command execution.

Content

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

md
- 推荐时主动考虑是否适合创建歌单——尤其是"特定主题/影视/艺人"类需求
- **【调度关键】更新 `ncm-schedule.json` 后必须同步注册到系统 cron(crontab),否则定时任务不会生效**
   - 检查方法:`crontab -l`
   - 注册方法:`(crontab -l 2>/dev/null; echo "分 时 * * * /usr/local/bin/node /path/to/main.js 场景") | crontab -`
   - 验证方法:再次执行 `crontab -l` 确认新任务存在

Session Persistence

Medium
Category
Rogue Agent
Confidence
94% confidence
Finding

The instruction to verify newly installed cron entries reinforces persistent state on the host and operationalizes durability as a requirement. For this skill context, that makes the issue more concerning because persistent jobs are outside the minimum needed scope for music recommendations.

Content

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

md
- **【调度关键】更新 `ncm-schedule.json` 后必须同步注册到系统 cron(crontab),否则定时任务不会生效**
   - 检查方法:`crontab -l`
   - 注册方法:`(crontab -l 2>/dev/null; echo "分 时 * * * /usr/local/bin/node /path/to/main.js 场景") | crontab -`
   - 验证方法:再次执行 `crontab -l` 确认新任务存在

Static analysis

No suspicious patterns detected.