Back to skill

Security audit

AI Customer Service Scripts Generator

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Chinese customer-service reply generator, but it sends raw customer messages to an external LLM API without clear user notice or data-minimization controls.

Review this before installing if you handle regulated or confidential customer messages. Use it only where sending customer text to the OpenClaw LLM provider is acceptable, avoid including unnecessary personal data, require human review before sending generated replies in sensitive industries, and install dependencies in an isolated environment with pinned versions where possible.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:24
Finding
Unpinned Third-Party Dependency Installation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:24` **Vulnerability Type**: Unpinned and unverifiable third-party dependency **Risk Level**: Medium ### Vulnerable Code ```bash pip install openclaw ``` ### Technical Analysis The documented installation procedure retrieves the latest available version of the `openclaw` package without specifying an audited version, cryptographic hash, lockfile, or verified source repository. Consequently, the code installed by users may differ from the dependency version that existed when this project was reviewed. If the package distribution or maintainer account is compromised, or if a future release is malicious, package installation or subsequent import can execute attacker-controlled Python code. The project also imports this dependency directly: ```python from openclaw import OpenClaw ``` Python packages can execute code during installation and whenever their modules are imported. No malicious behavior in the currently referenced dependency was established by this audit; the issue is the unsafe, mutable dependency acquisition process. ### Attack Path 1. An attacker compromises the package publisher, distribution account, or upstream release process. 2. The attacker publishes a malicious version of `openclaw`. 3. A user follows the documented `pip install openclaw` instruction. 4. `pip` retrieves the attacker-controlled release because no version or hash is enforced. 5. Malicious code executes during package installation or when `scripts_generator.py` imports the package. 6. The payload operates with the privileges of the user running `pip` or the generator. ### Impact Assessment Successful exploitation could permit arbitrary code execution under the installing or executing user's account. Depending on that account's permissions, this may expose environment variables such as `OPENCLAW_API_KEY`, application data, accessible files, and network resources. The project itself does not request elevate ...[truncated 196 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the dependency to a specifically audited version, for example: ```bash pip install openclaw==<audited-version> ``` 2. Generate and maintain a dependency lockfile containing cryptographic hashes. 3. Install dependencies with hash verification, such as: ```bash pip install --require-hashes -r requirements.txt ``` 4. Document the official package repository and verify package ownership and provenance. 5. Use an isolated virtual environment or container with minimal filesystem and network privileges. 6. Add automated dependency vulnerability and integrity scanning to the release process. 7. Review dependency updates before changing the pinned version rather than automatically accepting the latest release. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts_generator.py:52
Finding
Prompt Injection Through Untrusted Customer Input<![CDATA[ ## Vulnerability Details **File Location**: `scripts_generator.py:52-74` **Vulnerability Type**: Untrusted input incorporated directly into model instructions **Risk Level**: Medium ### Vulnerable Code ```python prompt = f"""You are a professional customer-service training expert for the {industry} industry. Scenario: {scenario} Customer message: {customer_message} Customer sentiment: {sentiment} Required tone: {tone} Please generate a professional customer-service reply of 100–200 characters with these requirements: 1. Empathize with the customer first, especially for negative sentiment. 2. Explain the solution clearly. 3. Provide concrete action steps. 4. End by expressing thanks. Output only the reply content without an explanation.""" client = OpenClaw(api_key=self.api_key) response = client.chat.completions.create( model=self.model, messages=[{"role": "user", "content": prompt}], temperature=0.7, max_tokens=500 ) return response.choices[0].message.content ``` The displayed snippet is an English rendering of the original Chinese prompt while preserving its code structure and behavior. ### Technical Analysis The caller-controlled `industry`, `scenario`, `customer_message`, and `tone` values are interpolated directly into the same user-role message that contains the application's behavioral instructions. There is no robust separation between trusted instructions and untrusted customer content. A customer can therefore submit instruction-like text that tells the model to disregard the surrounding task, change its role, omit required safeguards, or produce unrelated content. Language-model delimiters alone are not a complete security boundary, but the current implementation does not even delimit or explicitly identify these fields as untrusted data. The generated content is returned without schema validation, policy checks, output filtering, or mandatory human approval. This makes downstream automation particularly vulnerab ...[truncated 1373 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Put immutable application policy in a higher-priority system message rather than combining it with customer-controlled text. 2. Clearly label and delimit all untrusted fields, explicitly instructing the model to treat their contents solely as data. 3. Validate `industry`, `scenario`, and `tone` against strict allowlists and enforce reasonable length limits. 4. Treat customer messages as untrusted even after escaping or delimiting them; prompt formatting alone cannot guarantee isolation. 5. Require structured model output that conforms to a validated schema. 6. Apply post-generation policy checks for prohibited claims, unsafe advice, unexpected formats, and instruction leakage. 7. Require human approval before sending generated responses in sensitive industries such as healthcare and finance. 8. Avoid granting the model tools or privileges that are unnecessary for reply generation. 9. Log detected injection attempts without retaining unnecessary personal or sensitive customer data. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (3)

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
The file title, feature descriptions, examples, pricing, and support channels are all presented in Chinese, and there is no indication that users may choose another language or that the skill is intentionally limited to a China-specific context. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The script sends raw customer message content to an external LLM API, which may include personal, financial, medical, or other sensitive information depending on the selected industry. There is no explicit notice, consent flow, masking, or minimization before transmission, so users may unknowingly disclose regulated or confidential data to a third party.

Natural-Language Policy Violations

Low
Confidence
89% confidence
Finding
User-facing descriptions, prompts, CLI help text, and generated-instruction language are all fixed in Chinese, with no option for users to select another language or explicitly opt into this locale. This can violate language/locale policy when a skill imposes a specific language by default without choice.

Static analysis

No suspicious patterns detected.