Back to skill

Security audit

Heleni WhatsApp

Security checks for vulnerabilities and agentic risk

Overview

This skill is not overtly malicious, but it needs review because it persistently stores WhatsApp conversation data and includes admin and credential troubleshooting steps beyond simple local memory.

Review before installing. Use this only if you are comfortable with WhatsApp names, numbers, message snippets, and conversation summaries being stored in local workspace files and possibly backed up. Before production use, add retention and deletion rules, redact sensitive message content, treat recalled memory as untrusted data, replace shell-sourced .context loading with safe parsing, allowlist memory filenames, and gate gateway/API-key troubleshooting behind explicit admin approval.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
  • 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 (3)

T02 · Agent Memory Poisoning

Error
Location
SKILL.md:74
Finding

Persistent Prompt Injection Through Untrusted Conversation Memory

Content
View full analysis
/ # Write to memory/whatsapp/dms//context.md: # Name, role, last interaction date, what was discussed, current status ``` **No exceptions. Every DM = a context file.** ``` The stored data is subsequently loaded into the agent's context: ```markdown ### Before Responding — Inject Context 1. Extract JID or phone from inbound metadata 2. If group: run wa_context "group" "$JID" 10 If DM: run wa_context "dm" "$PHONE" 10 3. Use context to inform your response 4. After responding: log anything worth remembering ``` ### Technical Analysis The skill requires inbound WhatsApp interactions to be persisted and later used to inform responses. It does not establish a trust boundary between conversation data and agent instructions, nor does it require sanitization, structured summarization, provenance labels, or filtering of instruction-like content. An external sender can therefore submit text designed to look like a persistent instruction, such as a direction to ignore recipient-validation rules or disclose information in later sessions. If that text is copied or summarized into `context.md`, it survives session restarts. The instruction to read and use the context before responding creates a pe ...[truncated 1454 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:132
Finding

Arbitrary File Write Through Unvalidated Memory Filename

Content
View full analysis
> "$FILE" } ``` ### Technical Analysis Although the comment documents several expected filenames, `FILE_NAME` is accepted directly from the fourth positional argument and concatenated into a filesystem path. No allowlist, basename restriction, canonicalization, or containment check is performed. Shell quoting prevents shell metacharacter expansion but does not prevent filesystem traversal. A value containing `../` components can escape the selected group or DM directory. An absolute path is not directly honored when prefixed by the base path, but traversal components can still reach other locations writable by the agent account. The function also creates parent directories and the target file before appending content, increasing the range of writable targets. ### Attack Path 1. An attacker influences a task, tool argument, or agent-generated invocation of `wa_log`. 2. The fourth argument is supplied as a traversal path, such as `../../../../target-file`. 3. The function concatenates the traversal string with the WhatsApp memory directory. 4. `mkdir -p` creates any missing parent directories reachable through the resulting path. 5. `touch` creates the selected file if it does not exist. ...[truncated 925 chars]
Remediation
View remediation
&2; return 1 ;; esac ``` 2. Enforce file choices according to conversation type so group and DM records cannot write unsupported files. 3. Canonicalize the intended directory and target path using a safe implementation, then verify that the target remains a direct child of the expected conversation directory. 4. Reject values containing path separators, `..`, control characters, newlines, or unexpected extensions. 5. Validate `TYPE` explicitly instead of treating every value other than `group` as `dm`. 6. Apply similarly strict validation to conversation identifiers and avoid relying only on replacing `@`, `.`, and `+`. 7. Run the skill under a dedicated least-privileged account whose write access is restricted to the intended memory directory. 8. Add tests covering traversal strings, absolute paths, symbolic links, invalid types, and filenames containing control characters. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:14
Finding

Arbitrary Shell Execution Through Sourced Context File

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (9)

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The document claims that all operations are file-based and require no reasoning, but later includes network access and platform control commands. This mismatch can mislead operators and safety systems into granting broader trust or permissions than warranted, making the later higher-risk instructions more likely to be executed without scrutiny.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill mandates persistent logging of significant WhatsApp exchanges, including context about people, tasks, and statuses, without any user-facing notice, consent flow, retention limit, or minimization guidance beyond a few examples. This creates privacy and compliance risk because sensitive interpersonal and operational data may be stored indefinitely in local files.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The mandatory per-DM memory rule instructs the agent to persist conversation content and personal details after every significant exchange. Because the requirement is broad and mandatory, it increases the likelihood of collecting sensitive user data beyond what is strictly necessary, especially in direct messages where expectations of privacy are higher.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The unanswered-message tracker stores names, phone numbers, chat identifiers, timestamps, and message bodies in a persistent JSON file without warning about privacy sensitivity or safeguards. This centralizes personally identifiable information and message content in a way that could expose users if the workspace, backups, or logs are accessed by unauthorized parties.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The incoming-message tracking logic persists sender identity, phone number, and message body into a durable inbox file. This is dangerous because it accumulates personal communications in a structured repository that may be copied, searched, or backed up, amplifying the impact of unauthorized access or accidental disclosure.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill’s stated purpose is local WhatsApp memory and unanswered-message tracking, but the troubleshooting section expands into infrastructure control (openclaw gateway restart/logs) and API diagnostics. This broadens the agent’s operational scope beyond simple file-based processing and could cause an agent using the skill to manipulate platform services or probe unrelated systems without clear authorization boundaries.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The curl command performs an external network request to Anthropic using an API key, which is not necessary for a file-based WhatsApp memory skill. Even though the response is only an HTTP code, this still instructs the agent to transmit credentials and perform off-scope network activity, increasing the chance of credential misuse or unintended external communication.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
97% confidence
Finding

The explicit external transmission to https://api.anthropic.com/v1/models is off-scope for a local WhatsApp memory skill and uses an API key in the request. In context, this is more dangerous because the skill otherwise presents itself as local and file-based, so external egress may be unexpected and less carefully controlled.

Content

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

curl -s -o /dev/null -w "%{http_code}"
-H "x-api-key: $ANTHROPIC_API_KEY"
-H "anthropic-version: 2023-06-01"
https://api.anthropic.com/v1/models

200 = OK | 401 = invalid key | 402 = billing error

text

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The troubleshooting section tells the agent to use an API key in a curl command but does not clearly warn about secret handling, shell history, logging, or least-privilege execution. In an agentic environment, normalizing direct secret use in ad hoc commands can increase the chance of credential exposure or unsafe reuse.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.