Back to skill

Security audit

Real mousic

Security checks for vulnerabilities and agentic risk

Overview

This music-download skill needs review because it combines song-link retrieval with overbroad agent-routing rules, stealth browser automation, arbitrary URL navigation, and risky local process cleanup.

Install only if you are comfortable with a skill that launches and controls Chrome, uses anti-detection browser automation, contacts third-party music/link services, and may expose you to copyright or unsafe-download risk. Prefer running it in an isolated browser profile or disposable environment, avoid passing arbitrary detail URLs or custom ports, and do not let it override your normal choice of search tools or music sources.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (3)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:52
Finding

Mandatory Skill Routing and Branded Output Hijack Agent Behavior

Content
View full analysis
music-search -> display results -> user selection -> music-download -> return download link ``` The document then supplies mandatory branded response templates containing the Skill name and mascot. ### Technical Analysis These instructions do more than document how to invoke the Skill. They attempt to control the host agent's tool-selection policy by prohibiting independent search tools, alternative websites, and alternative workflows. This is an instruction-hijacking pattern because loading the Skill changes how the agent handles an entire category of user requests. The restrictions are not required for the underlying functionality, which only needs permission to run the local CLI when the user elects to use it. The mandatory branded output also redirects stable agent responses toward promotion of this specific Skill and its third-party link source. The behavior exceeds least privilege at the instruction layer: the Skill needs permission to offer one music-search mechanism, but it does not need authority to disable all competing mechanisms. ### Attack Path 1. The agent load ...[truncated 1056 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
src/real_mousic/music/search.py:258
Finding

Arbitrary Browser Navigation Through Unvalidated Detail URL

Content
View full analysis
DownloadInfo: """Get song download links. Args: page: CDP Page object song: Search result Returns: Download information """ logger.info(f"Getting download links: {song.title} - {song.artist}") # Navigate to the song detail page page.navigate(song.detail_url) page.wait_for_load() time.sleep(2) ``` The value originates from an unrestricted CLI argument: ```python sub = subparsers.add_parser("download", help="Get download links") sub.add_argument("--detail-url", required=True, help="Song detail-page URL") sub.add_argument("--title", help="Song title") sub.add_argument("--artist", help="Artist") sub.add_argument("--song-id", help="Song ID") sub.set_defaults(func=cmd_music_download) ``` ### Technical Analysis The `download` command accepts an arbitrary `--detail-url`, stores it in a `SearchResult`, and sends it directly to Chrome through `Page.navigate`. There is no validation of: - URL scheme. - Exact hostname. - Destination IP address. - Redirect destination. - Loopback, private, link-local, or local-network ranges. - Whether the URL belongs to the declared `www.gequhai.com` service. The declared functionality only requires navigation to trusted song-detail pages on `www.gequhai.com`. Allowing arbitrary destinations therefore exceeds the required network scope. Because navigation occurs in a real browser, an attacker can cause requests from the user's network context. The subsequent extraction code evaluates the loaded document and reads selected link attributes. A malicious page can arrange matching elements so that selected values are returned th ...[truncated 1418 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
src/real_mousic/chrome_launcher.py:190
Finding

Cleanup Can Terminate Unrelated Processes Based Only on Port Ownership

Content
View full analysis
bool: if is_port_open(port): return True ``` Cleanup falls back to resolving and terminating every process associated with that port: ```python # Strategy 3: find and terminate the process by port if is_port_open(port): pids = _find_pids_by_port(port) if pids: for pid in pids: _kill_pid(pid) logger.info("Terminated Chrome through process termination (port=%d)", port) ``` The termination helper does not verify that the PID is Chrome or that it was created by this invocation: ```python def _kill_pid(pid: int) -> None: """Terminate the specified PID across platforms.""" try: if sys.platform == "win32": subprocess.run( ["taskkill", "/PID", str(pid), "/F"], capture_output=True, timeout=5, ) else: import signal os.kill(pid, signal.SIGTERM) except Exception: logger.debug("Failed to terminate process %d", pid) ``` Every CLI workflow invokes this cleanup from a `finally` block: ```python finally: browser.close_page(page) browser.close() kill_chrome(port=args.port) ``` ### Technical Analysis Port availability is not proof of process identity. `ensure_chrome` returns success whenever the selected port is open, without first confirming that the service implements Chrome DevTools Protocol or belong ...[truncated 1846 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (38)

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 · .gitignore (reported line 138)May include surrounding context.

text
*.sage.py

# Environments
.env
.envrc
.venv
env/

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Browser fingerprint spoofing, automation concealment, and Chrome startup flags intended to hide automated control are classic anti-detection mechanisms. In a skill advertised as a benign music search/download helper, these capabilities are especially suspicious because they suggest deliberate attempts to bypass website defenses or mask the true nature of automated activity.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Browser fingerprint spoofing, automation concealment, and Chrome startup flags intended to hide automated control are classic anti-detection mechanisms. In a skill advertised as a benign music search/download helper, these capabilities are especially suspicious because they suggest deliberate attempts to bypass website defenses or mask the true nature of automated activity.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Browser fingerprint spoofing, automation concealment, and Chrome startup flags intended to hide automated control are classic anti-detection mechanisms. In a skill advertised as a benign music search/download helper, these capabilities are especially suspicious because they suggest deliberate attempts to bypass website defenses or mask the true nature of automated activity.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Browser fingerprint spoofing, automation concealment, and Chrome startup flags intended to hide automated control are classic anti-detection mechanisms. In a skill advertised as a benign music search/download helper, these capabilities are especially suspicious because they suggest deliberate attempts to bypass website defenses or mask the true nature of automated activity.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Browser fingerprint spoofing, automation concealment, and Chrome startup flags intended to hide automated control are classic anti-detection mechanisms. In a skill advertised as a benign music search/download helper, these capabilities are especially suspicious because they suggest deliberate attempts to bypass website defenses or mask the true nature of automated activity.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The browser wrapper can enumerate existing Chrome targets and attach to arbitrary tabs, including reusing non-skill pages via get_existing_page and get_page_by_target_id. That creates a cross-context control channel into whatever the local browser already has open, enabling interaction with unrelated authenticated sessions, sensitive content, and user activity far outside the stated song-download purpose.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

This file implements comprehensive browser anti-detection and fingerprint spoofing, including masking automation signals, faking browser APIs, and overriding hardware/network characteristics. In a song search/download skill, these measures are not necessary for normal functionality and instead indicate an attempt to evade bot detection and access controls on third-party sites, increasing the risk of abusive scraping or policy circumvention.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill explicitly facilitates searching for and obtaining song download links from a third-party music site, but the documentation omits legal, compliance, and trust-boundary warnings. In an agent context, this can lead operators or downstream systems to use the skill for copyright-infringing downloads or to interact with an untrusted site via browser automation without informed consent or safeguards.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The invocation examples use very broad natural-language phrases like '帮我下载' and '搜索…' without any documented boundaries, exclusions, or disambiguation rules. In an agent platform, this can cause the skill to trigger unexpectedly on ordinary conversation and route users into a workflow that fetches third-party download links, increasing the risk of unintentional activation and policy-violating content acquisition.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill declares shell, network, and environment-dependent behavior but does not explicitly constrain tool scope via permissions or allowed-tools. In practice this weakens least-privilege boundaries and makes it easier for a triggered skill to invoke powerful capabilities without transparent review, especially given the skill’s instructions to run CLI commands and manage local browser processes.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Overly broad trigger phrases can cause the skill to activate on routine music-related conversation, increasing the chance that a high-capability skill runs unintentionally. Because this skill appears to have shell, network, and hidden browser automation capabilities, accidental activation materially increases risk and reduces meaningful user consent.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

The trigger keyword '听歌' is extremely vague and overlaps with ordinary conversational requests, making accidental invocation likely. In context, broad activation is more dangerous because the skill claims music functionality while static analysis indicates much broader automation powers.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This song-download skill includes a generic Chrome remote-debugging launcher on a fixed localhost port with reusable profile support, which is broader than needed for its stated purpose. Exposing CDP access and launching a full browser profile can enable local browser hijacking, cookie/session exposure, and unintended control of an existing browser instance if another local process can reach the debugging port.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · src/real_mousic/chrome_launcher.py (reported line 163)May include surrounding context.

python
logger.info("使用代理: %s", _mask_proxy(proxy))

    logger.info("启动 Chrome: port=%d, headless=%s, profile=%s", port, headless, user_data_dir)
    process = subprocess.Popen(
        args,
        stdout=subprocess.DEVNULL,
        stderr=subprocess.DEVNULL,

Internal Network Request

Medium
Category
Server-Side Request Forgery
Confidence
70% confidence
Finding

Code issues a request to a loopback, link-local, or private-range host. This can reach internal services not meant to be exposed and is a common SSRF pivot.

Content

Scanner excerpt · src/real_mousic/chrome_launcher.py (reported line 204)May include surrounding context.

python
try:
        import requests

        resp = requests.get(f"http://127.0.0.1:{port}/json/version", timeout=2)
        if resp.status_code == 200:
            ws_url = resp.json().get("webSocketDebuggerUrl")
            if ws_url:

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · src/real_mousic/chrome_launcher.py (reported line 330)May include surrounding context.

python
"""查找占用指定端口的进程 PID(跨平台)。"""
    try:
        if sys.platform == "win32":
            result = subprocess.run(
                ["netstat", "-ano", "-p", "TCP"],
                capture_output=True,
                text=True,

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · src/real_mousic/chrome_launcher.py (reported line 346)May include surrounding context.

python
pids.append(int(parts[-1]))
            return list(set(pids))
        else:
            result = subprocess.run(
                ["lsof", "-ti", f":{port}"],
                capture_output=True,
                text=True,

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The code can terminate arbitrary processes discovered by port ownership rather than only a process it launched itself. In a shared environment, this can kill unrelated Chrome or non-Chrome processes bound to that port, causing denial of service, data loss in unsaved browser state, or disruption of other user activity.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · src/real_mousic/chrome_launcher.py (reported line 367)May include surrounding context.

python
"""终止指定 PID 的进程(跨平台)。"""
    try:
        if sys.platform == "win32":
            subprocess.run(
                ["taskkill", "/PID", str(pid), "/F"],
                capture_output=True,
                timeout=5,

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The module docstring states Chinese-only behavior, and the CLI later emits Chinese hints and messages throughout the file. This creates a locale policy issue because the skill imposes a specific language on all users with no opt-in, fallback, or documented region-specific justification.

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 file contains natural-language documentation and operational messages only in Chinese, including the module docstring and log strings. Under the language/locale policy, forcing a specific language without user opt-in or a documented regional justification is a policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The set_file_input method can programmatically upload arbitrary local files into a webpage without an explicit confirmation step. In a skill that should only search/download songs, this creates unnecessary exfiltration risk if other code paths, prompts, or future extensions pass sensitive local file paths into the method.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This file implements a full-featured browser automation layer with stealth injection, user-agent spoofing, input simulation, screenshotting, DOM manipulation, cookie setting, and drag/click behaviors that are far broader than a song search/download skill requires. In this skill context, anti-detection and generalized page-control capabilities materially expand abuse potential for covert web interaction, scraping, account workflow manipulation, or bypassing site defenses.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill injects a stealth script on every new document and overrides browser identity to evade automation detection, but there is no user-facing disclosure or consent flow. Hidden automation-evasion behavior is risky because it conceals the agent's nature from websites and operators, increasing the chance of policy bypass, deceptive access, and misuse without informed user awareness.

Content

No source excerpt is available for this finding.