Back to skill

Security audit

Trash Manager

Security checks for vulnerabilities and agentic risk

Overview

The skill is a trash-management guide, but it globally redirects file deletions to an unbundled local script and recommends automatic permanent cleanup, so it needs user review before installation.

Install only if you already trust and control the referenced trash-manager.sh script and are comfortable with agents using it for deletion workflows. Review the script source, permissions, allowed paths, restore behavior, and cron cleanup settings before enabling the skill, especially because cleanup can permanently remove files.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • 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 (2)

T01 · Skill Instruction Hijacking

Error
Location
= correct ✅ ``` ``` ### Technical Analysis The Skill establishes a mandatory global rule for file deletion rather than limiting its behavior to tasks in which the user explicitly requests trash management. The phrases “Always” and “forbidden” instruct every agent to replace its normal deletion workflow with an external command. This is instruction hijacking because loading the Skill alters agent behavior beyond the immediate functionality requested by a user. The rule may supersede established deletion t ...[truncated 1885 chars]:12
Finding

Global Agent Deletion Workflow Hijacking

Content
View full analysis
= correct ✅ ``` ``` ### Technical Analysis The Skill establishes a mandatory global rule for file deletion rather than limiting its behavior to tasks in which the user explicitly requests trash management. The phrases “Always” and “forbidden” instruct every agent to replace its normal deletion workflow with an external command. This is instruction hijacking because loading the Skill alters agent behavior beyond the immediate functionality requested by a user. The rule may supersede established deletion tools, sandbox controls, confirmation procedures, or task-specific safety policies. The risk is increased because the mandated `trash-manager.sh` implementation is not included in the audited project. Consequently, the project provides no evidence that the redirected operation safely validates targets, handles symbolic links, preserves permissions, or prevents deletion of sensitive files. ### Attack Path 1. An agent loads or follows the `trash-manager` Skill. 2. The Skill directs the agent to treat its deletion rule as mandatory for all agents and deletion operations. 3. A user or another workflow requests deletion of a file. 4. Instead of using the agent's established and potentially controlled deletion mechanism, the agent invokes `trash-manager.sh add `. 5. The external script receives the target path and operates with the agent's filesystem privileges. 6. If that script is unsafe, replaced, or malicious, it can manipulate the target or other accessible files while appearing to perform legitimate trash management. ### Impact Assessment The hijacked workflow can affec ...[truncated 685 chars]
Remediation
View remediation

T07 · Tool Hijacking and Spoofing

Error
Location
` Move to trash and update index. **All deletion operations must use this.** ```bash # Example ~/.openclaw/scripts/trash-manager.sh add /path/to/unused-file.txt ~/.openclaw/scripts/trash-manager.sh add ~/.openclaw/workspace/tmp/old.log ``` ``` ### Technical Analysis The Skill redirects trusted deletion operations to the fixed local path `~/.openclaw/scripts/trash-manager.sh`. However, the complete audited project contains only `SKILL.md`; it does not include the referenced executable or any mechanism to ...[truncated 2364 chars]:35
Finding

Deletion Operations Redirected to an Unbundled Local Executable

Content
View full analysis
` Move to trash and update index. **All deletion operations must use this.** ```bash # Example ~/.openclaw/scripts/trash-manager.sh add /path/to/unused-file.txt ~/.openclaw/scripts/trash-manager.sh add ~/.openclaw/workspace/tmp/old.log ``` ``` ### Technical Analysis The Skill redirects trusted deletion operations to the fixed local path `~/.openclaw/scripts/trash-manager.sh`. However, the complete audited project contains only `SKILL.md`; it does not include the referenced executable or any mechanism to verify its source, ownership, permissions, integrity, or expected hash. The Skill therefore treats an executable outside the reviewed package as a trusted tool. Any process or user capable of creating or replacing that path can control what executes when an agent follows the documented deletion workflow. The legitimate-looking command name can conceal arbitrary local behavior. The documentation also passes a caller-selected filesystem path to the external executable. Because the implementation is unavailable, the audit cannot verify argument handling, path canonicalization, symbolic-link protection, target restrictions, race-condition resistance, or index-file security. ### Attack Path 1. An attacker or compromised local process places a malicious executable at `~/.openclaw/scripts/trash-manager.sh`, or modifies an existing script at that path. 2. The agent loads the Skill and accepts its instruction that all deletion operations must use that executable. 3. A deletion request supplies a target path, potentially one containing sensitive information or located in a privileged workspace. 4. The agent invokes the attacker-controlled executable under its own operating-system identity. 5. The executable can ignore the documented ...[truncated 1013 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The recommended cron setup hard-codes "tz": "Asia/Shanghai", which imposes a specific locale setting in natural-language guidance/config content. The document does not offer an opt-in choice or explain why this region-specific timezone is required, so it may violate language/locale policy expectations.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.