Back to skill

Security audit

智能音频分离工具

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent local audio-splitting tool, but its unauthenticated localhost API can expose, alter, or delete local task files too broadly.

Review before installing. Only run this bound to localhost, do not leave it running while browsing untrusted sites, avoid processing sensitive audio until auth/CORS/path validation are fixed, and use a virtual environment with pinned dependencies. Do not rely on the stated 24-hour cleanup unless you verify or add that cleanup yourself.

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

T05 · Unauthorized Access and Privilege Escalation

Error
Location
rules/server.py:21
Finding

Unauthenticated Cross-Origin Access to Sensitive and Destructive APIs

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
rules/server.py:462
Finding

Path Traversal in Task and Track Paths Can Reach Files Outside Intended Directories

Content
View full analysis
Remediation
View remediation
str: if not TASK_ID_PATTERN.fullmatch(task_id): raise HTTPException(status_code=400, detail="Invalid task ID") return task_id ``` 2. Allow only known track names: ```python ALLOWED_TRACKS = { "vocals", "accompaniment", "drums", "bass", "piano", "other" } ``` 3. Resolve and verify every derived path: ```python base = OUTPUT_DIR.resolve() task_dir = (base / task_id).resolve() if not task_dir.is_relative_to(base) or task_dir == base: raise HTTPException(status_code=400, detail="Invalid task path") ``` 4. Before recursive deletion, verify that the target is exactly one direct child of `OUTPUT_DIR`. 5. Refuse symlink targets and consider opening directories using descriptor-relative, no-follow operations where supported. 6. Avoid passing any unchecked route or query parameter into `Path`, `glob`, `unlink`, or `shutil.rmtree`. 7. Add regression tests for `.`, `..`, percent-encoded dot segments, double encoding, backslashes, absolute paths, and symlink-based escapes. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
rules/server.py:252
Finding

Unbounded Upload Buffering and Unrestricted Processing Enable Resource Exhaustion

Content
View full analysis
Remediation
View remediation
MAX_UPLOAD_SIZE: output.close() input_path.unlink(missing_ok=True) raise HTTPException(status_code=413, detail="File too large") output.write(chunk) ``` 3. Validate the file signature and media container rather than trusting the filename extension. 4. Use `ffprobe` with a timeout to enforce maximum duration, stream count, dimensions, and supported codecs. 5. Implement a bounded job queue with one worker if single-task processing is intended. 6. Apply per-session rate limits, concurrent-job limits, storage quotas, and total processing-time limits. 7. Set subprocess timeouts and operating-system resource limits for FFmpeg and Demucs. 8. Delete rejected, failed, and stale uploads automatically. 9. Monitor available disk space before accepting new jobs. ]]>

T08 · Insecure Dependencies

Warning
Location
SKILL.md:50
Finding

Unpinned Third-Party Dependencies Create a Non-Reproducible Supply-Chain Risk

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (18)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `rules/app-page.html` | 工具主操作页面(59KB)| 上传 + 配置 + 分离 + 结果展示的完整 UI |

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

A cleanup endpoint that permanently deletes task output and uploaded files based only on a task_id is dangerous if exposed without strong validation, authorization, and path safety checks in the implementation. In this skill's context, the service manages local filesystem artifacts, so abuse of this endpoint could lead to unauthorized deletion of user data or broader file removal if task_id/path handling is insecure.

Content

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

md
---

### 6. 清理任务文件 — DELETE /api/cleanup/{task_id}

**响应**:`{ "message": "已清理 N 个文件" }`

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · rules/app-page.html (reported line 346)May include surrounding context.

html
<div class="container">

    <!-- Upload Card -->
    <div class="card fade-in" id="uploadCard">
        <div class="card-title">📂 上传文件</div>
        <div class="drop-zone" id="dropZone" onclick="document.getElementById('fileInput').click()">

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill documentation describes code that reads and writes local files and invokes shell-level tools such as FFmpeg and package installation, but the manifest shown in SKILL.md does not declare any explicit tool scope or permission boundaries. This creates a least-privilege and transparency problem: an agent or reviewer cannot easily tell what capabilities are intended, increasing the chance of overbroad execution or unsafe deployment.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest description and document content are written entirely in Chinese and present the skill as operating in that language, with no indication that users may choose another language or locale. Under the policy, forcing a specific language without opt-in is a natural-language policy violation unless clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The document declares lang="zh-CN", and the visible UI text throughout the page is exclusively in Simplified Chinese. Under the policy rule, forcing a specific language/locale without opt-in or documented justification is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

UI 明确暴露“裁剪范围”“取消选择”“导出剪裁音频”等操作,且脚本通过双击设置起止点并请求后端生成剪裁文件。这种通用编辑能力可用于截取任意片段,与技能宣称的分离音轨用途不同,属于未在技能目的中声明的额外能力。

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Manifest 将该技能描述为“一键将任意音频或视频分离出人声、伴奏、鼓、贝斯、钢琴等独立音轨”,触发词也集中在分离、提取伴奏、去除人声、stem splitter 等分轨场景。但此页面实际提供了设置裁剪点、调用 /api/trim 执行截取,并将裁剪后的音频导出的能力,属于独立的音频编辑功能,而不是分离功能的明显实现细节。

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest describes this skill as a one-click audio/video stem separation tool for extracting vocals, accompaniment, drums, bass, piano, and similar tracks. However, the code also serves an "audio editor" page and implements /api/trim, which cuts arbitrary time ranges from separated tracks using ffmpeg; that is a distinct editing capability not described in the manifest.

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 · rules/server.py (reported line 223)May include surrounding context.

python
duration = end_time - start_time

    try:
        subprocess.run([
            "ffmpeg", "-y",
            "-i", str(src_path),
            "-ss", str(start_time),

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

For a skill presented as a high-level stem-splitting tool, the implementation depends on spawning ffmpeg and python3 -m demucs subprocesses rather than staying within a constrained application layer. While stem separation itself is in-scope, arbitrary process execution is a powerful capability that is not stated in the manifest and is broader than the user-facing purpose suggests.

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 · rules/server.py (reported line 314)May include surrounding context.

python
if is_video:
            wav_path = str(OUTPUT_DIR / task_id / "source.wav")
            output_base.mkdir(parents=True, exist_ok=True)
            subprocess.run([
                "ffmpeg", "-y", "-i", input_path,
                "-vn", "-acodec", "pcm_s16le", "-ar", "44100", "-ac", "2",
                wav_path,

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 · rules/server.py (reported line 335)May include surrounding context.

python
audio_for_demucs,
        ]

        process = subprocess.Popen(
            cmd,
            stdout=subprocess.PIPE,
            stderr=subprocess.STDOUT,

Dynamic import via __import__()

Medium
Category
Dangerous Code Execution
Confidence
75% confidence
Finding

Dynamic import() can load arbitrary modules at runtime, bypassing static analysis and potentially importing malicious code.

Content

Scanner excerpt · rules/server.py (reported line 450)May include surrounding context.

python
"stems": stems,
            "status": "completed",
            "track_count": len(result_tracks),
            "created_at": __import__("datetime").datetime.now().isoformat(),
        })

    except Exception as e:

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The cleanup endpoint deletes task outputs and uploaded files for any supplied task_id, with no authentication, authorization, or ownership verification. In any shared or exposed deployment, an attacker can enumerate or obtain task IDs and delete other users' data, causing integrity loss and denial of service.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The document declares lang="zh-CN", and all visible UI text is presented only in Simplified Chinese. This imposes a specific language/locale on users without any opt-in, switcher, or clear region-specific justification, which matches the language/locale policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The natural-language description and user-facing service metadata are written only in Chinese, including the module banner and application title, with no indication that users can choose another language. Under the stated policy, forcing a specific language without user opt-in is a locale/language policy issue.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The service stores cross-session task history in a shared history.json file and exposes it via /api/history without any authentication or ownership checks. In a multi-user deployment, this leaks prior users' filenames, task IDs, models, timestamps, and whether outputs still exist, which can enable privacy violations and facilitate unauthorized access to task artifacts.

Content

No source excerpt is available for this finding.