Back to skill

Security audit

openclaw security auditor

Security checks for vulnerabilities and agentic risk

Overview

This security-auditor skill has a coherent purpose, but it relies on unreviewed external Python code and includes persistent configuration-changing behavior that is under-disclosed.

Review this before installing. The audit/reporting goal is legitimate, but do not rely on the scanner unless the external `osa` dependency is pinned and verified. Avoid the aggressive profile except in disposable isolated tests, and treat the fixer as a persistent config editor despite the read-only safety claim.

Vulnerability Patterns
  • 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
  • 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 (2)

T07 · Tool Hijacking and Spoofing

Error
Location
scripts/security_scanner.py:12
Finding

Unverified External Python Modules Can Be Loaded and Executed

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/report_generator.py:242
Finding

Unescaped Scan Results Permit Stored HTML Injection

Content
View full analysis
OpenClaw Security Audit Report body {{ font-family: Arial, sans-serif; margin: 40px; }} .header {{ background: #f5f5f5; padding: 20px; border-radius: 5px; }} .score-excellent {{ color: #22c55e; font-weight: bold; }} .score-good {{ color: #84cc16; font-weight: bold; }} .score-fair {{ color: #f59e0b; font-weight: bold; }} .score-risk {{ color: #ef4444; font-weight: bold; }} .score-critical {{ color: #7f1d1d; font-weight: bold; }} .issue {{ margin: 20px 0; padding: 15px; border-left: 4px solid #ccc; }} .critical {{ border-left-color: #ef4444; }} .high {{ border-left-color: #f97316; }} .medium {{ border-left-color: #eab308; }} .low {{ border-left-color: #22c55e; }} .info {{ border-left-color: #64748b; }}

OpenClaw Security Audit Report

Security Score: {results['score']}/100

Configuration File: {results['config_path']}

Security Mode: {results['mode']}

Summary

Total Checks: {results['total_checks']}

Passed: {results['passed_checks']}

Issues Found: {len(results['issues'])}

""" # Add issues for issue in results['issues']: severity = issue.get('severity', 'info') html += f"""

{issue.get('title', 'Unknown issue')}

Description: {issue.get('description' ...[truncated 2857 chars]

Remediation
View remediation
str: return escape(str(value), quote=True) ``` 2. Apply escaping in both text and attribute contexts: ```python config_path = html_text(results["config_path"]) mode = html_text(results["mode"]) title = html_text(issue.get("title", "Unknown issue")) description = html_text(issue.get("description", "No description")) fix_command = html_text(issue.get("fix_command", "N/A")) ``` 3. Prefer a mature template engine with automatic HTML escaping enabled rather than constructing HTML through f-strings. 4. Validate input against a strict schema before report generation: - Require numeric score and check-count fields. - Restrict `security_level` and `severity` to fixed allowlists. - Require expected collection and string types. - Reject unknown or structurally invalid fields where appropriate. 5. Do not insert raw input into CSS class attributes. Map validated enum values to internally defined class names. 6. Add a restrictive Content Security Policy when reports are served over HTTP, such as disallowing inline scripts and unapproved external resources. This should be defense in depth, not a substitute for escaping. 7. Add regression tests covering HTML-sensitive characters and payloads in every dynamic field, including closing tags, quoted attribute values, event-handler attributes, and script-capable markup. ]]>
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (12)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

If the skill claims to perform security diagnosis, scoring, validation, and remediation generation but in reality only renders provided values, users can be misled into relying on nonexistent security analysis. In a security context, false assurance is itself harmful because serious misconfigurations may go undetected while the output appears authoritative.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

If the skill claims to perform security diagnosis, scoring, validation, and remediation generation but in reality only renders provided values, users can be misled into relying on nonexistent security analysis. In a security context, false assurance is itself harmful because serious misconfigurations may go undetected while the output appears authoritative.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

Claiming the skill is 'safe and non-destructive' and 'only reads configuration files' directly contradicts earlier documented write and fix capabilities. In a security tool, deceptive or inaccurate safety claims are especially dangerous because they can lower user caution and enable unintended file modification under a veneer of safety.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The module header claims to provide 'safe configuration fixing capabilities,' but one of its built-in profiles applies overtly unsafe settings. This mismatch is dangerous because it creates trust in a security tool that can silently reduce protections, increasing the likelihood of operator error and insecure deployment.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The 'aggressive' profile materially weakens security by binding to LAN, disabling authentication, disabling workspace-only filesystem restrictions, and widening session scope. In a tool presented as a security auditor/fixer, offering this as a normal selectable mode can directly lead users to deploy an insecure configuration under the mistaken belief that it is a stronger hardening option.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The aggressive mode disables authentication and increases network exposure, yet the command-line interface presents it as a standard mode choice without a strong warning or extra friction at the point of use. In the context of a security auditor skill, this is especially dangerous because users may interpret 'aggressive' as stronger security rather than aggressively permissive behavior.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill documents code paths that read from a user configuration and write a report to disk, but it does not declare any explicit tool scope such as permissions or allowed-tools. That mismatch weakens the trust boundary for the skill and can lead to broader-than-expected file access when the agent executes the documented workflow.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation says the skill only reads configuration files, but elsewhere it explicitly writes reports and offers scripts that apply fixes. This inconsistency can cause unsafe operator assumptions about non-destructiveness and may lead users to authorize execution they would have declined if the write behavior were disclosed clearly.

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 · references/config-guide.md (reported line 107)May include surrounding context.

md
### Issue: No system firewall
- **Risk**: Network-level attacks
- **Fix**: Enable UFW with `sudo ufw enable`

## Configuration Validation

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This code performs a file write that modifies the user's configuration in place. Although the script logs backup creation and success, it does not require user confirmation before applying changes, which is a safety-relevant operation for a config-fixing tool.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This code sets the default report format to "bilingual", and the CLI also defaults to that format, which forces a specific language/locale combination unless the user explicitly overrides it. Under the policy, language or locale constraints should be optional or clearly justified rather than imposed by default.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The report template hardcodes paired English and Chinese headings and text throughout the generated output, reflecting a fixed locale policy in the natural-language content. The file does not present this as an optional language preference or explain a justified compliance need for this locale combination.

Content

No source excerpt is available for this finding.