Back to skill

Security audit

Error Recovery Automation

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent recovery-automation guide, but it asks users to create recurring agent jobs that execute scripts and modify local records without enough scoping, cleanup, or consent safeguards.

Review carefully before installing. The skill is not trying to hide its behavior, but do not enable its cron examples unless you want persistent automated agent sessions with local command execution. Use fixed absolute script paths, protect those scripts from modification, add timeouts and retry limits, document how to disable each job, and avoid Telegram delivery unless you have explicitly approved that notification channel.

Vulnerability Patterns
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • 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)

T06 · System Persistence

Error
Location
SKILL.md:210
Finding

Persistent Autonomous Agent Execution Through a Scheduled Cron Job

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 210–223
Vulnerability Type: T06: System Persistence
Risk Level: High

Vulnerable Code

markdown
Once you have a recovery script, schedule it as a cron job that runs **only when the service is likely to fail** (e.g., every 30 minutes for browser, every hour for gateway). Use an isolated agent session to execute the script and announce failures.

**Example cron job for browser recovery:**

```bash
openclaw cron add \
  --name "Browser‑Recovery‑Automation" \
  --schedule 'every 30 minutes' \
  --session isolated \
  --payload '{"kind":"agentTurn","message":"Run browser recovery automation script","model":"default","thinking":"low"}' \
  --delivery '{"mode":"announce","channel":"telegram"}'

Agent response inside isolated session: The agent reads the script (or inline logic) and executes it via exec. If the script exits with 0, the agent announces success; if non‑zero, the cron delivery forwards the failure message.

text

### Technical Analysis

The skill directs the user or agent to register a recurring scheduled task that survives the initiating skill run. Every 30 minutes, the task creates an isolated autonomous agent session and instructs it to read and execute recovery logic through `exec`.

This is a system-persistence mechanism because execution continues across sessions until the cron entry is explicitly removed. Moreover, the generic agent message does not bind execution to an immutable, integrity-checked script. If the referenced workspace script or inline instructions are subsequently modified, the scheduled agent may repeatedly execute the changed logic.

### Attack Path

1. The skill is loaded and its documented recovery setup is followed.
2. The supplied `openclaw cron add` command registers a persistent job.
3. The scheduler launches a new isolated agent session every 30 minutes.
4. The session interprets the generi
...[truncated 1001 chars]
Remediation
View remediation

Remediation Suggestions

  • Require explicit, informed user authorization before creating any recurring scheduled task.
  • Use one-shot, manually invoked recovery as the default behavior.
  • Replace the generic autonomous-agent payload with a narrowly scoped invocation of a fixed script at an allowlisted absolute path.
  • Verify the script using a cryptographic hash or signature before each execution.
  • Restrict the scheduled account to the minimum filesystem, process, service, and network permissions required for recovery.
  • Apply execution timeouts, concurrency limits, retry limits, and command allowlists.
  • Protect recovery scripts and their parent directories from modification by less-trusted users or processes.
  • Disable external notification delivery by default and require separate authorization before enabling it.
  • Document commands for inspecting, disabling, and permanently deleting the scheduled job.
  • Record creation and execution of the job in an auditable local log without including credentials or sensitive operational data.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • 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 (7)

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 16)May include surrounding context.

md
- You are setting up proactive monitoring and need a recovery plan beyond just detection.
- You want to reduce the manual steps required when “Läuft alles?” reveals a failure.
- You need to ensure critical OpenClaw components stay running with minimal user intervention.
- You are asked to “create a skill for error recovery automation” (this is that skill).

## Core patterns

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill explicitly recommends automated file modifications to memory and task-tracking files during failure escalation, but it does not require clear user consent, dry-run behavior, or safeguards against duplicate/corrupt entries. In an autonomous recovery context, that can cause unintended persistent state changes, audit noise, or tampering with operational records without operator awareness.

Content

No source excerpt is available for this finding.

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 · SKILL.md (reported line 319)May include surrounding context.

md
- **Over‑aggressive recovery:** Restarting a service too frequently can cause instability. Set reasonable intervals (≥30 minutes) and maximum attempts (≤2).
- **Silent recovery:** If recovery succeeds but you never hear about it, you might not know the service was failing. At minimum, log recovery events to memory/ files.
- **No verification:** Restarting a service without verifying it actually recovered can mask deeper issues. Always re‑check after restart.
- **Hard‑coded assumptions:** Avoid assuming a specific Node version, path, or user ID. Use environment variables or detect them at runtime.
- **Ignoring dependencies:** Browser depends on gateway; restarting browser while gateway is down will fail. Check dependencies in order.
- **Automating unsafe actions:** Do not automate deletion of logs, modification of critical configs, or any irreversible action without a rollback plan.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · SKILL.md (reported line 338)May include surrounding context.

md
- `scripts/gateway-recovery.sh` (template)
- `scripts/browser-recovery.sh` (template)
- `scripts/cron-recovery.sh` (template)
- `skills/health-monitoring/SKILL.md`
- `skills/system-diagnostics/SKILL.md`
- `docs/MAINTENANCE.md`
- `memory/patterns/playbooks.md`

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · SKILL.md (reported line 339)May include surrounding context.

md
- `scripts/browser-recovery.sh` (template)
- `scripts/cron-recovery.sh` (template)
- `skills/health-monitoring/SKILL.md`
- `skills/system-diagnostics/SKILL.md`
- `docs/MAINTENANCE.md`
- `memory/patterns/playbooks.md`
- `openclaw cron --help`

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The skill uses the German phrase “Läuft alles?” as an example invocation/context, but the document does not explain that the skill is German-specific or offer alternative language handling. This can create an implicit language/locale constraint without user opt-in.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

At L320, the documentation explicitly advises avoiding hard-coded assumptions about paths. However, the recovery template at L186-L187 changes directory to a specific relative path under the detected openclaw binary and rebuilds a globally installed module, which is exactly the kind of path-specific assumption the anti-pattern warns against.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.