Back to skill

Security audit

dr-session-cleaner

Security checks for vulnerabilities and agentic risk

Overview

The skill provides a disclosed, alert-only session monitor, with minor limitations in session filtering and error-log privacy.

Preview the cron entry and verify the operator's Discord ID before installing. Confirm which sessions your OpenClaw CLI returns, since --agent does not restrict monitoring. Alerts disclose session identifiers and token counts; failed sends may also record the recipient in local logs. Remove the marked session-guard cron block to stop recurring checks.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Rogue AgentSelf-Modification, Session Persistence
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (3)

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_read, shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
85% 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 · scripts/install_guard.sh (reported line 72)May include surrounding context.

sh
touch "$LOG_PATH"
chmod 600 "$LOG_PATH"

CURRENT_CRON="$(crontab -l 2>/dev/null | sed '/^# BEGIN session-guard$/,/^# END session-guard$/d' || true)"
{
  printf '%s\n' "$CURRENT_CRON" | grep -v '^$' || true
  printf '%s\n%s\n%s\n' "$BEGIN_MARK" "$CRON_EXPR" "$END_MARK"

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/session_guard.py (reported line 29)May include surrounding context.

python
def run(cmd: list[str], *, expect_json: bool = False) -> Any:
    """Run a shell command and optionally parse JSON."""
    try:
        result = subprocess.run(cmd, capture_output=True, text=True, check=True)
    except subprocess.CalledProcessError as exc:  # pragma: no cover - surface error
        print(f"[session-guard] command failed: {' '.join(cmd)}", file=sys.stderr)
        print(exc.stdout, file=sys.stderr)