Back to skill

Security audit

Claw Janitor

Security checks for vulnerabilities and agentic risk

Overview

This cleanup skill is not exfiltrating data, but it can delete broad local, Docker, and system resources by default with too little user control.

Review before installing. Use only with explicit dry-run-first workflows, avoid running it as root, and scope commands with --only or --skip. The publisher should make preview mode the default, require an explicit apply flag for mutation, and gate Docker and system cleanup behind explicit user authorization.

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

T09 · Insecure Skill Coding Practices

Warning
Location
janitor.js:271
Finding

Destructive cleanup executes by default without preview, confirmation, or explicit high-impact scope selection

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
janitor.js:231
Finding

PATH-based executable resolution permits command substitution, including during root cleanup

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · test-janitor.js (reported line 23)May include surrounding context.

js
// 2) Regex protection (.env/.git)
  {
    const envPath = path.resolve('/tmp/project/.env');
    const gitPath = path.resolve('/tmp/project/.git/config');
    assert.strictEqual(isSafeToClean(envPath), false, '.env path must be blocked');
    assert.strictEqual(isSafeToClean(gitPath), false, '.git path must be blocked');

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · test-janitor.js (reported line 25)May include surrounding context.

js
{
    const envPath = path.resolve('/tmp/project/.env');
    const gitPath = path.resolve('/tmp/project/.git/config');
    assert.strictEqual(isSafeToClean(envPath), false, '.env path must be blocked');
    assert.strictEqual(isSafeToClean(gitPath), false, '.git path must be blocked');
  }

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The example trigger phrase "Clean up my disk" is broad, natural language that overlaps with common everyday requests. In an agent environment, this can cause the skill to activate too readily and initiate destructive or privacy-impacting cleanup actions, especially since the default example invokes the cleanup command without --dry-run.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The header states 'ZERO external dependencies. Must run on raw Node.js,' which implies the skill relies only on built-in Node.js functionality. However, later code uses child_process.execSync to invoke external binaries such as docker, npm, yarn, apt-get, brew, pip, and others, so the documentation actively contradicts the implementation.

Content

No source excerpt is available for this finding.