Back to skill

Security audit

Client Data Management

Security checks for vulnerabilities and agentic risk

Overview

This skill is coherent, but it should be reviewed because it manages sensitive accounting client data with broad export/delete powers and weakly specified local storage safeguards.

Install only in an environment where OpenClaw runs under a dedicated account with strict filesystem permissions, enforced role checks, logged approvals for GDPR export/delete and all-client export, protected backups and exports, and administrator-managed dependency installation. Review whether the plaintext index is acceptable for your privacy obligations.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:19
Finding
Sensitive client-data directory is created without explicit permission hardening<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 19-21 **Vulnerability Type**: Missing filesystem access-control hardening **Risk Level**: Medium ### Vulnerable Code ```bash export OPENCLAW_DATA_DIR="/data" which jq || sudo apt install jq mkdir -p $OPENCLAW_DATA_DIR/clients ``` ### Technical Analysis The setup creates the directory used to store client profiles, tax identifiers, contact information, financial records, GDPR records, and audit logs without explicitly setting restrictive ownership or permissions. The effective directory permissions therefore depend on the invoking user's current `umask`, the permissions of the parent directory, and existing filesystem state. If the environment has a permissive `umask` or `/data` is shared among users or services, unauthorized local accounts may be able to traverse or read the client-data hierarchy. The command also expands `OPENCLAW_DATA_DIR` without quotes or an end-of-options delimiter. Although the example assigns the fixed value `/data`, an externally supplied value containing whitespace or shell glob characters could cause unintended path handling if the setup command is reused without the preceding assignment. The use of `sudo apt install jq` additionally elevates package installation privileges during setup. This is not itself an escalation vulnerability because it requires an already authorized `sudo` user, but dependency installation should be separated from data-directory initialization. ### Attack Path 1. An operator initializes the skill on a multi-user system while using a permissive `umask`, or uses an existing shared `/data` directory. 2. `mkdir -p` creates `/data/clients` without an explicit restrictive mode. 3. A local low-privilege user or compromised service account examines the permissions on `/data` and `/data/clients`. 4. If directory traversal and read permissions are available, the attacker enumerates client subdirectories and reads JSON records, exports, met ...[truncated 1098 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Create the sensitive directory with an explicit restrictive mode and quote the path: ```bash : "${OPENCLAW_DATA_DIR:=/data}" case "$OPENCLAW_DATA_DIR" in /*) ;; *) printf '%s\n' "OPENCLAW_DATA_DIR must be an absolute path" >&2; exit 1 ;; esac umask 077 install -d -m 0700 -- "$OPENCLAW_DATA_DIR/clients" ``` - Verify that the destination is not a symbolic link and is owned by the intended OpenClaw service account. - Create client JSON files with mode `0600` and subdirectories with mode `0700`. - Run OpenClaw under a dedicated, unprivileged service account rather than a shared interactive account. - Keep dependency installation separate from runtime initialization. Administrators should install `jq` through an approved package-management process. - Add startup checks that reject group-readable or world-readable data directories and report incorrect ownership. - Apply similarly restrictive controls to export, backup, GDPR-export, and audit-log directories. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:200
Finding
Global client index intentionally stores identifying client metadata in plaintext<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 200 and 372-386 **Vulnerability Type**: Plaintext storage of sensitive identifying metadata **Risk Level**: Medium ### Vulnerable Code ```yaml system_files: - /data/clients/_index.json # Global client index (unencrypted metadata) - /data/clients/_audit-log.json # All access/change events - /data/clients/_schema-version.json # Schema version for migrations - /data/backups/ # Encrypted backup directory ``` ```yaml Encryption: algorithm: "AES-256-GCM" key_management: "OpenClaw key vault" encrypted_fields: - bank_account_numbers - contact_personal_data - gdpr_consent_records - financial_amounts_in_history unencrypted_fields: - afm (required for indexing) - client_name (required for search) - status - sector key_rotation: "annual" backup_encryption: "separate key" ``` ### Technical Analysis The design explicitly stores the global client index and several identifying fields without encryption. The combination of a client's name, Greek tax identifier (AFM), business status, and sector is sensitive portfolio information. Centralizing those values in one plaintext index increases exposure because an attacker can enumerate the firm's client base by reading a single file, without decrypting individual client records. The stated requirement that AFMs and names remain plaintext for indexing and search is not an absolute technical requirement. Exact-match searches can use keyed deterministic tokens, while names and display values can remain encrypted and be decrypted only after authorization. If plaintext indexing remains necessary, strict access control, minimization, and monitoring are required. Encryption at rest does not replace authorization and cannot protect data after a legitimately authorized process decrypts it. Nevertheless, leaving the index unencrypted weakens protect ...[truncated 1501 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Encrypt the global index at rest with an authenticated encryption scheme and keys held outside the data directory. - Minimize the index to fields strictly required for lookup. Avoid storing status, sector, or display names when they are not necessary. - For exact AFM lookup, store a keyed HMAC of a normalized AFM instead of the plaintext identifier. - Where name searching is required, consider a protected search index or decrypt authorized records within the trusted process. Document any unavoidable leakage from deterministic or searchable encryption. - Restrict the index to the dedicated OpenClaw account with file mode `0600` and parent-directory mode `0700`. - Ensure backups, snapshots, temporary files, exports, and migration copies preserve encryption and restrictive permissions. - Log access to the index, detect bulk reads, and periodically verify ownership and permissions. - Document the privacy rationale and retention period for every index field and remove stale records when legally permitted. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (7)

Missing User Warnings

High
Confidence
97% confidence
Finding
The workflow explicitly expects decryption of encrypted fields and generation of a complete data export containing highly sensitive client data, yet the evaluation criteria do not require identity verification, authorization checks beyond a vague role check, data minimization, secure delivery, or explicit handling safeguards. In a client-data management context holding tax, contact, compliance, and audit information, this could enable unauthorized bulk disclosure of regulated personal and financial data if triggered by an attacker or misused by an overprivileged user.

Chaining Abuse

High
Category
Tool Misuse
Content
```bash
export OPENCLAW_DATA_DIR="/data"
which jq || sudo apt install jq
mkdir -p $OPENCLAW_DATA_DIR/clients
```
Confidence
75% confidence
Finding
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Natural-Language Policy Violations

Medium
Confidence
88% confidence
Finding
The file repeatedly specifies Greek-only business data conventions, tax offices, legal forms, phone formats, and retention context in natural-language prompts and expected behavior. Because the file does not indicate that this skill is explicitly region-scoped or that users can opt into this locale, it appears to impose a specific locale by default.

Ae4

Medium
Category
analysis-evasion
Confidence
92% confidence
Finding
The skill contains multiple mojibake and mixed-script strings in sensitive identity fields such as names, legal forms, and tax-office labels. In a client-data management skill, malformed Unicode can cause identifier mismatches, failed searches, incorrect audit trails, and deceptive display of client records, especially where AFM-linked records and GDPR actions depend on exact text handling.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
```bash
export OPENCLAW_DATA_DIR="/data"
which jq || sudo apt install jq
mkdir -p $OPENCLAW_DATA_DIR/clients
```
Confidence
88% confidence
Finding
The setup instructions tell operators to run `sudo apt install jq`, introducing privileged execution from within a skill document. Even though `jq` is a common package, embedding sudo-based installation guidance in an agent skill normalizes privilege escalation and could lead users or automated environments to perform unnecessary root actions.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
This section documents highly destructive and privacy-sensitive operations such as GDPR export, GDPR delete with retention override, bulk export, backup/restore, and audit-log access without prominent warnings, approval requirements, or operator-safety guidance. In an instruction-following agent context, this increases the chance that an assistant executes irreversible deletion or mass data disclosure commands from ambiguous user prompts.

Natural-Language Policy Violations

Low
Confidence
95% confidence
Finding
The phrase "English interface" specifies a language constraint in the skill's natural-language behavior. The file does not indicate that users may choose another language or that English is optional, which can violate organizational language/locale choice policies.