Back to skill

Security audit

OpenClaw Selfie

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Tuqu image-generation integration, but it needs review because its helper can send service keys and image data to custom hosts and it documents deletion and payment flows without strong confirmation guardrails.

Install only if you trust tuqu.ai and the service key you provide. Do not point TUQU_BASE_URL, TUQU_BILLING_BASE_URL, --base-url, or absolute endpoint paths at untrusted hosts. Treat deletes and recharge/payment actions as manual-confirmation actions, and protect the service key because it can affect images, saved characters, history, balance, and payment flows.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/tuqu_request.py:201
Finding

Credentials and Private Image Data Can Be Sent to Arbitrary Network Destinations

Content
View full analysis
str: _, _, env_name, default_base_url = match_endpoint_rule(path) return os.environ.get(env_name, default_base_url) ``` ```python def build_url(base_url: str, path: str, query_items: list[tuple[str, str]]) -> str: if path.startswith("http://") or path.startswith("https://"): base = path else: base = urllib.parse.urljoin(base_url.rstrip("/") + "/", path.lstrip("/")) if not query_items: return base separator = "&" if urllib.parse.urlparse(base).query else "?" return base + separator + urllib.parse.urlencode(query_items) ``` ```python body = prepare_body(auth_mode, body, args.service_key) base_url = args.base_url or detect_base_url(args.path) headers = { "Accept": "application/json", } if auth_mode == "api-key": if not args.service_key: raise ValueError("Missing service key. Pass --service-key for this endpoint.") headers["x-api-key"] = args.service_key if auth_mode == "service-key": service_key = resolve_service_key(args.service_key, body, query_items) if not service_key: raise ValueError( "Missing service key. Pass --service-key, pass --query " "serviceKey=..., or provide serviceKey in the JSON body." ) headers["Authorization"] = f"Bearer {service_key}" data = None if body is not None: headers["Content-Type"] = "application/json" data = json.dumps(body).encode("utf-8") url = build_url(base_url, args.path, query_items) requ ...[truncated 3840 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (19)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared description presents an end-user image-generation skill that creates consistent character photos and handles related tuqu.ai workflows. The supplied code, however, is only a test module for a request script. It does not generate images, enhance prompts, discover presets, manage characters, or execute billing/recharge flows directly; instead it checks whether certain API requests use explicit service keys in headers/bodies and reject insecure environment-variable defaults. While the tested endpoints relate to the tuqu.ai domain, the actual behavior of this chunk is materially narrower and primarily about auth/request plumbing, so the description does not accurately represent this code chunk.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Exposing a raw DELETE /api/characters/<character-id> operation without documented guardrails enables destructive parameterized actions against user assets. If an agent fills <character-id> from ambiguous context or malicious prompt injection, it could delete the wrong character or perform unauthorized destructive changes with the supplied service key.

Content

Scanner excerpt · SKILL.md (reported line 240)May include surrounding context.

python3 scripts/tuqu_request.py PUT /api/characters/
--service-key
--body-file payloads/update-character.json python3 scripts/tuqu_request.py DELETE /api/characters/
--service-key

text

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
93% confidence
Finding

The documented DELETE /api/history/<history-id> call similarly allows destructive parameter abuse against user records without any confirmation or verification workflow. While less severe than character deletion, an incorrect or manipulated history ID could erase audit/history data that users may rely on for troubleshooting or recordkeeping.

Content

Scanner excerpt · SKILL.md (reported line 265)May include surrounding context.

python3 scripts/tuqu_request.py POST /api/history
--service-key
--body-file payloads/history-item.json python3 scripts/tuqu_request.py DELETE /api/history/ --service-key python3 scripts/tuqu_request.py POST /api/billing/balance --service-key

text

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/endpoints.md (reported line 335)May include surrounding context.

md
- `GET /api/characters?id=...`: fetch one character
- `POST /api/characters`: create a character
- `PUT /api/characters`: update a character
- `DELETE /api/characters?id=...`: delete a character

Auth:

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/endpoints.md (reported line 371)May include surrounding context.

md
- `GET /api/history`: return up to 50 recent history items
- `POST /api/history`: add a history item
- `DELETE /api/history?id=...`: delete a history item

Auth:

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · scripts/tuqu_request.py (reported line 129)May include surrounding context.

python
for rule in ENDPOINT_RULES:
        prefix = rule[0]
        if lookup_path == prefix or lookup_path.startswith(prefix + "/"):
            return rule
    raise ValueError(
        "This path is not covered by the helper. Pass --base-url and --auth-mode explicitly."
    )

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file documents calls that send a service key to remote billing and photo endpoints and later describes recharge flows, but it does not include any explicit warning that requests transmit credentials/data to third-party services or may incur charges. For markdown files, SQP-2 applies when the skill description omits warnings about behaviors affecting user privacy or finances.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The README says to 'just talk to your OpenClaw character naturally' but only provides Chinese example phrases, implying a language-specific interaction model without opt-in or justification. SQP-3 applies because language/locale constraints should either be optional, user-selectable, or clearly documented as region-specific.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill documents network access, file reads, and environment-dependent behavior but does not declare any explicit tool scope or permissions boundary. In an agent ecosystem, missing scope declarations can allow broader-than-expected execution and makes it harder to enforce least privilege or review what the skill is permitted to do.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The trigger description includes broad everyday phrases such as requests for photos or images without tight constraints, which can cause the skill to activate in contexts the user did not intend. Over-broad activation can route unrelated conversations into networked actions, billing flows, or identity-preserving image generation unexpectedly.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The phrase or similar wording creates ambiguous activation and classification boundaries, letting the agent infer intent too aggressively. In a skill that can create characters, consume paid credits, and send authenticated API requests, that ambiguity increases the chance of unintended sensitive actions.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · SKILL.md (reported line 137)May include surrounding context.

md
- If the user asks for the role to be shown, keep identity-preserving generation.
- If the request is for scenery, objects, mood boards, or edit-only transforms, do not force the
  current role into the frame.
- Do not ask the user for their own face photo unless they explicitly ask to put themselves in the
  image.

### Route by Subject Type

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · SKILL.md (reported line 296)May include surrounding context.

md
- If the user asks for the role to be shown, keep identity-preserving generation.
- If the request is for scenery, objects, mood boards, or edit-only transforms, do not force the
  current role into the frame.
- Do not ask the user for their own face photo unless they explicitly ask to put themselves in the
  image.

### Route by Subject Type

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill documents destructive deletion of characters without any warning about permanence, confirmation requirement, or recovery limitations. Because characters represent identity-preserving assets tied to future generations, accidental or induced deletion could permanently disrupt user workflows or erase stored character configurations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill documents recharge flows and specific payment endpoints without an explicit safety requirement to obtain clear user confirmation before initiating a billable action. In an agent setting, this can enable unintended financial transactions if the surrounding orchestration treats these instructions as executable guidance, especially because the skill also preserves payment artifacts like checkout URLs and QR codes that facilitate completion.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This reference advertises DELETE /api/characters?id=... as a supported operation, but it does not warn that the action removes persisted character data or suggest confirming intent before use. For markdown files, destructive behaviors that can affect user data should include explicit warnings about the impact.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

DELETE /api/history?id=... is a destructive operation affecting stored history entries, but the documentation provides no caution about deletion impact or need for user confirmation. Under the markdown-file criteria, omission of warnings for behaviors affecting user data is a reportable issue.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The workflow explicitly instructs the agent to create, repair, and delete history records, which can modify or remove user data, but it provides no guardrails such as explicit user confirmation, authorization checks, or warnings about destructive actions. In an agent context, this increases the risk of accidental or unauthorized tampering with prior records, especially if a prompt ambiguously asks to 'fix' or 'clean up' history.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The recharge workflow enables creation of payment sessions and returns sensitive payment artifacts for project-linked top-ups, but it lacks explicit warnings about financial impact, confirmation requirements, and careful handling of checkout URLs, session IDs, and order identifiers. In an agent-driven flow, this can lead to unintended charges, disclosure of payment-related artifacts, or misuse of a service key to spend funds without sufficiently informed user consent.

Content

No source excerpt is available for this finding.