Back to skill

Security audit

Mardown Notes Organizer

Security checks for vulnerabilities and agentic risk

Overview

This Markdown note organizer appears purpose-built, but it can mass-move and rewrite notes without a preview and has scoping and documentation mismatches users should review first.

Review before installing. Use this only on a backed-up notes folder, avoid custom category or subdirectory names containing slashes, absolute paths, or `..`, and expect automatic file moves and note edits once the script runs. Do not rely on the advertised undo/backup support.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
organize_notes.py:122
Finding

Unrestricted Path Traversal in Custom Directory Names

Content
View full analysis
Remediation
View remediation
Path: if not name or Path(name).is_absolute(): raise ValueError("Directory name must be a non-empty relative name") if name in {".", ".."} or "/" in name or "\\" in name: raise ValueError("Directory name must contain exactly one path component") if any(ord(ch) < 32 for ch in name): raise ValueError("Control characters are not allowed") resolved_base = base.resolve() candidate = (resolved_base / name).resolve() try: candidate.relative_to(resolved_base) except ValueError: raise ValueError("Directory path escapes the notes directory") return candidate ``` Use this helper before every `mkdir` operation: ```python dir_path = safe_child(self.base_path, dir_name) dir_path.mkdir(parents=True, exist_ok=True) subdir_path = safe_child(dir_path, subdir_name) subdir_path.mkdir(parents=True, exist_ok=True) ``` ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (9)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill description is written as a direct user-facing instruction in Chinese, and the invocation/configuration sections continue in Chinese without indicating that other languages are supported. The policy only permits a fixed language when there is user opt-in or a clear region-specific justification, neither of which is present here.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill describes behavior that reads and writes across a user-supplied directory, but it declares no explicit tool scope or permissions boundary. That makes the operational authority ambiguous and increases the chance that an agent executes broad filesystem changes without informed user consent or adequate sandboxing.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The natural-language instructions and all user-facing prompts are written in Chinese, including the step-by-step questions the skill will ask. The file does not indicate that Chinese is optional, user-selected, or required for a documented region-specific purpose, which creates a language policy concern.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documentation is internally inconsistent: it promises not to delete file content, yet the feature list includes deleting empty directories and useless files, and later offers cleanup of duplicate and temporary files. This can mislead users into authorizing destructive actions under a false assumption of safety, increasing the risk of unintended data loss.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill includes destructive cleanup behavior such as removing duplicate files, temporary files, and empty directories, but it does not prominently warn about possible irreversible data loss. In a tool that reorganizes an entire notes directory, even small classification or matching errors can cascade into unwanted deletion or hard-to-recover changes.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

All user-facing prompts, status messages, and usage text are hardcoded in Chinese, which imposes a specific language on all users. The file does not provide an opt-in language selection or justify the locale constraint as region-specific behavior.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest says notes are reorganized according to the user's chosen classification scheme, but the actual classification logic in classify_file only maps content to fixed preset categories such as 01_基础知识 and 05_资源收集. This means choices like learning-stage, project-based, time-based, or custom categories collected earlier are not used to decide where files go, so behavior diverges from the stated purpose.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script performs destructive filesystem actions—moving markdown files and rewriting note contents—immediately after collecting options, without a dry-run, summary, or explicit final confirmation. In a skill context that operates over a user-supplied directory, this increases the risk of accidental data loss, unwanted mass modification, and hard-to-reverse changes if the directory is broader than intended or classification/linking behaves unexpectedly.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

The interactive configuration explicitly offers '清理空目录和重复文件' as an option, creating a documented expectation that duplicate-file cleanup exists. However, cleanup() only traverses directories and removes empty ones, so the code does less than it claims in its own documented workflow.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.