Back to skill

Security audit

super-file-manager

Security checks for vulnerabilities and agentic risk

Overview

This file-management skill is purpose-aligned, but it needs review because its scripts can move, trash, restore, and back up broad local files without enforcing several safety limits promised in the docs.

Install only if you are comfortable with a local file-management tool that can move, trash, copy, and restore files within the current user's permissions. Use it on explicitly chosen folders, review every planned change, avoid broad targets such as Home, system, app configuration, or cache roots, and do not run rollback against log files you did not create or inspect.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/move_with_log.py:64
Finding

Protected directories are not enforced during file move and trash operations

Content
View full analysis
{dst}") return 0 except (OSError, shutil.Error) as e: log_operation(log_file, "move", src, dst, "error", str(e)) print(f"ERROR: 移动失败: {src} -> {dst}", file=sys.stderr) return 1 def do_trash(log_file, filepath): """移到回收站(跨平台)""" if not os.path.exists(filepath): log_operation(log_file, "trash", filepath, "trash", "error", "文件不存在") print(f"ERROR: 文件不存在: {filepath}", file=sys.stderr) return 1 try: import send2trash send2trash.send2trash(filepath) log_operation(log_file, "trash", filepath, "trash", "ok") print(f"OK: {filepath} -> 回收站") return 0 except ImportError: # send2trash 未安装,尝试系统命令 log_operation(log_file, "trash", filepath, "trash", "error", "send2trash 未安装") print("ERROR: send2trash 未安装,请运行: pip install send2trash", file=sys.stderr) return 1 except OSError as e: log_operation(log_file, "trash", filepath, "trash", "error", str(e)) print(f"ERROR: 移到回收站失败: {filepath}", file=sys.stderr) return 1 ``` ### Technical Analysis The move ...[truncated 1667 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/move_with_log.py:117
Finding

Batch move does not enforce the documented operation limit or stop on failure

Content
View full analysis
' not in line: print(f"SKIP: 格式错误: {line}") failed += 1 continue parts = line.split('->', 1) src = parts[0].strip() dst = parts[1].strip() if not src or not dst: print(f"SKIP: 格式错误: {line}") failed += 1 continue if do_move(log_file, src, dst) == 0: success += 1 else: failed += 1 print() print("=== 批量移动完成 ===") print(f"总计: {total} | 成功: {success} | 失败: {failed}") print(f"日志: {log_file}") return 0 if failed == 0 else 1 ``` ### Technical Analysis The project documentation states that each batch must contain no more than ten files and that processing stops when an error occurs. The implementation reads and processes every valid line in the supplied file, without a maximum count. It also continues after malformed records and failed moves. The list file is an instruction manifest controlling source and destination paths. If it is generated incorrectly or influenced by an attacker, the absence of an enforced limit substantially increases the scope of unintended filesystem changes. Continuing after errors can also leave the filesystem in an inconsistent, partially moved state. ### Attack ...[truncated 800 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/rollback.py:65
Finding

Rollback executes filesystem instructions from arbitrary unauthenticated JSONL files

Content
View full analysis
{shorten_path(source)} (原位置已有文件)") return 2 src_dir = os.path.dirname(source) if src_dir: os.makedirs(src_dir, exist_ok=True) try: shutil.move(dest, source) print(f" ✅ 恢复: {shorten_path(dest)} -> {shorten_path(source)}") return 0 except (OSError, shutil.Error) as e: print(f" ❌ 失败: {shorten_path(dest)} -> {shorten_path(source)}") print(f" 错误: {e}", file=sys.stderr) return 1 elif action == "trash": filename = os.path.basename(source) trash_file = find_in_trash(filename) if not trash_file: print(f" ⏭️ 跳过: 回收站中未找到 {filename}(可能已清空)") return 2 if os.path.exists(source): print(f" ⏭️ 跳过: 回收站/{os.path.basenam ...[truncated 3502 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/incremental_backup.py:107
Finding

Backup containment checks can be bypassed through symbolic-link path aliases

Content
View full analysis
= args.max_files: print(f" ⚠️ 已达到最大文件数限制 ({args.max_files}),停止备份") print(" 提示: 使用 --max-files N 调整上限") break rel_path = os.path.relpath(fpath, source_dir) dest_path = os.path.join(backup_target, rel_path) # 增量检查 if not full_backup and cutoff_time is not None: try: ftime = os.path.getmtime(fpath) if ftime <= cutoff_time: skipped += 1 continue except (OSError, PermissionError): skipped += 1 continue # 复制文件 dest_dir = os.path.dirname(dest_path) os.makedirs(dest_dir, exist_ok=True) try: shutil.copy2(fpath, dest_path) ``` ### Technical Analysis `os.path.abspath()` normalizes lexical path components but does not ...[truncated 1719 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
SKILL.md:14
Finding

Third-party dependency is installed without a pinned version or integrity hash

Content
View full analysis
Remediation
View remediation
--hash=sha256: ``` 2. Install with `pip install --require-hashes -r requirements.txt`. 3. Commit a lock file appropriate to the supported deployment workflow. 4. Document the expected official package index and avoid untrusted mirrors. 5. Periodically review and update the pinned version through a controlled security update process. 6. Consider vendoring a narrowly scoped, reviewed implementation only if the maintenance and licensing implications are acceptable. ]]>

other

Note
Location
scripts/rollback.py:479
Finding

Rollback range command fails due to an invalid argparse attribute reference

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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
Findings (14)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

声明描述的是一个较完整的文件管理技能,涵盖垃圾清理、文档整理、重复文件检测和文件备份等能力。但提供的代码仅实现了目录扫描与分类结果展示:按扩展名统计文件类型、按修改时间分组,或列出文件名供人工参考,并明确声明“仅生成分类方案预览,不执行任何文件移动操作”。虽然它与“文件整理”主题相关,且平台支持与声明一致,但其实际能力明显比声明窄得多,缺少多个核心宣称功能,因此描述不能准确代表代码实际行为。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The description presents a broad file-management skill focused on cleanup, organization, duplicate detection, and backup. The supplied code instead implements a narrower logging-based move/trash utility. Some overlap exists with general file organization, since moving files can support manual organization, and the cross-platform claim is consistent. However, the primary implemented capabilities are moving, trashing, and batch moving files with logging—features not specifically declared—while several prominently declared capabilities (junk cleanup, duplicate detection, backup) are absent from this code chunk. This is a material description-to-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

声明描述的是广义文件管理技能,重点触发场景是垃圾清理、文件整理、重复文件检测、文件备份等;而实际代码的核心功能是“回撤/回滚此前文件操作”。虽然两者都属于文件管理大类,且同样跨平台,但该代码的主要用途与声明列举的具体能力明显不一致。代码并未实现垃圾清理、文档整理、重复文件检测或备份逻辑,反而提供了未声明的关键能力:读取日志、逆序撤销 move/trash、从回收站恢复文件、按范围回滚。因此这属于实质性描述与行为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

描述将该技能定义为较完整的“电脑文件管理”工具,覆盖清理、整理、重复文件检测和备份等多类操作。但提供的代码仅对应其中一小部分:扫描旧大文件、安装包和缓存文件,并生成建议列表。脚本明确声明“仅做扫描和输出,不执行任何删除操作”,因此与“清理垃圾文件”的常见含义相比也存在能力落差。虽然跨平台支持与垃圾文件扫描相关部分是吻合的,但整体描述范围明显大于代码实际行为,属于描述与实现不一致。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This markdown file uses Chinese throughout nearly all substantive content, which can amount to a language-policy violation when a skill forces a specific language without user opt-in. There is no indication in the file that the skill is region-specific or that users may choose another language.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill documentation is presented entirely in Chinese and frames user interaction examples only in Chinese, without indicating that users may choose another language. This can violate a language/locale policy when a skill implicitly requires a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill describes capabilities that read environment-dependent paths and perform file reads/writes, but it does not declare any explicit tool scope or permissions boundaries. In an agent environment, missing scope declarations can cause overbroad access or unclear enforcement, increasing the chance that destructive file operations are invoked outside intended limits.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The activation text uses overly broad triggers such as '文件管理' and '相关操作时使用此技能', which can cause the agent to invoke a write-capable file-management skill in situations that only loosely relate to files. Because this skill includes move, trash, backup, and rollback workflows, over-triggering raises the risk of unintended destructive or privacy-impacting actions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring and all user-facing interface text are written in Chinese, and the script does not provide any option to select another language. For a general-purpose file-classification tool, this is a natural-language policy concern because it imposes a specific language/locale on users without opt-in or justification.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The function docstring says '按项目分类(列出文件供用户参考)', and the CLI output also presents this mode as '按项目名称分类方案'. However, the implementation merely walks files and appends (fname, size) to a flat list, with no project detection, grouping, or classification logic. This is an active mismatch between stated intent in code-facing documentation/output and actual behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Argument descriptions, errors, warnings, and output messages are all hardcoded in Chinese, and there is no mechanism for the user to choose language or locale. This violates the stated policy category for language/locale constraints because the tool appears to be broadly applicable but mandates one language.

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 its primary docstring, CLI help text context, and runtime output in Chinese only, which imposes a specific language on all users. The policy allows locale constraints only when users can opt in or when the constraint is clearly documented and justified, neither of which is present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

This code file contains its top-level docstring, CLI help text, and operational messages entirely in Chinese, which imposes a specific language on users without offering any locale or language choice. The policy explicitly calls out language or locale constraints as violations when they are forced without opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

This code file contains natural-language docstrings and CLI help text exclusively in Chinese, which imposes a locale/language choice on all users. The policy explicitly flags language or locale constraints when the skill does not offer user choice or document a justified region-specific limitation.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.