Back to skill

Security audit

Desktop Sorter

Security checks for vulnerabilities and agentic risk

Overview

This desktop-organizing skill is mostly purpose-aligned, but it needs review because it automatically moves Desktop files and can silently overwrite or skip files without user confirmation.

Review before installing. Use it only if you are comfortable with an agent moving matching files on your Desktop into category folders. Back up important Desktop files first, and prefer adding a dry-run, explicit confirmation, collision-safe renaming or skipping, and clear reporting of skipped or failed moves.

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
scripts/organize_desktop.py:37
Finding
Existing Destination Files May Be Silently Overwritten## Vulnerability Details **File Location**: `scripts/organize_desktop.py`, lines 37–43 **Vulnerability Type**: Unsafe file move and silent exception handling **Risk Level**: Medium ### Vulnerable Code ```python dest = dest_dir / item.name try: shutil.move(str(item), str(dest)) moved[target_folder] += 1 except Exception: # skip locked or move errors pass ``` ### Technical Analysis The script constructs the destination path from the original filename but does not check whether that path already exists before calling `shutil.move`. On platforms where the underlying rename operation replaces an existing file, a file such as `Desktop/report.pdf` can overwrite an existing `Desktop/PDFs/report.pdf`. Behavior can vary by operating system and filesystem. Some environments may reject the operation instead, but the broad `except Exception` handler silently suppresses that failure. Consequently, the user is not informed about filename collisions, permission errors, locked files, or other move failures. The aggregate result counters alone cannot distinguish ignored files from failed operations. ### Attack Path 1. A valuable file already exists at a categorized destination, such as `Desktop/PDFs/report.pdf`. 2. A same-named file is placed at `Desktop/report.pdf`, either accidentally or by an attacker who can create files on the user's desktop. 3. The user invokes the Desktop Organizer Skill. 4. The script calculates `Desktop/PDFs/report.pdf` as the destination without checking for a collision. 5. On a platform permitting replacement, the existing destination file is overwritten. On a platform rejecting the move, the exception is silently discarded and the user receives no failure details. ### Impact Assessment The issue can cause loss or replacement of files within the desktop category folders. It does not provide privilege escalation, persistence, arbitrary code execution, or access beyond the permissions of the user ru ...[truncated 359 chars]
Remediation
## Remediation Suggestions 1. Check `dest.exists()` before invoking `shutil.move`. 2. Apply an explicit collision policy: - Skip the move and report the collision; - Generate a unique filename such as `report (1).pdf`; or - Require explicit user confirmation before replacing an existing file. 3. Prefer a non-destructive default and never overwrite an existing destination silently. 4. Replace `except Exception` with specific exception handling, such as `PermissionError`, `FileNotFoundError`, and relevant `OSError` cases. 5. Record and report every skipped or failed move, including its source, intended destination, and failure reason. 6. Consider rechecking destination existence immediately before the move and using platform-appropriate exclusive or atomic operations where race conditions are a concern.
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 (4)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
The public description says the skill organizes desktop files based on PDF, JPG, and ZIP extensions, but the documented behavior covers many additional file types and includes modifying the user's Desktop contents without declared permissions. This mismatch can mislead users and reviewers about the true operational scope, causing broader file modification than reasonably expected.

Lp3

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding
The skill describes behavior that accesses and modifies user files on the Desktop, but it declares no explicit tool scope or permissions. This weakens user and platform visibility into what the skill can do and increases the chance of file-system actions being invoked without appropriate gating or review.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
Although the skill documents that it moves files, it does not clearly warn users about the consequences of modifying Desktop contents, such as breaking expected file locations, interfering with workflows, or moving important items unexpectedly. In this context, missing impact disclosure is dangerous because the primary action is state-changing file manipulation on a user-owned directory.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger condition, 'When the user asks to organize their desktop,' is broad and could match common natural-language requests without ensuring the user intended file-moving side effects. In a skill that changes file locations, broad invocation criteria increase the risk of unintended execution and surprise modifications to user data.