Back to skill

Security audit

Reflect Critique Revise

Security checks for vulnerabilities and agentic risk

Overview

This code-review skill is purpose-aligned, but it can automatically send full code to a configurable LLM endpoint with weak endpoint controls.

Install only if you are comfortable with reviewed code being sent to the configured LLM service. Use a trusted local or HTTPS endpoint, avoid running it automatically on sensitive or proprietary code, and review revised output manually before saving, executing, or deploying it.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (2)

T01 · Skill Instruction Hijacking

Error
Location
reflect_critique_revise.py:71
Finding

Untrusted Draft Content Can Hijack the LLM Review and Revision Workflow

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
reflect_critique_revise.py:129
Finding

Unrestricted LLM Endpoint Configuration Enables Source Disclosure and SSRF

Content
View full analysis
str: endpoint = endpoint or os.environ.get( "OPENCLAW_LLM_ENDPOINT", "http://localhost:8080/v1/chat/completions" ) async with aiohttp.ClientSession() as session: async with session.post( endpoint, json={ "model": "m27-jangtq-crack", "messages": [ {"role": "system", "content": system}, {"role": "user", "content": prompt}, ], "temperature": temperature, "max_tokens": max_tokens, }, timeout=aiohttp.ClientTimeout(total=600), ) as resp: data = await resp.json() return data["choices"][0]["message"]["content"] ``` ### Technical Analysis The destination URL is accepted from `OPENCLAW_LLM_ENDPOINT` without validating its scheme, hostname, port, resolved address, or trust status. The complete task and source draft are included in the request body. A party that can influence the process environment can redirect these requests to an attacker-controlled server and receive source code or other sensitive content submitted for review. The same behavior can be used as a server-side request forgery primitive against HTTP services reachable from the machine running the skill. Because redirects are not explicitly disabled or revalidated, a permitted-looking endpoint could also redirect the client to a different destination. The code does not require TLS for non-loopback destinations. Consequently, sensitive prompts can be transmitted over plaintext HTTP when the environment variable specifies such an endpoint. ...[truncated 2051 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger "after any code generation producing > 30 lines" is broad enough to activate on many normal coding tasks regardless of risk, sensitivity, or user consent. This increases the chance of unintended review passes over proprietary or sensitive output and can create excessive autonomous behavior, cost amplification, and prompt-scope expansion in orchestrated systems.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The standalone trigger phrases include very common user language like "review," "double check," and "is this right," which can cause this skill to activate unexpectedly in ordinary conversations. In an agent system, overly broad auto-invocation can lead to scope creep, unnecessary processing of sensitive code or prompts, and unintended chaining into additional model calls without clear user intent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The function sends the full task and draft code to a network LLM endpoint, and the default endpoint is plain HTTP. That creates both a confidentiality risk from undisclosed exfiltration of potentially sensitive source code and an integrity risk because unencrypted transport permits interception or modification of prompts and responses in transit.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The endpoint is sourced from an environment variable, so execution context can silently redirect all reviewed code and task data to an attacker-controlled or third-party service without the user's awareness. In a skill that handles arbitrary draft code, this materially increases the chance of secret leakage, source disclosure, and untrusted model output influencing revisions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

Writing output to args.output can overwrite or modify local files, but the code provides no pre-write confirmation and no earlier disclosure in comments or docstrings about this file-writing behavior. The post-write stderr message appears only after the operation has already occurred.

Content

No source excerpt is available for this finding.