Back to skill

Security audit

Music Tagger

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a prototype music tagging tool, but its documented capabilities overstate what it does and its undo/backup handling can copy or delete unintended local files if backup data is tampered with.

Treat this as a prototype, not a reliable music tag editor. Run it only on test copies of music, use preview first, avoid shared or untrusted output directories, do not rely on undo unless you trust the backup file, and pin/review any dependencies before installing them.

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

T09 · Insecure Skill Coding Practices

Error
Location
music_tagger.py:160
Finding

Tamperable Backup File Enables Arbitrary File Copy and Deletion

Content
View full analysis
{old_path.name}") count += 1 if count > 0: self.backup_file.unlink(missing_ok=True) print(f"已撤销 {count} 个音乐文件的操作") return True else: print("没有需要撤销的音乐文件") return False ``` ### Technical Analysis The undo operation treats every key and value loaded from `.music-tagger-backup.json` as a trusted filesystem path. It does not validate the JSON schema, authenticate the backup, verify file ownership, reject symbolic links, or ensure that canonicalized paths remain within the intended input and output directories. After reversing the attacker-controlled mappings, the code uses one supplied path as the source of `copy2()` and another as its destination. It then unconditionally removes the source with `unlink()` after a successful copy. Consequently, a crafted backup can direct the application to relocate an arbitrary file that the invoking user can read and delete to any nonexistent path whose parent directory the user can write. This does not grant privileges beyond those of the user running the progra ...[truncated 1641 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
music_tagger.py:30
Finding

Backup Creation Follows Symbolic Links and Can Truncate Unintended Files

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
README.md:23
Finding

Documentation Instructs Installation of an Unpinned Third-Party Dependency

Content
View full analysis
cd music-tagger # 安装依赖(需要实际标签编辑功能时) pip install mutagen ``` The same unpinned installation instruction appears in `SKILL.md`: ```bash git clone cd music-tagger pip install mutagen ``` ### Technical Analysis The documentation directs users to install `mutagen` without a version constraint, lockfile, or package hash. As a result, installation resolves whichever package release is current at execution time rather than a version reviewed with this project. Python package installation can execute package-controlled build hooks. If a future release or its distribution channel is compromised, users following these instructions may execute unexpected code during installation. Unpinned installation also prevents reproducible dependency review. The current implementation does not import or use `mutagen`; `read_tags()` and `write_tags()` only simulate metadata operations. Therefore, the documented dependency currently adds supply-chain exposure without supporting an implemented code path. ### Attack Path 1. A user follows the project installation documentation. 2. `pip` resolves the latest available `mutagen` release from the configured package index. 3. A compromised, malicious, or unexpectedly changed release is downloaded. 4. Package-controlled installation hooks execute with the user's privileges, or incompatible code is installed into the environment. 5. The affected dependency can access resources available to the installation process. This finding does not claim that the legitimate `mutagen` package is malicious; the risk results from consuming an unpinned future artifact without integrity verification. ### Impact Assessment If the resolved package or distribution channel is compromised, code may exec ...[truncated 425 chars]
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The documented behavior claims real metadata reading, editing, organization, preview, and undo, but the implementation is reported to fabricate placeholder metadata and simulate writes instead of performing the advertised actions. This mismatch can mislead users and downstream agents into trusting outputs, making incorrect file-management decisions or assuming changes and backups occurred when they did not.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The entire skill description and usage guidance are presented only in Chinese, with no indication that users may choose another language or that the skill is intentionally limited to a Chinese-speaking context. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README states '工具默认使用模拟编辑(当前版本)' and refers to actual tag editing as a future capability, but elsewhere documents edit, batch edit, organize, backup, and undo as current operational commands. This is an active contradiction in the skill's own documentation about whether modifications are real or only simulated.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding

The skill advertises file-reading and file-writing behavior but does not declare any explicit tool scope or permissions boundaries. For a tool that can edit and reorganize files, this increases the risk of unintended broad filesystem access, especially if an agent grants default or excessive file capabilities.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest description and title are written entirely in Chinese, and the document provides no indication that other languages are supported or that Chinese is required for a region-specific purpose. This creates a natural-language locale constraint without user opt-in, which matches the language policy violation criteria.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest describes a batch music tagging tool that supports reading and editing metadata such as title, artist, album, and genre. However, the core tag operations are mocked: metadata reads are fabricated and writes have no effect, so the advertised tagging capability is not actually implemented.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The docstrings say '读取音乐文件标签' and '写入音乐文件标签', which implies real metadata operations. In reality, read_tags returns hardcoded placeholder values based on the filename, and write_tags only prints simulated actions and returns True without changing the file.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The undo path deletes files with new_path.unlink() after copying them back, but it does so without an explicit confirmation prompt or safety checks on the destination path. If the backup mapping is stale, tampered with, or points to unexpected files, undo can remove user data unexpectedly, making this a real destructive-file-operation risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The file’s title and all user-facing CLI/help strings are written only in Chinese, which imposes a specific language/locale choice without offering the user an alternative. The policy allows fixed locale behavior when it is explicitly justified or optional, but this file does not document such a constraint.

Content

No source excerpt is available for this finding.