Back to skill

Security audit

虾转音频

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real audio conversion and transcription skill, but it needs review because it can overwrite local files and has an unsafe shared temporary-file pattern.

Review before installing. Use it only on media files and output folders you trust, avoid running it as administrator/root, expect Whisper models to be downloaded unless already cached, and prefer a virtual environment with pinned Python dependencies. The merge temporary-file handling should be fixed before use on shared or multi-user systems.

Vulnerability Patterns
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
audio-forge.js:175
Finding

Predictable Shared Temporary File Enables Symlink-Based File Overwrite

Content
View full analysis
`file '${f.replace(/\\/g, "/")}'`).join("\n"); fs.writeFileSync(listFile, content, "utf8"); const args = [ "-f", "concat", "-safe", "0", "-i", `"${listFile}"`, "-c", "copy", `"${output}"` ]; runFFmpeg(args); fs.unlinkSync(listFile); console.log(`\n 合并完成: ${output}`); } ``` ### Technical Analysis Every merge operation uses the same predictable temporary path: `/tmp/xza_merge_list.txt` on Unix-like systems, or the equivalent path beneath the directory specified by `TEMP`. `fs.writeFileSync()` follows symbolic links and opens an existing file for truncation by default. It does not use exclusive creation, verify that the destination is a regular file, or ensure that the file was created inside a private temporary directory. Consequently, another local process can prepare the predictable path as a symbolic link to a file writable by the user running this Skill. The shared filename also creates a race between concurrent Skill invocations. One process can replace, modify, or delete another process's FFmpeg concat list. This is particularly problematic because `runFFmpeg()` starts FFmpeg asynchronously and returns immediately, after which `cmdMerge()` immediately deletes the list file. Although this latter behavior is primarily a reliability defect, it increases the opportunity for race conditions and input manipulation. ### Attack Path 1. The attacker has local access to the same system and can write to the shared temporary directory. 2. The attacker predicts that the Skill will use `/tmp/xza_merge_list.txt`. 3. Before the ...[truncated 1421 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
SKILL.md:54
Finding

Unpinned Python Dependency Creates Supply-Chain Exposure

Content
View full analysis
Remediation
View remediation
``` 2. Lock all transitive dependencies rather than pinning only the top-level package. 3. Generate and verify cryptographic hashes, then install using: ```bash pip install --require-hashes -r requirements.txt ``` 4. Regenerate the lockfile through a controlled review and update process. 5. Install dependencies inside a dedicated virtual environment. 6. Use a trusted package index and explicitly document the expected source. 7. Avoid installing the package as root or with administrator privileges. 8. Consider distributing a verified environment manifest or signed release artifacts for reproducible deployment. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (13)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

该描述与代码部分匹配:代码确实支持格式转换、视频提取音频、合并、分割、压缩和信息查看。但存在实质性描述偏差。首先,最明显的是声明包含“音频转文字”,而代码完全没有对应命令或实现,虽然注释里提到脚本目录可能包含 transcribe.py 和 um.exe,但二者均未被调用。其次,描述称基于“FFmpeg + Whisper AI”,实际代码只依赖并调用 FFmpeg/FFprobe。最后,描述表述为较宽泛的“音视频格式转换与处理工具箱”,而该代码实际是音频处理 CLI,只涉及从视频抽取音频,不提供视频转换、剪辑、压缩或视频信息查看等更广义的视频处理能力。因此应判定为描述与实际行为不完全一致,属于 mismatch。

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill advertises shell execution, file read/write, and environment-variable usage but does not declare any explicit tool scope or permission boundaries. In an agent ecosystem, this increases the risk of over-broad execution, unexpected file modification, or command invocation without users understanding the privilege level.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The documentation omits clear warnings that the skill may write output files, potentially overwrite existing data, and download Whisper models from remote sources. This reduces informed consent and can expose users to unintended data loss, bandwidth consumption, or external network access in environments where such actions are sensitive.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The natural-language trigger examples are broad and overlap with ordinary conversation, which can cause accidental invocation of shell-backed file-processing actions. In a skill that can read inputs, write outputs, and invoke external tools, misfires can lead to unintended media processing, file creation, or overwriting.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest description explicitly includes '音频转文字' and references Whisper AI, but the executable command set in this file only supports convert, extract, merge, split, compress, and info. Although comments mention transcribe.py in the script directory, there is no transcription command or Whisper invocation anywhere in the implemented CLI.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Natural-language strings throughout the file, including the banner and CLI help, are presented only in Chinese, with no mechanism for language selection or opt-in. This creates a locale policy issue because the skill imposes a specific language on all users rather than offering a choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This code file contains user-facing natural language that fixes the interaction language to Chinese, beginning with the title and continuing throughout prompts and menu text. The policy allows locale constraints only when users are given a choice or when the restriction is clearly documented and justified, neither of which appears here.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The tool performs implicit network access to Hugging Face to download models at runtime, but this capability is not clearly disclosed in the skill description and may violate user or platform expectations about offline/local processing. Undisclosed outbound connectivity expands the trust boundary, can leak usage metadata such as IP/addressing and model requests, and introduces supply-chain and availability risk if remote content changes or is unavailable.

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 · transcribe.py (reported line 65)May include surrounding context.

python
]
    print(f"  从视频提取音频...")
    try:
        subprocess.run(cmd, capture_output=True, check=True)
    except subprocess.CalledProcessError as e:
        print(f"[错误] 提取音频失败: {e.stderr.decode('utf-8', errors='replace')}")
        sys.exit(1)

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
72% confidence
Finding

文件的描述、功能说明和使用示例均以中文呈现,未说明是否支持其他语言或允许用户选择展示语言。按照语言/区域策略,若技能强制单一语言而无用户选择,可能构成自然语言层面的策略问题。

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The header comment says automatic discovery checks environment variables, system PATH, and then 'winget 安装的路径'. In practice, findFFmpeg only checks the environment variable and runs 'where ffmpeg'; there is no code for a winget-specific fallback, so the documentation contradicts actual behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The merge operation writes a predictable temporary file (xza_merge_list.txt) into a shared temp directory and later deletes it without safeguards. On multi-user systems or hostile local environments, another process could race to read, replace, or symlink that file, potentially altering merge inputs or causing unintended file deletion.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The manifest says the skill supports '音频转文字' (audio to text), which naturally covers transcription but does not clearly claim translation. The code exposes a '--task' option with 'translate', allowing conversion of speech into English rather than just transcription of the original speech.

Content

No source excerpt is available for this finding.