Back to skill

Security audit

快捷搜索歌曲播放链接

Security checks for vulnerabilities and agentic risk

Overview

This is a small music-search skill that runs a local Node script and contacts music APIs; the main risks are disclosed poorly but are limited to search-query privacy and terminal output handling.

Install only if you are comfortable sending music search terms to the external services kw-api.cenguigui.cn and api.xcvts.cn. Avoid entering private or identifying information as a search query, and treat displayed playback or detail links as untrusted third-party content.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/quick-music.js:48
Finding

Unsanitized Third-Party API Content Is Written to the Terminal

Content
View full analysis
{ const name = (song.name || song.song || song.title || "未知").padEnd(28); const artist = song.artist || song.singer || song.author || "未知"; console.log(`${String(i + 1).padStart(4)} ${name} ${artist}`); }); ``` Additional affected output sinks appear at lines 94–105: ```js if (playUrl) { console.log(`🎶 ${title} - ${artist}`); console.log(`🔗 播放链接: ${playUrl}`); if (link) console.log(`🌐 详情页: ${link}`); if (cover) console.log(`🖼️ 封面: ${cover}`); if (lrc) console.log(`📝 歌词: ${lrc}`); console.log(); } else { console.log("未找到播放链接,返回数据:"); console.log(JSON.stringify(data, null, 2)); } ``` ### Technical Analysis Song names, artist names, URLs, and fallback response data originate from third-party API responses. These values are written directly to an interactive terminal without removing terminal control characters, ANSI escape sequences, or Operating System Command sequences. If either API is compromised or returns attacker-controlled metadata, a response can contain escape sequences that compatible terminal emulators interpret rather than display literally. Depending on terminal capabilities and configuration, this can: - Clear or rewrite portions of the visible terminal. - Forge trusted-looking status messages or conceal subsequent text. - Create misleading hyperlinks. - Change terminal presentation. - Attempt clipboard manipulation through mechanisms such as OSC 52. TLS reduces ordinary network tampering but does not protect against a compromised, malicious, or incorrectly configured API provider. The raw JSON fallback is also unsafe because JSON encoding does not provide terminal-specific escaping. ### Attack Path 1. An attacker gains control over data returned by one o ...[truncated 995 chars]
Remediation
View remediation

other

Note
Location
scripts/quick-music.js:9
Finding

Music Queries Are Disclosed to Undocumented Third-Party Services

Content
View full analysis
Remediation
View remediation
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 (10)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/quick-music.js "周杰伦"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/quick-music.js "周杰伦"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/quick-music.js "周杰伦"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/quick-music.js "周杰伦"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/quick-music.js "周杰伦"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/quick-music.js "周杰伦"

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill advertises and likely relies on network access, but its manifest does not declare any tool scope such as permissions or allowed-tools. This creates an authorization and transparency gap: callers and reviewers cannot clearly see that external network access is required, which can enable unintended data exfiltration or use of broader runtime capabilities than expected.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest description and the entire user-facing documentation are written in Chinese, with no indication that other languages are supported or that the locale restriction is intentional and justified. This can violate language/locale policy because it implicitly requires Chinese comprehension without user opt-in.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
91% confidence
Finding

This skill sends user-supplied search terms to third-party domains outside the local environment, which creates a real data exposure risk because user queries are transmitted to untrusted external services. While external API use is expected for a music search tool, the code provides no consent prompt, trust boundary notice, domain allowlist control, or validation of the returned playback URLs before presenting them to the user.

Content

Scanner excerpt · scripts/quick-music.js (reported line 10)May include surrounding context.

js
import { parseArgs } from "node:util";

const SEARCH_API = "https://kw-api.cenguigui.cn/";
const PLAY_API = "https://api.xcvts.cn/api/music/migu";

const HEADERS = {
  accept: "*/*",

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The request headers hard-code accept-language to zh-CN,zh;q=0.9, which imposes a specific language/locale preference on all outbound requests. This is a natural-language policy concern because the script does not offer the user any choice or explain why Chinese locale is required.

Content

No source excerpt is available for this finding.