Back to skill

Security audit

Music Search

Security checks for vulnerabilities and agentic risk

Overview

The skill broadly matches music-resource search, but its file-reading, URL-fetching, and runtime dependency installation behaviors need careful review before installation.

Install only if you are comfortable with a skill that performs live third-party crawling, can install Python packages at runtime, caches results locally, and currently has unsafe @file and URL-fetching behavior. Do not pass untrusted arguments to it, avoid using it in environments with sensitive local files or internal network access, and prefer a revised version that removes @file expansion, validates URLs, pins dependencies, and parses .env safely.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (6)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/music-search.sh:39
Finding

Arbitrary Local File Disclosure Through Bash Argument Expansion

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/music-search.ps1:48
Finding

Arbitrary Local File Disclosure Through PowerShell Argument Expansion

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/music-search.js:892
Finding

Server-Side Request Forgery in URL Resolution

Content
View full analysis
"); process.exit(1); } try { const resp = await fetch(url, { redirect: "follow", signal: AbortSignal.timeout(config.timeout), }); if (!resp.ok) throw new Error(`HTTP ${resp.status}`); const html = await resp.text(); ``` ### Technical Analysis The `resolve` command accepts a caller-controlled URL and retrieves it with the privileges and network position of the skill process. The implementation does not validate the scheme, hostname, port, resolved IP address, or redirect destinations. Because redirects are followed automatically, validating only the initial hostname would not be sufficient. An attacker-controlled public endpoint could redirect the request to localhost, a private address, a link-local service, or a cloud metadata endpoint. The response body is read without an explicit maximum-size limit. The code subsequently scans it for supported cloud-drive links, creating a response-disclosure channel when an internal page contains matching URLs. HTTP status and timing behavior may also provide a limited internal-network probing oracle. ### Attack Path 1. An attacker invokes: ```text music-search.js resolve ``` 2. The URL directly targets an internal service, or a public attacker-controlled server redirects to one. 3. Node.js follows the redirect and sends the request from the host running the skill. 4. The response body is downloaded and searched for cloud-drive URLs. 5. Matching internal content is returned in the command's JSON output; status, error, and timing differences may reveal service availability even when ...[truncated 562 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/deep_extract.py:146
Finding

Server-Side Request Forgery in Deep Page Extraction

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/music-search.sh:24
Finding

Arbitrary Command Execution Through Sourced Environment File

Content
View full analysis
/dev/null || true set +a fi ``` ### Technical Analysis Bash `source` interprets the entire `.env` file as shell code rather than parsing it as configuration data. Consequently, command substitutions, function definitions, redirections, pipelines, and arbitrary shell statements execute whenever the wrapper starts. The documentation encourages users to edit `.env` as a collection of configuration values, which creates an expectation that it is data-only. If another process, package operation, archive extraction, or user can modify that file, invoking any skill command becomes a code-execution trigger. Redirecting errors and appending `|| true` suppresses visible failures but does not prevent payload execution. ### Attack Path 1. An attacker gains the ability to create or modify the skill's `.env` file. 2. The attacker inserts shell syntax, for example a command substitution within an apparent assignment. 3. A user or agent invokes any command through `music-search.sh`. 4. The wrapper sources `.env` before starting Node.js. 5. The injected command executes with the same operating-system permissions as the skill process. ### Impact Assessment Successful exploitation provides arbitrary command execution under the account running the skill. The attacker can read or modify that account's files, access its environment and credentials, initiate network connections, and alter application state. This finding does not establish that `.env` is currently attacker-writable; exploitation depends on an attacker obtaining write access through another channel. Sourcing it nevertheless turns any such configuration compromise into immediate code e ...[truncated 15 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding

Automatic Installation of an Unpinned Third-Party Dependency

Content
View full analysis
=1.2.71 ``` `scripts/music-search.js`: ```javascript // 4. Auto-create venv and install cloudscraper try { process.stderr.write("[deep-search] 首次使用,正在安装 cloudscraper...\n"); const reqFile = path.join(skillDir, "requirements.txt"); await execFileAsync(python3, ["-m", "venv", path.join(skillDir, ".venv")], { timeout: 30000, }); const pipPython = venvPython; await execFileAsync(pipPython, ["-m", "pip", "install", "-q", "-r", reqFile], { timeout: 60000, }); _pythonPath = venvPython; process.stderr.write("[deep-search] cloudscraper 安装完成\n"); return _pythonPath; } catch (err) { ``` ### Technical Analysis The dependency constraint permits any `cloudscraper` release at or above version `1.2.71`. No lock file, transitive dependency pins, integrity hashes, or explicit trusted package index are provided. When the package is not already importable, normal skill execution automatically creates a virtual environment and invokes pip. This downloads and installs whichever versions the package resolver selects at that time. Package installation and import can execute third-party code under the user's account. This is a supply-chain weakness rather than evidence that the currently named package is malicious. The risk is that the effective dependency set can change after the skill has been audited. ### Attack Path 1. Deep search starts on a host where `cloudscraper` is not available. 2. `ensurePythonEnv` automatically creates `.venv`. 3. Pip resolves `cloudscraper>=1.2.71` and all transitive dependencies from its configured index. 4. A compromised future release, compromised transitive dependency, package-index attack, or resolver substitution supplies mal ...[truncated 539 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (18)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared purpose says the skill searches music resources from specific cloud-drive providers, but the documented output also includes magnet links and describes generic deep crawling and redirect resolution. This mismatch hides materially broader collection and link-extraction behavior, which increases the chance of unsafe invocation, policy bypass, or use for piracy/malware distribution beyond the stated scope.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/music-search.ps1 (reported line 25)May include surrounding context.

text
exit 1
}

# ---- Load .env configuration ----
$envFile = Join-Path $SkillDir ".env"
if (Test-Path $envFile) {
    Get-Content $envFile | ForEach-Object {

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/music-search.ps1 (reported line 26)May include surrounding context.

text
}

# ---- Load .env configuration ----
$envFile = Join-Path $SkillDir ".env"
if (Test-Path $envFile) {
    Get-Content $envFile | ForEach-Object {
        $line = $_.Trim()

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/music-search.sh (reported line 28)May include surrounding context.

sh
}

# ---- Load .env configuration ----
$envFile = Join-Path $SkillDir ".env"
if (Test-Path $envFile) {
    Get-Content $envFile | ForEach-Object {
        $line = $_.Trim()

Credential Access

High
Category
Privilege Escalation
Confidence
91% confidence
Finding

The script automatically loads and sources a .env file from the skill directory using the shell. Because source executes shell syntax rather than safely parsing key/value pairs, a modified .env can run arbitrary commands in the user's environment when the skill starts. In a skill ecosystem where package contents may be updated or tampered with, this increases risk beyond normal configuration loading.

Content

Scanner excerpt · scripts/music-search.sh (reported line 24)May include surrounding context.

sh
exit 1
fi

# ---- Load .env configuration ----
if [ -f "$SKILL_DIR/.env" ]; then
  set -a
  # shellcheck disable=SC1091

Credential Access

High
Category
Privilege Escalation
Confidence
96% confidence
Finding

The specific statement source "$SKILL_DIR/.env" causes the shell to execute the contents of the .env file. An attacker who can modify that file can achieve arbitrary code execution at skill launch, inheriting the user's privileges and exported environment. The surrounding '|| true' may also suppress errors and make malicious or malformed behavior less visible.

Content

Scanner excerpt · scripts/music-search.sh (reported line 25)May include surrounding context.

sh
fi

# ---- Load .env configuration ----
if [ -f "$SKILL_DIR/.env" ]; then
  set -a
  # shellcheck disable=SC1091
  source "$SKILL_DIR/.env" 2>/dev/null || true

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill declares executable behavior that uses environment access and live network activity, but it does not define an explicit tool/permission scope. That creates a transparency and containment problem: an agent or reviewer cannot easily tell what capabilities are intended, and the skill may be granted broader execution than necessary.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The description lists trigger phrases including "找音乐" and especially "找歌", which are common conversational requests rather than narrowly scoped activation terms. Because the manifest does not provide exclusion conditions or tighter context constraints, these phrases may overlap with ordinary user speech and trigger the skill too broadly.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill performs live crawling of third-party pages, installs Python dependencies, and uses deep page fetching, but the top-level description does not prominently warn users that invocation causes active network requests and content retrieval. This lack of up-front disclosure can lead to unexpected outbound access to untrusted sites and exposure to malicious pages or sensitive browsing contexts.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The module docstring describes the skill entirely in Chinese, and later user-visible errors and status output are also Chinese-only. This imposes a specific language/locale on users without opt-in or any documented justification that the skill is region-specific, matching the language policy violation criteria.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill is described as searching cloud-drive music resources, but the code also extracts BitTorrent magnet links via MAGNET_PATTERN and returns them as results. This expands the capability beyond the declared scope, increasing legal/compliance risk and enabling distribution workflows the user and platform may not have expected or approved.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The skill launches external bash and Python subprocesses to perform search and extraction, adding interpreter execution and dependency on external scripts outside the main Node.js process. While execFile avoids classic shell injection, this still increases attack surface because compromised helper scripts, manipulated environment variables, or unexpected interpreter behavior can lead to unauthorized code execution or data access.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill automatically creates a Python virtual environment and installs dependencies at runtime, which introduces network access and code execution beyond its declared purpose of searching for music links. This expands the trust boundary significantly: package installation can fetch and execute unpinned third-party code, and doing so implicitly at runtime makes behavior less auditable and more dangerous in restricted or sensitive environments.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code presents its primary usage text and multiple user-facing messages entirely in Chinese, which imposes a specific language on users without any opt-in or alternative locale path. The policy for natural-language behavior requires either user choice or a clearly documented, justified locale constraint.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

Lines L25-L39 automatically ingest configuration from .env and set process environment variables, which can include sensitive credentials or alter downstream runtime behavior. Although the code is straightforward, there is no confirmation prompt, visible warning, or explanatory comment indicating to users that local secret-bearing configuration will be loaded.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This shell script includes natural-language comments and an emitted error message in Chinese, with no indication that another language can be selected. Under the policy rule for language/locale, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The note instructs users to search using Chinese artist and album or song names for best results, which effectively imposes a language preference in the skill guidance. The file does not offer an opt-in language choice or explain that the skill is intentionally limited to a Chinese-language corpus or region-specific use case.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
89% confidence
Finding

The dependency is specified with a lower bound only (cloudscraper>=1.2.71), which allows installation of any newer version without review. This weakens build reproducibility and can unintentionally pull in a compromised, malicious, or breaking upstream release, increasing supply-chain risk for a skill that fetches external resources from the internet.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
cloudscraper>=1.2.71