Back to skill

Security audit

Dead Man's Switch

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent self-healing infrastructure tool, but it can make recurring privileged system changes and learn fixes from untrusted web results without clear approval gates.

Install only if you intentionally want an autonomous infrastructure repair agent with sudo-level operational authority. Review and constrain the playbooks first, require approval before destructive cleanup or cron creation, avoid automatic use of web-sourced fixes, and verify any /usr/local/bin helper scripts before allowing sudo execution.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
Findings (5)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:121
Finding

Untrusted Web Guidance Is Executed and Persisted in Recovery Playbooks

Content
View full analysis
fix ubuntu 24 " ``` 3. Read the top result and attempt the recommended fix 4. If the fix works: - Append what you learned to the relevant playbook file - Log with `result: "success"` and note: "Learned new fix via Tavily" 5. Log: "Learned new fix for ``: ``" ``` ### Technical Analysis The Skill instructs the agent to retrieve an arbitrary top-ranked search result and attempt its recommended remediation without validating the source, constraining the permitted command set, or obtaining user approval. Search results and retrieved pages are untrusted input and may contain malicious shell commands or prompt-injection instructions. The risk becomes persistent because successful guidance is appended to a playbook. Consequently, attacker-controlled instructions can become part of the Skill's durable operational state and influence future privileged sessions. The mechanism combines current-session instruction hijacking with long-term state poisoning. ### Attack Path 1. An attacker publishes or compromises a page targeting an infrastructure error likely to be searched by the Skill. 2. The page is ranked as the top Tavily result or otherwise selected by the agent. 3. The page embeds unsafe remediation commands or instructions designed to override expected operational boundaries. 4. The agent reads the page and attempts the recommended fix. 5. Because recovery operations commonly use `sudo`, the malicious guidance may execute with elevated privileges. 6. If the apparent problem is resolved, the agent appends the gui ...[truncated 451 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
playbooks/disk.md:43
Finding

Automatic Root-Level Cleanup Can Delete Operationally Required Data

Content
View full analysis
/dev/null || true # Clear stale apt lists sudo rm -rf /var/lib/apt/lists/* sudo apt-get update # Regenerates them ``` ```bash # Check if Docker is present which docker 2>/dev/null # Remove unused images, containers, volumes sudo docker system prune -f 2>/dev/null || true # More aggressive: also remove unused images sudo docker image prune -af 2>/dev/null || true ``` ```bash # List installed kernels dpkg -l 'linux-image-*' | grep '^ii' # Remove old kernels (keeps current + 1 previous) sudo apt-get autoremove --purge -y ``` ### Technical Analysis The recovery procedure performs broad, noninteractive deletion as root based primarily on a disk-utilization threshold. File age does not prove that a temporary file is unused. Truncating active logs can destroy forensic evidence, while global deletion under `/var/log` may violate retention requirements. Docker pruning can remove stopped containers, build cache, networks, images, and potentially other artifacts needed for rollback or rapid recovery. Package autoremove determines removability from package-manager metadata and does not guarantee that the affected package is operationally unnecessary. The commands suppress some failures with `2>/dev/n ...[truncated 1087 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
playbooks/process.md:99
Finding

Unvalidated Dynamic Values Reach Privileged Process-Control Commands

Content
View full analysis
# Wait and check sleep 2 pgrep -a # If there's a start script & ``` Related privileged interpolation also appears in `playbooks/nginx.md:41-56`: ```bash # Check nginx error log for upstream info sudo tail -50 /var/log/nginx/error.log # Find which upstream app is configured grep -r "proxy_pass" /etc/nginx/sites-enabled/ # Check if the upstream process is running sudo systemctl status # Restart the upstream process sudo systemctl restart # Wait and verify sleep 10 curl -sI --max-time 10 https:// ``` Additional unsafe command composition appears in `playbooks/process.md:137-146`: ```bash # Find the proxy_pass target in nginx config grep -r "proxy_pass" /etc/nginx/sites-enabled/ # Then check what's listening on that port sudo ss -tlnp | grep # Match PID to service sudo systemctl status $(sudo systemctl list-units --type=service | grep ) ``` ### Technical Analysis Service names, process names, script paths, ports, and site values are represented as placeholders but no validation or safe argument-passing mechanism is defined. If values are derived from user input, configuration, logs, or web content and inserted into a shell command, shell metacharacters may alter command structure. Even without metacharacter injection, `pkill -f` matches the complete command line and can terminate unrelated processes whose arguments contain the same text. Executing an arbitrary start-script path provides a direct program-execution primitive. The command substitution used to derive a systemd unit is not a reliable mapping from a port to a unit and may produce multiple or malformed arguments. ### Attack Path 1 ...[truncated 902 chars]
Remediation
View remediation

T06 · System Persistence

Error
Location
SKILL.md:68
Finding

Automatic Cron Creation Establishes Cross-Session Recovery Persistence

Content
View full analysis
Monitor" \ --cron "*/5 * * * *" \ --session isolated \ --message "Dead Man's Switch: check . If issue found, fix it using the appropriate playbook." \ --announce ``` **NEVER create crons preemptively** — only when a recurring pattern is detected or the user explicitly asks. ``` Concrete service-specific jobs also appear in: - `playbooks/disk.md:155-169` - `playbooks/nginx.md:191-203` - `playbooks/process.md:157-168` - `playbooks/tailscale.md:125-136` ### Technical Analysis The Skill can install scheduled tasks that survive the current session and repeatedly invoke autonomous recovery. Although recurrence is required, the decision is based on a mutable user-level JSONL file and does not require explicit approval before persistence is established. The scheduled messages direct future isolated sessions to perform fixes. Those fixes include root service control, filesystem deletion, external network checks, and invocation of privileged scripts. Thus, a single persistence decision amplifies the other unsafe recovery behaviors over time. ### Attack Path 1. An attacker induces two service failures within 24 hours or tampers with the writable fix log to represent repeated incidents. 2. The Skill concludes that a recurring pattern exists. 3. It creates an OpenClaw cron job without prior informed approval. 4. The cron job starts ...[truncated 652 chars]
Remediation
View remediation

T07 · Tool Hijacking and Spoofing

Error
Location
playbooks/tailscale.md:42
Finding

Privileged Execution of Local Recovery Scripts Outside the Audited Package

Content
View full analysis
``` Or use the tool: ``` dms_recover(service="process", reason=" crashed", processName="") ``` ``` ### Technical Analysis The reviewed project contains only Markdown files; the referenced scripts under `/usr/local/bin` are not included. Their actual contents, provenance, ownership, permissions, update mechanism, and integrity therefore cannot be verified from the package. Calling these files through `sudo` treats their paths as trusted execution boundaries. If an attacker can create or replace one of the files, modify a parent directory, influence a symlink, or compromise the external installation process, a normal recovery operation will execute attacker-controlled code as root. The Tailscale playbook documents an expected script body later in the file, but the Skill does not verify that the installed file matches that body before execution. The nginx and process h ...[truncated 899 chars]
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (86)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill is presented as a monitoring guardian but is authorized to take autonomous recovery actions, create cron jobs, and modify operational state without a clear upfront warning or consent boundary. This is dangerous because users may invoke it expecting diagnostics, while the skill can make persistent and potentially disruptive system changes.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The self-improvement section authorizes the skill to apply internet-sourced fixes and then modify local playbooks automatically, yet it provides no warning or approval step for these high-risk behaviors. In an infrastructure-management skill, this materially increases the chance of remote-content-driven misconfiguration, destructive repair attempts, and persistence of unsafe instructions.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Using rm -rf with a root-owned system path and wildcard is a dangerous deletion primitive in automation because mistakes in path construction, shell expansion, or future templating could escalate impact dramatically. Even when intended, it performs blind destructive removal without verification.

Content

Scanner excerpt · playbooks/disk.md (reported line 66)May include surrounding context.

sudo find /tmp -type f -atime +1 -delete 2>/dev/null || true

Clear stale apt lists

sudo rm -rf /var/lib/apt/lists/* sudo apt-get update # Regenerates them

text

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Using rm -rf with a root-owned system path and wildcard is a dangerous deletion primitive in automation because mistakes in path construction, shell expansion, or future templating could escalate impact dramatically. Even when intended, it performs blind destructive removal without verification.

Content

Scanner excerpt · playbooks/disk.md (reported line 66)May include surrounding context.

sudo find /tmp -type f -atime +1 -delete 2>/dev/null || true

Clear stale apt lists

sudo rm -rf /var/lib/apt/lists/* sudo apt-get update # Regenerates them

text

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · playbooks/disk.md (reported line 116)May include surrounding context.

md
df -h /

# Step 2: Apt cache cleanup
sudo apt-get clean && sudo apt-get autoclean

# Step 3: Journal vacuum
sudo journalctl --vacuum-time=7d --vacuum-size=500M

Chaining Abuse

High
Category
Tool Misuse
Confidence
82% confidence
Finding

The conditional chain 'which docker && sudo docker system prune -f' uses discovery to immediately trigger a destructive root action without operator review, making misuse or accidental execution easier in autonomous mode. Combined with '|| true', failures may also be hidden, reducing observability.

Content

Scanner excerpt · playbooks/disk.md (reported line 128)May include surrounding context.

md
sudo find /tmp -type f -atime +1 -delete 2>/dev/null || true

# Step 6: Docker (if present)
which docker && sudo docker system prune -f 2>/dev/null || true

# Step 7: Check final usage
df -h /

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases are broad enough to match ordinary support requests like checking whether services are up, which can invoke a skill that performs remediation and persistence actions. In context, accidental invocation is more dangerous because this skill does not just observe state; it can restart services, create cron jobs, and alter files.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly instructs itself to search the web for fixes and then attempt externally sourced remediation on production infrastructure. This creates a dangerous expansion of authority from deterministic monitoring/recovery into unvetted change execution, exposing the system to bad advice, prompt-injected content from search results, and destructive commands applied without human review.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill tells itself to append learned fixes to its own playbook files, giving it a self-modifying capability that can persist mistakes or adversarially influenced instructions. Because these playbooks may be used in future automated recoveries, a single bad incident response can poison later executions and create a durable compromise path.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
83% confidence
Finding

This privileged command truncates nginx logs in place, irreversibly deleting forensic and debugging data. In an autonomous self-healing skill, doing this as root can erase evidence of compromise or incidents without operator review.

Content

Scanner excerpt · playbooks/disk.md (reported line 52)May include surrounding context.

md
du -sh /var/log/

# Truncate large nginx logs (NOT delete — just truncate)
sudo find /var/log/nginx/ -name "*.log" -size +100M -exec truncate -s 50M {} \;

# Remove compressed/rotated logs older than 30 days
sudo find /var/log -name "*.gz" -mtime +30 -delete

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
81% confidence
Finding

Deleting rotated compressed logs as root is destructive and can remove historical evidence needed for investigations, compliance, or debugging. The playbook frames this as routine cleanup, making unattended loss of records more likely.

Content

Scanner excerpt · playbooks/disk.md (reported line 55)May include surrounding context.

sudo find /var/log/nginx/ -name "*.log" -size +100M -exec truncate -s 50M {} ;

Remove compressed/rotated logs older than 30 days

sudo find /var/log -name ".gz" -mtime +30 -delete sudo find /var/log -name ".1" -mtime +30 -delete

text

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
81% confidence
Finding

This command deletes rotated .1 log files with elevated privileges, causing irreversible loss of recent historical logs. In context, the autonomous recovery workflow makes the destruction more dangerous because it may trigger during an active incident.

Content

Scanner excerpt · playbooks/disk.md (reported line 56)May include surrounding context.

Remove compressed/rotated logs older than 30 days

sudo find /var/log -name ".gz" -mtime +30 -delete sudo find /var/log -name ".1" -mtime +30 -delete

text

### 3. Temp Files

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Deleting files from /tmp as root can disrupt applications that rely on temporary files with older access times, especially on systems where atime is unreliable or disabled. In an automated playbook, this may cause service instability while attempting recovery.

Content

Scanner excerpt · playbooks/disk.md (reported line 63)May include surrounding context.

bash
# Clear /tmp (only files older than 24h to be safe)
sudo find /tmp -type f -atime +1 -delete 2>/dev/null || true

# Clear stale apt lists
sudo rm -rf /var/lib/apt/lists/*

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
87% confidence
Finding

Recursive forced deletion under /var/lib/apt/lists as root is destructive and, if path handling is ever altered or templated unsafely, could have severe consequences. Even as written, it removes package metadata blindly in an autonomous workflow and normalizes dangerous deletion primitives.

Content

Scanner excerpt · playbooks/disk.md (reported line 66)May include surrounding context.

sudo find /tmp -type f -atime +1 -delete 2>/dev/null || true

Clear stale apt lists

sudo rm -rf /var/lib/apt/lists/* sudo apt-get update # Regenerates them

text

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
91% confidence
Finding

Docker system prune as root removes unused containers, networks, images, and optionally other artifacts, which can break rollback paths, destroy evidence, or impact workloads that operators expected to keep. In a self-healing automation context, this is a materially risky destructive action.

Content

Scanner excerpt · playbooks/disk.md (reported line 77)May include surrounding context.

md
which docker 2>/dev/null

# Remove unused images, containers, volumes
sudo docker system prune -f 2>/dev/null || true

# More aggressive: also remove unused images
sudo docker image prune -af 2>/dev/null || true

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
93% confidence
Finding

Docker image prune -af is an aggressive destructive command that removes all unused images, increasing the likelihood of slower recovery, broken deploy assumptions, and loss of forensic state. Executing it with sudo in autonomous remediation magnifies operational and security risk.

Content

Scanner excerpt · playbooks/disk.md (reported line 80)May include surrounding context.

sudo docker system prune -f 2>/dev/null || true

More aggressive: also remove unused images

sudo docker image prune -af 2>/dev/null || true

text

### 5. Old Kernels (Ubuntu)

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
76% confidence
Finding

Autoremove --purge as root can uninstall kernels and related packages automatically, which may reduce rollback options or remove components unexpectedly depending on package state. In unattended remediation, this can create availability and recovery risk.

Content

Scanner excerpt · playbooks/disk.md (reported line 90)May include surrounding context.

dpkg -l 'linux-image-*' | grep '^ii'

Remove old kernels (keeps current + 1 previous)

sudo apt-get autoremove --purge -y

text

### 6. Application Logs

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · playbooks/disk.md (reported line 105)May include surrounding context.

text

Report large log files to the user but do NOT delete application logs
without confirmation — they may be needed for debugging.

## Recovery Sequence

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

This root-level journal vacuum reduces retained system logs during an incident response workflow, potentially erasing evidence or useful debugging history. The danger is heightened because it is embedded in an automatic recovery sequence.

Content

Scanner excerpt · playbooks/disk.md (reported line 119)May include surrounding context.

md
sudo apt-get clean && sudo apt-get autoclean

# Step 3: Journal vacuum
sudo journalctl --vacuum-time=7d --vacuum-size=500M

# Step 4: Old rotated logs
sudo find /var/log -name "*.gz" -mtime +30 -delete 2>/dev/null || true

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Automated root deletion of rotated logs in the recovery sequence irreversibly removes historical records. During compromise or failure investigation, that can hinder diagnosis and accountability.

Content

Scanner excerpt · playbooks/disk.md (reported line 122)May include surrounding context.

md
sudo journalctl --vacuum-time=7d --vacuum-size=500M

# Step 4: Old rotated logs
sudo find /var/log -name "*.gz" -mtime +30 -delete 2>/dev/null || true

# Step 5: Temp files
sudo find /tmp -type f -atime +1 -delete 2>/dev/null || true

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Root deletion of older /tmp files in the generic recovery sequence can remove files still needed by applications or services, especially where access times are not trustworthy. In autonomous execution this can turn a disk issue into a service outage.

Content

Scanner excerpt · playbooks/disk.md (reported line 125)May include surrounding context.

md
sudo find /var/log -name "*.gz" -mtime +30 -delete 2>/dev/null || true

# Step 5: Temp files
sudo find /tmp -type f -atime +1 -delete 2>/dev/null || true

# Step 6: Docker (if present)
which docker && sudo docker system prune -f 2>/dev/null || true

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
90% confidence
Finding

This sequence conditionally invokes docker system prune as root during automatic recovery, causing potentially broad deletion of container artifacts with no operator check. That can disrupt services and destroy evidence or rollback state.

Content

Scanner excerpt · playbooks/disk.md (reported line 128)May include surrounding context.

md
sudo find /tmp -type f -atime +1 -delete 2>/dev/null || true

# Step 6: Docker (if present)
which docker && sudo docker system prune -f 2>/dev/null || true

# Step 7: Check final usage
df -h /

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The playbook instructs automatic cleanup and cron-based recurrence without presenting an upfront warning that several actions are destructive or operationally risky, including log truncation, file deletion, Docker pruning, and package cache removal. In an autonomous recovery skill, this increases the chance that irreversible changes happen without operator awareness, harming forensics, debugging, or service availability.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · playbooks/disk.md (reported line 116)May include surrounding context.

md
grep -r "proxy_pass" /etc/nginx/sites-enabled/

# Check if the upstream process is running
sudo systemctl status <app-name>

# Restart the upstream process
sudo systemctl restart <app-name>

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · playbooks/nginx.md (reported line 49)May include surrounding context.

md
grep -r "proxy_pass" /etc/nginx/sites-enabled/

# Check if the upstream process is running
sudo systemctl status <app-name>

# Restart the upstream process
sudo systemctl restart <app-name>