Back to skill

Security audit

OpenClaw Code Review

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent local code-review skill that reads selected code and can save reports, with no hidden network, persistence, or destructive behavior found.

Install only if you are comfortable with a local code-review helper reading the files or Git changes you point it at. Use care with --output because it can overwrite the target file, and review CI artifact settings before uploading reports that may contain proprietary filenames, snippets, or findings.

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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • 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 (8)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill documents executable capabilities including shell use and file read/write workflows, but it does not declare any explicit tool scope such as permissions or allowed-tools. In an agent environment, this increases the chance the skill can be invoked with broader-than-necessary authority, enabling unintended filesystem access or command execution if the runtime does not enforce least privilege separately.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill description and most user-facing instructions are in Chinese, while the manifest header is in English, and there is no note that the skill is Chinese-only or that users can select another language. This can violate language/locale policy when a specific language is effectively forced without explicit opt-in or justification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

When --output is provided, the code writes directly to the specified path with Path(args.output).write_text(...) and gives no prior confirmation, overwrite warning, or path safety checks. In an agent/automation context, this can unexpectedly clobber existing files or create files in sensitive locations if an untrusted or mistaken path is supplied, making the behavior more dangerous than in a purely interactive local CLI.

Content

No source excerpt is available for this finding.

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/main.py (reported line 51)May include surrounding context.

python
def run_review_staged(args):
    """Review staged git changes"""
    # Get list of staged files
    result = subprocess.run(
        ['git', 'diff', '--cached', '--name-only', '--diff-filter=ACM'],
        capture_output=True,
        text=True

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/main.py (reported line 98)May include surrounding context.

python
def run_review_commit(args):
    """Review a specific commit"""
    # Get files changed in commit
    result = subprocess.run(
        ['git', 'diff-tree', '--no-commit-id', '--name-only', '-r', args.commit],
        capture_output=True,
        text=True

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The diff review command claims to review a diff or patch but actually forwards the provided path(s) to plain file review, causing the tool to analyze patch text rather than the files referenced by the diff. In a security review workflow, this can create a false sense of coverage and allow vulnerable code changes to pass because reviewers believe changed source lines were examined when they were not.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file documents exporting JSON reports with --output report.json and later uploading review.json as a CI artifact, but it does not warn users that code-analysis results may be persisted to disk or shared through CI systems. Because review outputs can contain snippets, filenames, or issue details from proprietary code, a brief disclosure would improve user awareness of data handling.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The manifest describes an automated code review assistant that analyzes code changes and provides feedback, which strongly suggests read/compute/report behavior. This implementation additionally writes reports to an arbitrary output path when --output is supplied, a side effect not reflected in the description.

Content

No source excerpt is available for this finding.