Back to skill

Security audit

文件管理整理

Security checks for vulnerabilities and agentic risk

Overview

The skill is a file-management helper, but it asks for broad file, command, network, and elevated-permission capabilities without enough safety boundaries for deletion or sensitive documents.

Install only if you are comfortable granting it access to user files and potentially shell commands. Keep it limited to explicit user-owned folders, do not run it as administrator, avoid connecting API/callback features unless you know what data is sent, and require a preview plus recoverable trash/quarantine before any deletion.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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 (2)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:269
Finding

Unnecessary Administrator Privilege Escalation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 269
Vulnerability Type: Unnecessary privilege escalation
Risk Level: High

Vulnerable Code Snippet

markdown
| Insufficient permissions | The current user lacks read/write permissions | Check file permissions and run as administrator |

The snippet is an English translation of the original instruction at the specified location.

Technical Analysis

The skill advises running the agent as an administrator whenever ordinary file permissions prevent an operation. Administrator access is not inherently required for the skill's declared purpose of organizing user files. This guidance violates the principle of least privilege and conflicts with the restriction at line 169 that protected locations should be skipped and processing should remain within user directories.

An agent with elevated privileges could read, rename, move, overwrite, or delete files that would otherwise be protected by operating-system access controls. The risk is amplified because the skill accepts natural-language paths and tasks and supports the exec and write tools. Although no malicious command is embedded in the project, malformed, ambiguous, or hostile task input could cause elevated file operations outside the intended scope.

Attack Path

  1. A user or untrusted instruction requests organization of a broad, ambiguous, or attacker-selected path.
  2. The agent attempts a file operation and receives a permission error.
  3. Following line 269, the operator reruns the agent or operation with administrator privileges.
  4. The elevated agent resolves paths or applies cleanup rules without an enforced user-directory boundary.
  5. Files in protected or other users' locations can then be accessed, moved, overwritten, or deleted.

Impact Assessment

Successful exploitation could grant the skill administrative file-system access beyond its legitimate task requirements. Depen ...[truncated 394 chars]

Remediation
View remediation

Remediation Suggestions

  • Remove the recommendation to run the agent as an administrator.
  • Require the agent to stop and report permission failures rather than bypass access controls.
  • Restrict all file operations to explicitly approved, canonicalized user-owned root directories.
  • Resolve symbolic links and path traversal components before validating that a target remains inside an approved root.
  • Use separate read and write authorization checks, granting write access only when required.
  • Maintain a denylist for system directories, application data, credential stores, and other users' directories.
  • Require a dry-run plan and renewed user approval if the requested scope changes.
  • Record the original path, resolved path, operation, result, and authorization decision in an audit log without exposing sensitive file contents.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:78
Finding

Insufficient Safeguards for Destructive File Cleanup

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 78–91
Vulnerability Type: Unsafe destructive file-operation guidance
Risk Level: Medium

Vulnerable Code Snippet

markdown
- Archive mechanism: After a project is completed, archive it cleanly—compress what must be retained and delete what is not needed.
...
- Downloads processing: Every file must be archived, deleted, or intentionally deferred with a documented reason.

The snippet is an English translation of the original instructions at the specified locations.

Technical Analysis

The cleanup workflow explicitly directs the agent to delete files but does not require a deletion manifest, per-batch confirmation, verified backup, quarantine period, or recoverable trash operation. The document requires approval before moving files at line 76, but it does not establish an equivalent control before deletion.

The classifications “not needed” and “delete” can be derived from ambiguous natural-language requests or automated organization decisions. Consequently, a classification error, overly broad path, filename collision, symbolic link, or hostile instruction could turn a routine cleanup operation into irreversible data loss.

The skill also acknowledges at line 205 that permanently deleted files cannot be restored. This makes the omission of mandatory recoverability and confirmation controls security-relevant rather than merely operational.

Attack Path

  1. A user requests cleanup of a Downloads directory, project directory, or another broad file collection.
  2. The agent inventories files and classifies some items as unnecessary using incomplete context or attacker-influenced criteria.
  3. The cleanup rules at lines 78 and 91 permit those files to be selected for deletion.
  4. Because no mandatory deletion manifest or explicit confirmation is required, the agent executes the deletion using its write or exec capability.
  5. If permanent dele ...[truncated 614 chars]
Remediation
View remediation

Remediation Suggestions

  • Replace permanent deletion with a recoverable quarantine or operating-system trash operation.
  • Generate a complete deletion manifest containing canonical path, file type, size, modification date, and reason for selection.
  • Require explicit user confirmation immediately before every destructive batch.
  • Never infer approval to delete from approval to move, rename, archive, or organize files.
  • Exclude critical-document inventory entries, backups, hidden files, symbolic links, and protected directories by default.
  • Verify that required backups exist, are readable, and contain the selected files before deletion.
  • Apply canonical-path and approved-root checks immediately before each operation to reduce race and path-redirection risks.
  • Introduce a retention period during which quarantined files can be restored.
  • Maintain a rollback-oriented operation log and clearly report any files that could not be safely classified.
  • For uncertain files, default to retaining and flagging them for manual review rather than deleting them.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (5)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The skill describes cleanup and archiving workflows that include deletion behavior, but it does not surface a prominent user warning about irreversible data loss. In a file-management context, omission of deletion safeguards is dangerous because users may assume organization actions are non-destructive when they are not.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

The skill specifically targets critical personal documents such as contracts, tax, medical, and financial records without a clear privacy warning. Handling these categories without strong disclosure increases the risk of exposing highly sensitive personal data through logs, summaries, remote services, or over-broad file access.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

A file-management skill has no clearly justified need for external API/network access, yet the document includes API-key configuration and network-oriented operation. Unnecessary network capability expands the attack surface and creates opportunities for sensitive file metadata or content to be exfiltrated to remote services.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill advertises generic command execution for a task that should primarily involve constrained file operations. Broad exec capability can be repurposed to run arbitrary shell commands against user files or the host environment, especially in an agent setting where natural-language instructions may be translated into commands.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill presents itself as a pure Markdown/natural-language skill while elsewhere claiming exec, API integration, and API-key-driven behavior. This inconsistency can mislead reviewers and users about the actual execution and data-exposure surface, causing unsafe approval or use under weaker trust assumptions.

Content

No source excerpt is available for this finding.