Back to skill

Security audit

Whatsapp Diagnostics

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a normal WhatsApp troubleshooting guide, but its health checks can automatically use live AI-provider API keys and send them to external endpoints without an explicit warning or opt-in.

Install only if you are comfortable with a diagnostic skill that may run gateway commands and validate provider credentials. Before using the quick health-check script, review or edit it so external API-key checks are explicit, and prefer test or scoped keys where possible.

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

Warning
Location
SKILL.md:88
Finding

API Credentials Exposed Through Process Command-Line Arguments

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 88–101 and 137–154
Vulnerability Type: API credential exposure through shell-expanded command-line arguments
Risk Level: Medium

Vulnerable Code

bash
# For Anthropic:
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

# For OpenAI:
curl -s -o /dev/null -w "%{http_code}" \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  https://api.openai.com/v1/models

# For Google:
curl -s -o /dev/null -w "%{http_code}" \
  "https://generativelanguage.googleapis.com/v1beta/models?key=$GOOGLE_API_KEY"

The embedded health-check script repeats the same unsafe pattern:

bash
STATUS=$(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 2>/dev/null)

STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
  -H "Authorization: Bearer ${OPENAI_API_KEY}" \
  https://api.openai.com/v1/models 2>/dev/null)

STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
  "https://generativelanguage.googleapis.com/v1beta/models?key=${GOOGLE_API_KEY}" 2>/dev/null)

Technical Analysis

The shell expands each environment variable before starting curl. The resulting API credential becomes part of the process argument vector, either in a header argument or, for Google, directly in the request URL. Depending on operating-system process visibility and local security policy, another local user, privileged monitoring agent, diagnostic collector, or compromised process may observe these arguments while the command runs.

Embedding the Google API key in the query string introduces additional exposure risk because URLs are more likely than headers to be recorded by proxies, telemetry systems, debugging tools, or request logs.

No hardcoded credentials were found, and the requests target official HTTPS provider endp ...[truncated 1324 chars]

Remediation
View remediation

Remediation Suggestions

  1. Do not expand API credentials directly into command-line arguments.
  2. Supply sensitive headers through a temporary curl configuration file created with restrictive permissions such as mode 0600, and securely remove it immediately after use.
  3. Prefer provider-supported credential helpers, protected configuration files, or another mechanism that does not expose secrets in the process argument vector.
  4. Avoid placing credentials in URL query strings where the provider offers a secure header-based authentication mechanism.
  5. Disable unnecessary command tracing and ensure diagnostic tooling does not log secret-bearing configuration.
  6. Apply provider-side least privilege, quota limits, source restrictions where supported, short credential lifetimes, and routine key rotation.
  7. If these commands have already been used on a system where process arguments or URLs are collected, review relevant telemetry and logs and rotate potentially exposed keys.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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 (6)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill instructs operators to validate API keys by making authenticated requests to third-party endpoints, but it does not explicitly warn that this transmits live credentials off-host. While this is a common troubleshooting pattern, it creates avoidable secret exposure and can violate least-privilege or incident-response expectations if users run it in sensitive environments.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

This command sends the Anthropic API key in an authenticated HTTPS request to an external service. Although the destination is legitimate, the security issue is the undocumented external transmission of a live secret during diagnostics, which may be inappropriate in locked-down or compromised environments.

Content

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

md
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

# For OpenAI:
curl -s -o /dev/null -w "%{http_code}" \

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

This command transmits the OpenAI API key to an external endpoint as part of a diagnostic check. Even though it is sent to the expected provider, it still exercises a production credential and may create unnecessary exposure, auditing noise, or policy violations if performed without clear disclosure.

Content

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

md
# For OpenAI:
curl -s -o /dev/null -w "%{http_code}" \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  https://api.openai.com/v1/models

# For Google:
curl -s -o /dev/null -w "%{http_code}" \

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The quick health-check script automatically detects provider API keys in environment variables and performs outbound authenticated curl requests without an explicit disclosure prompt. This increases risk because a single copy-paste diagnostic script can cause unreviewed credential use and external transmission, especially in environments where operators may not realize secrets are being exercised.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
91% confidence
Finding

The health-check script automatically uses any detected Anthropic API key from the environment to make an external authenticated request. Automatic secret use is riskier than the manual one-off command because operators may run the script without realizing that live credentials will be transmitted.

Content

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

md
STATUS=$(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 2>/dev/null)

elif [ -n "${OPENAI_API_KEY:-}" ]; then
  PROVIDER="OpenAI"

External Transmission

Medium
Category
Data Exfiltration
Confidence
91% confidence
Finding

The script sends an OpenAI API key from the environment to an external service during a health check, without an explicit warning in the workflow. In a diagnostic skill, this makes the issue more dangerous because users are likely to copy and run the script quickly during an outage, increasing the chance of unreviewed secret disclosure.

Content

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

md
PROVIDER="OpenAI"
  STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
    -H "Authorization: Bearer ${OPENAI_API_KEY}" \
    https://api.openai.com/v1/models 2>/dev/null)

elif [ -n "${GOOGLE_API_KEY:-}" ]; then
  PROVIDER="Google"