Back to skill

Security audit

Audio Processor

Security checks for vulnerabilities and agentic risk

Overview

This is a local audio-processing skill with ordinary media tools; the main cautions are file overwrites and unpinned Python dependencies.

Install and run this in a virtual environment or container, preferably with pinned dependency versions if reproducibility matters. Use explicit output paths and avoid pointing outputs at important originals unless you intend to overwrite them; work on copies for valuable audio files.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (1)

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding

Unpinned and Unverified Python Dependencies

Content
View full analysis

Vulnerability Details

File Location: requirements.txt:1-9 (installation documented at SKILL.md:61-66)
Vulnerability Type: Supply-chain risk from open-ended dependency constraints and missing integrity verification
Risk Level: Medium

Vulnerable Code Snippet:

text
pydub>=0.25.1
librosa>=0.10.0
soundfile>=0.12.1
mutagen>=1.47.0
numpy>=1.24.0
matplotlib>=3.7.0
noisereduce>=3.0.0
scipy>=1.10.0
ffmpeg-python>=0.2.0

The documented installation command in SKILL.md:61-66 is:

bash
pip install -r requirements.txt

Technical Analysis

All dependencies use open-ended >= constraints. Consequently, each installation can resolve to any later release available through the configured package index. The project provides neither an exact-version lock file nor cryptographic hashes for the expected distributions.

The dependency names are consistent with the stated audio-processing functionality, and the audit found no evidence that any listed package is intentionally malicious. The risk arises because the artifacts ultimately installed are not reproducible or integrity-verified. If an upstream package account, release process, or configured package mirror is compromised, pip may resolve and install an attacker-controlled later version that still satisfies these constraints.

Python package installation may execute build-backend code for source distributions. Even when installation itself does not execute arbitrary package logic, importing the dependency during normal use can execute attacker-controlled module initialization code.

Attack Path

  1. An attacker compromises a listed dependency's publishing account, release process, or a package index/mirror trusted by the user.
  2. The attacker publishes a malicious version newer than the minimum specified in requirements.txt.
  3. A user follows the documented pip install -r requirements.txt procedur ...[truncated 1031 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace open-ended constraints with exact, reviewed versions, preferably through a generated lock file.
  2. Record cryptographic hashes for every accepted distribution and install with:
    bash
    pip install --require-hashes -r requirements.txt
    
  3. Use a lock-generation workflow such as pip-compile --generate-hashes, while separately reviewing and testing dependency upgrades.
  4. Pin transitive dependencies as well as direct dependencies so the complete environment is reproducible.
  5. Restrict installation to a trusted package index or an internally controlled artifact repository.
  6. Prefer reviewed binary wheels where appropriate and avoid untrusted source builds.
  7. Run installation and audio processing in an isolated virtual environment or container under a non-privileged account.
  8. Add automated dependency vulnerability and provenance checks to the release process.
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (31)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill advertises and demonstrates shell execution and file-writing behavior through Python scripts, but it does not declare any explicit tool scope such as allowed-tools or permissions. This creates an authorization and review gap: an agent may invoke filesystem or shell-capable actions without clear least-privilege boundaries, which is especially risky for a batch audio-processing skill that can operate on arbitrary files and paths.

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 · scripts/batch_process.py (reported line 27)May include surrounding context.

python
str(f), output_path]
        if bitrate:
            cmd.extend(['--bitrate', bitrate])
        subprocess.run(cmd)


def batch_analyze(input_dir: str, output_dir: str):

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 · scripts/batch_process.py (reported line 41)May include surrounding context.

python
str(f), output_path]
        if bitrate:
            cmd.extend(['--bitrate', bitrate])
        subprocess.run(cmd)


def batch_analyze(input_dir: str, output_dir: str):

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script unconditionally passes '-y' to ffmpeg, which forces overwrite of the destination file without user confirmation. In a skill that processes user-specified file paths, this can cause destructive data loss or replacement of important files if the output path is mistaken, attacker-influenced, or reused across workflows.

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 · scripts/convert_format.py (reported line 47)May include surrounding context.

python
cmd.extend(['-c', 'copy'])
    cmd.append(output_path)
    
    result = subprocess.run(cmd, capture_output=True, text=True)
    if result.returncode != 0:
        print(f"FFmpeg error: {result.stderr}")
        sys.exit(1)

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 · scripts/cut_audio.py (reported line 40)May include surrounding context.

python
cmd.extend(['-c', 'copy'])
    cmd.append(output_path)
    
    result = subprocess.run(cmd, capture_output=True, text=True)
    if result.returncode != 0:
        print(f"FFmpeg error: {result.stderr}")
        sys.exit(1)

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The module docstring states '支持 Peak / RMS / LUFS 模式', implying LUFS normalization support. In the implementation, the CLI offers 'loudness' mode and routes it to pydub.effects.normalize(), which is peak-style normalization rather than a true LUFS measurement or normalization workflow, so the documentation overstates the actual behavior.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

At L14, the function is documented as 'Change speed without changing pitch (time stretching)'. However, the code at L22-L25 performs frame-rate modification and resampling, which changes playback speed and pitch together; the inline comment at L16-L17 even acknowledges this is only a naive fallback. This is an active contradiction between the stated intent and actual behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest description and primary body text are written in Chinese, but the skill does not state that Chinese is optional, user-selected, or required for a region-specific purpose. Under the language/locale policy, this can be a natural-language policy issue because it implicitly constrains the user experience to a specific language without opt-in.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The dependency is specified with only a minimum version, so future installs may resolve to different releases over time. This weakens build reproducibility and can unintentionally introduce vulnerable or incompatible upstream versions through the software supply chain.

Content

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

text
pydub>=0.25.1
librosa>=0.10.0
soundfile>=0.12.1
mutagen>=1.47.0

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The dependency is unpinned and allows any version at or above the minimum, which makes installations non-reproducible. In practice, this can cause the environment to pull in a later release with unreviewed security or behavior changes.

Content

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

text
pydub>=0.25.1
librosa>=0.10.0
soundfile>=0.12.1
mutagen>=1.47.0
numpy>=1.24.0

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

Using a lower-bound-only requirement for soundfile means the actual installed version may vary between environments and over time. That increases supply-chain risk and makes it harder to verify whether deployed instances are using a safe version.

Content

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

text
pydub>=0.25.1
librosa>=0.10.0
soundfile>=0.12.1
mutagen>=1.47.0
numpy>=1.24.0
matplotlib>=3.7.0

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

An unpinned mutagen dependency permits resolver drift, so later installations may consume different code than what was originally tested. This can expose the skill to newly introduced vulnerable releases or breaking changes without any source modification.

Content

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

text
pydub>=0.25.1
librosa>=0.10.0
soundfile>=0.12.1
mutagen>=1.47.0
numpy>=1.24.0
matplotlib>=3.7.0
noisereduce>=3.0.0

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
98% confidence
Finding

NumPy is not pinned, so deployments may install different versions, including ones affected by known advisories or incompatible binary behavior. Because NumPy is a foundational native-extension package, version drift can have broader reliability and security consequences than a pure Python leaf dependency.

Content

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

text
librosa>=0.10.0
soundfile>=0.12.1
mutagen>=1.47.0
numpy>=1.24.0
matplotlib>=3.7.0
noisereduce>=3.0.0
scipy>=1.10.0

Unverifiable Dependency: numpy has 16 known advisory(ies) (CVE-2014-1859 (Numpy arbitrary file write via symlink attack); CVE-2021-41495 (NumPy NULL Pointer Dereference); CVE-2021-33430 (NumPy Buffer Overflow (Disputed)) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
93% confidence
Finding

The manifest does not pin NumPy, and NumPy has multiple historical advisories, so it is impossible to determine from this file whether deployments will use a safe release. This uncertainty is itself a supply-chain weakness because vulnerable versions could be installed without any manifest change.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

Matplotlib is specified with only a minimum version, allowing the resolved package to change unpredictably across builds. This creates avoidable supply-chain and reproducibility risk even if no immediate exploit is evident in this file alone.

Content

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

text
soundfile>=0.12.1
mutagen>=1.47.0
numpy>=1.24.0
matplotlib>=3.7.0
noisereduce>=3.0.0
scipy>=1.10.0
ffmpeg-python>=0.2.0

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The noisereduce package is unpinned, which means future installs may pull a different release than the one originally validated. That opens the door to silent introduction of upstream vulnerabilities or unstable behavior.

Content

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

text
mutagen>=1.47.0
numpy>=1.24.0
matplotlib>=3.7.0
noisereduce>=3.0.0
scipy>=1.10.0
ffmpeg-python>=0.2.0

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
98% confidence
Finding

SciPy is not pinned, so the environment may resolve to varying releases, including ones with known advisories or native-code issues. As a scientific package with compiled components, uncontrolled version changes can increase both exposure and operational instability.

Content

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

text
numpy>=1.24.0
matplotlib>=3.7.0
noisereduce>=3.0.0
scipy>=1.10.0
ffmpeg-python>=0.2.0

Unverifiable Dependency: scipy has 4 known advisory(ies) (CVE-2013-4251 (SciPy creates insecure temporary directories); CVE-2013-4251 (The scipy.weave component in SciPy before 0.12.1 creates insecure temporary dire); CVE-2023-25399 (A refcounting issue which leads to potential memory leak was discovered in scipy) +1 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
91% confidence
Finding

SciPy has known advisories, but the unpinned requirement prevents verification that installed environments will avoid affected versions. That creates a real risk of unknowingly deploying a vulnerable build, especially in varied or automated installation contexts.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
96% confidence
Finding

ffmpeg-python is unpinned, which creates supply-chain uncertainty and makes builds non-deterministic. In an audio-processing skill, this matters more because the package interfaces with media-processing workflows where parser-related issues in the surrounding stack can raise attack surface concerns.

Content

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

text
matplotlib>=3.7.0
noisereduce>=3.0.0
scipy>=1.10.0
ffmpeg-python>=0.2.0

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code file contains natural-language text in Chinese for the tool description, with no indication that the language is configurable or intentionally restricted to a region-specific use case. Under the policy, fixed language/locale content without user opt-in can be 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
90% confidence
Finding

The top-level docstring describes the script in Chinese only, which is a natural-language locale choice embedded in the file without any indication that the skill is region-specific or that users can opt into another language. Under the stated policy, forcing a specific language without opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The natural-language description in the module docstring is written only in Chinese, with no indication that users may choose another language or locale. Under the stated policy, forcing a specific language without user opt-in can be a language/locale policy violation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file description says the tool supports MP3, WAV, FLAC, OGG, AAC, M4A, and OPUS, but SUPPORTED_FORMATS additionally includes 'wma' at L13. This is a behavior/documentation mismatch: the code exposes a capability not reflected in the described scope of this converter module.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

The module docstring at L04-L05 declares supported formats as MP3/WAV/FLAC/OGG/AAC/M4A/OPUS, while the actual implementation defines a different effective support surface in code, including an extra undocumented format ('wma') and relying on codec mappings that do not fully mirror the stated documentation. This creates a documentation-to-code inconsistency about what formats are actually supported.

Content

No source excerpt is available for this finding.