Back to skill

Security audit

SkillSentryOpenClaw's Always‑On Security Cop

Security checks for vulnerabilities and agentic risk

Overview

This skill is a local security-audit tool, but its UI and documentation can falsely imply protection that is not actually implemented.

Review this before installing as a security control. The CLI audit is local-only, but it can include sensitive matching lines from local memory and skill files in its JSON output. Do not rely on the included panel or documented scheduling/alerting workflow unless the missing backend, config, and reporting components are implemented and the fake clean status is removed.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (3)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/audit.sh:28
Finding

Recursive Memory Scan Exposes Sensitive Content in JSON Reports

Content
View full analysis
"$PI_SCAN_FILE" for p in "${SCAN_PATHS[@]}"; do if [ -e "$p" ]; then grep -RInE --exclude-dir='.git' --exclude='*.png' --exclude='*.jpg' --exclude='*.jpeg' --exclude='*.gif' --exclude='*.webp' \ "$PI_PATTERNS" "$p" >>"$PI_SCAN_FILE" 2>/dev/null || true fi done ``` ```python "prompt_injection_hits": [l for l in read_file(os.environ["PI_SCAN_FILE"]).splitlines() if l.strip()], ``` ### Technical Analysis The script recursively searches the invoking user's OpenClaw memory and skill directories. Every matching line is copied into a temporary file and then included verbatim in the JSON report. A matching line may contain substantially more information than the detected keyword. For example, a line containing the phrase `system prompt` could also contain private conversation text, credentials, API tokens, internal instructions, filesystem paths, or personal information. The implementation performs no secret detection, redaction, output minimization, file-size restriction, or report-access control. The scan runs with the permissions of the user invoking the script. It does not independently gain elevated operating-system privileges, but it can read all matching files accessible to that account under the selected directories. Because the documented usage redirects stdout to a report file, exposed content can persist after the tem ...[truncated 1616 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
assets/panel.html:28
Finding

Audit Panel Fabricates a Clean Security Result Without Running the Audit

Content
View full analysis
{ log('PI hits: 0 malicious'); log('Gateway: Safe'); document.getElementById('status').innerHTML = 'Status: 🟢 CLEAN'; }, 2000); } ``` ### Technical Analysis The `scan()` function does not invoke `scripts/audit.sh`, contact a backend, read a report, or validate the gateway. After a two-second delay, it unconditionally reports: - Zero malicious prompt-injection hits - A safe gateway - An overall clean status This creates a false-negative security control. The displayed result is unrelated to the actual state of the host, gateway, agent memory, open ports, or audit script execution. Even failures such as a missing shell script, unavailable `openclaw` command, or detected injection indicators cannot alter the panel result. Although the function uses `innerHTML`, the assigned status values are static strings and do not establish a confirmed cross-site scripting vulnerability. The confirmed issue is the fabricated security result. ### Attack Path 1. An OpenClaw installation contains a vulnerable configuration, unexpected local service, or prompt-injection indicator. 2. The user opens the supplied panel and selects `SCAN NOW`. 3. The panel logs `Running audit.sh...`, even though no process is started. 4. After two seconds, the hardcoded callback displays `PI hits: 0 malicious`, `Gateway: Safe`, and `Status: CLEAN`. 5. The user relies on the false status and does not inspect the installation using the actual command-line audit. 6. Existing security issues remain undetected or unremediated. An attacker does not need to modify the panel to trigger this behavior. The unsafe result occurs duri ...[truncated 788 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:21
Finding

Documented Security Workflow Depends on Missing Components

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (5)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The declared purpose and notes say the skill performs local-only security auditing, but the behavior reportedly includes local port scanning while failing to implement some claimed checks such as vulnerabilities or cron validation. This mismatch is dangerous because users may run it with elevated trust, assuming narrow defensive behavior, when it actually performs broader host reconnaissance and may provide a false sense of coverage.

Content

No source excerpt is available for this finding.

YARA rule 'offensive_tool_references': References to well-known offensive security tools [hacktools]

High
Category
YARA Match
Confidence
70% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

Scanner excerpt · scripts/audit.sh (reported line 38)May include surrounding context.

sh
>"$PI_SCAN_FILE"
for p in "${SCAN_PATHS[@]}"; do
  if [ -e "$p" ]; then
    grep -RInE --exclude-dir='.git' --exclude='*.png' --exclude='*.jpg' --exclude='*.jpeg' --exclude='*.gif' --exclude='*.webp' \
      "$PI_PATTERNS" "$p" >>"$PI_SCAN_FILE" 2>/dev/null || true
  fi
done

# Local port scan (safe, loopback only)
PORT_SCAN_FILE="$TMPDIR/port_scan.txt"
if command -v nmap >/dev/null 2>&1; then
  (nmap -Pn -p 1-1024 127.0.0.1 || true) >"$PORT_SCAN_FILE" 2>&1
else
  echo "nmap not installed" >"$PORT_SCAN_FILE"
fi

# Build JSON report
export TS OPENCLAW_STATUS_FILE GATEWAY_STATUS_FILE SESSION_STATUS_FILE PI_SCAN_FILE PORT_SCAN_FILE
python3 - <<'PY'
import json, os
from pathlib import Path

def read_file(path):
    try:
        return Path(path).read_text(errors='ignore')
    except Exception as e:
        return f"ERROR: {e}"

report = {
    "timestamp": os.environ.get("TS", ""),
    "openclaw_status": read_file(os.environ["OPENCLAW_STATUS_FILE"]),
    "gateway_status": read_file(os.envir

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill advertises operational behavior that implies access to local files and environment-derived state, but it does not declare any tool scope or permissions boundary. In a security-audit skill, undeclared capability is risky because users may trust it to inspect only expected targets while it can access broader local context without explicit disclosure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The workflow directs users to modify config.yaml and schedule a cron job, but it does not clearly warn that these are persistent system changes. In a security-themed skill, silent or underexplained persistence is especially concerning because it can normalize ongoing execution and configuration drift without informed user consent.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The manifest describes a security audit and prompt-injection detector that scans OpenClaw-related status and prompt-injection patterns. Actively probing localhost ports 1-1024 expands into host network reconnaissance, which is not clearly implied by the stated scope and goes beyond inspecting OpenClaw/gateway/cron/PI artifacts.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.