Back to skill

Security audit

Pura

Security checks for vulnerabilities and agentic risk

Overview

This skill is a real LLM-routing integration, but it can route prompts, account data, and bearer credentials to a configurable external gateway without enough safeguards or warning.

Review this before installing in any environment that handles secrets, private code, regulated data, or funded API balances. Use only a trusted HTTPS gateway, avoid setting PURA_GATEWAY_URL unless you control the endpoint, rotate any key printed into logs or transcripts, and treat report, income, and wallet commands as account-administrative actions.

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
scripts/report.sh:6
Finding

Unvalidated Custom Gateway Can Receive Bearer Credentials and Prompt Data

Content
View full analysis
/dev/null || \ curl -s "${GATEWAY_URL}/api/report" \ -H "Authorization: Bearer ${PURA_API_KEY}" echo "" echo "=== INCOME STATEMENT ===" curl -s "${GATEWAY_URL}/api/income" \ -H "Authorization: Bearer ${PURA_API_KEY}" | python3 -m json.tool 2>/dev/null || \ curl -s "${GATEWAY_URL}/api/income" \ -H "Authorization: Bearer ${PURA_API_KEY}" ``` From `scripts/verify.sh`: ```bash GATEWAY_URL="${PURA_GATEWAY_URL:-https://api.pura.xyz}" # 1. Ensure we have an API key if [[ -z "${PURA_API_KEY:-}" ]]; then echo "No PURA_API_KEY set. Generating one..." RESPONSE=$(curl -s -X POST "${GATEWAY_URL}/api/keys" \ -H "Content-Type: application/json" \ -d '{"label":"openclaw-verify"}') PURA_API_KEY=$(echo "$RESPONSE" | grep -o '"key":"[^"]*"' | head -1 | cut -d'"' -f4) if [[ -z "$PURA_API_KEY" ]]; then echo "✗ Failed to generate key. Response: $RESPONSE" exit 1 fi echo "✓ Generated key: ${PURA_API_KEY:0:13}..." echo "" echo " export PURA_API_KEY=\"$PURA_API_KEY\"" echo "" fi # 2. Health check echo "Checking gateway health..." HEALTH=$(curl -s "${GATEWAY_URL}/api/health" 2>/dev/null || echo '{"status":"error"}') if echo "$HEALTH" | grep -q '"ok"'; then echo "✓ Gateway is operational" else echo "✗ Gateway health check failed: $HEALTH" exit 1 fi # 3. Send a real inference request echo "" echo "Sending inference request..." RESPONSE=$(curl -s -w "\ ...[truncated 2236 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/setup.sh:34
Finding

Generated API Key Is Printed in Full to Standard Output

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (31)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill claims automatic model selection but mainly provides examples for live external API operations, testing, and direct remote use. When declared purpose and actual operational behaviors diverge, reviews, approval decisions, and sandbox policies can be bypassed or weakened.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill claims automatic model selection but mainly provides examples for live external API operations, testing, and direct remote use. When declared purpose and actual operational behaviors diverge, reviews, approval decisions, and sandbox policies can be bypassed or weakened.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The skill claims automatic model selection but mainly provides examples for live external API operations, testing, and direct remote use. When declared purpose and actual operational behaviors diverge, reviews, approval decisions, and sandbox policies can be bypassed or weakened.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

Get an API key:

bash
curl -s -X POST https://api.pura.xyz/api/keys \
  -H "Content-Type: application/json" \
  -d '{"label":"my-agent"}' | python3 -m json.tool

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

bash
# 24h spend breakdown
curl -s https://api.pura.xyz/api/report \
  -H "Authorization: Bearer $PURA_API_KEY" | python3 -m json.tool

# Formatted income statement

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

-H "Authorization: Bearer $PURA_API_KEY" | python3 -m json.tool

Formatted income statement

curl -s https://api.pura.xyz/api/income
-H "Authorization: Bearer $PURA_API_KEY" | python3 -m json.tool

text

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

bash
# Get a funding invoice
curl -s -X POST https://api.pura.xyz/api/wallet/fund \
  -H "Authorization: Bearer $PURA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"amount": 10000}' | python3 -m json.tool

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

-d '{"amount": 10000}' | python3 -m json.tool

Check balance

curl -s https://api.pura.xyz/api/wallet/balance
-H "Authorization: Bearer $PURA_API_KEY" | python3 -m json.tool

text

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/report.sh (reported line 14)May include surrounding context.

sh
fi

echo "=== COST REPORT (24h) ==="
curl -s "${GATEWAY_URL}/api/report" \
  -H "Authorization: Bearer ${PURA_API_KEY}" | python3 -m json.tool 2>/dev/null || \
curl -s "${GATEWAY_URL}/api/report" \
  -H "Authorization: Bearer ${PURA_API_KEY}"

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/report.sh (reported line 16)May include surrounding context.

sh
echo "=== COST REPORT (24h) ==="
curl -s "${GATEWAY_URL}/api/report" \
  -H "Authorization: Bearer ${PURA_API_KEY}" | python3 -m json.tool 2>/dev/null || \
curl -s "${GATEWAY_URL}/api/report" \
  -H "Authorization: Bearer ${PURA_API_KEY}"

echo ""

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill advertises and demonstrates shell/network-capable usage but does not declare any tool scope or allowed-tools restrictions. In an agent ecosystem, undeclared shell/network capability increases the chance that the skill can trigger external requests or command execution beyond what a user expects, reducing auditability and policy enforcement.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
83% confidence
Finding

The skill references a remote API endpoint for key creation, establishing dependence on an external service outside the OpenClaw runtime. Even as documentation, this expands the attack surface and trust boundary because operators are encouraged to transmit data and rely on remote account infrastructure.

Content

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

Get an API key:

bash
curl -s -X POST https://api.pura.xyz/api/keys \
  -H "Content-Type: application/json" \
  -d '{"label":"my-agent"}' | python3 -m json.tool

External Transmission

Medium
Category
Data Exfiltration
Confidence
83% confidence
Finding

The skill references a remote API endpoint for key creation, establishing dependence on an external service outside the OpenClaw runtime. Even as documentation, this expands the attack surface and trust boundary because operators are encouraged to transmit data and rely on remote account infrastructure.

Content

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

Get an API key:

bash
curl -s -X POST https://api.pura.xyz/api/keys \
  -H "Content-Type: application/json" \
  -d '{"label":"my-agent"}' | python3 -m json.tool

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill routes prompts and conversation content to Pura, which may then forward them to multiple downstream providers, but this data-sharing risk is not prominently warned where setup/use is introduced. This is dangerous because sensitive prompts, source code, secrets, or regulated data may leave the local agent boundary without informed consent.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
94% confidence
Finding

Configuring the OpenAI-compatible client with Pura's base_url redirects all model traffic to a third-party endpoint. This is dangerous because users may think they are only changing cost optimization settings, while in reality all prompts, context, and responses transit an additional service layer.

Content

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

md
import os

client = OpenAI(
    base_url="https://api.pura.xyz/v1",
    api_key=os.environ["PURA_API_KEY"]
)

External Transmission

Medium
Category
Data Exfiltration
Confidence
94% confidence
Finding

The chat completions curl example sends user content to the third-party gateway. In this skill's context, that means operational use necessarily exports conversation data to external infrastructure and potentially multiple underlying model vendors.

Content

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

Or with curl:

bash
curl -s -X POST https://api.pura.xyz/v1/chat/completions \
  -H "Authorization: Bearer $PURA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"messages": [{"role": "user", "content": "Hello"}], "stream": false}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
94% confidence
Finding

The chat completions curl example sends user content to the third-party gateway. In this skill's context, that means operational use necessarily exports conversation data to external infrastructure and potentially multiple underlying model vendors.

Content

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

Or with curl:

bash
curl -s -X POST https://api.pura.xyz/v1/chat/completions \
  -H "Authorization: Bearer $PURA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"messages": [{"role": "user", "content": "Hello"}], "stream": false}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
87% confidence
Finding

The spend-report endpoint transmits authenticated account requests to an external analytics/reporting API. While lower risk than inference data, it still exposes usage and billing metadata that may be commercially sensitive.

Content

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

bash
# 24h spend breakdown
curl -s https://api.pura.xyz/api/report \
  -H "Authorization: Bearer $PURA_API_KEY" | python3 -m json.tool

# Formatted income statement

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

The income endpoint accesses financial/accounting data from the external service. Exposing or normalizing these calls inside a general-purpose routing skill broadens the scope from inference to financial metadata handling.

Content

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

-H "Authorization: Bearer $PURA_API_KEY" | python3 -m json.tool

Formatted income statement

curl -s https://api.pura.xyz/api/income
-H "Authorization: Bearer $PURA_API_KEY" | python3 -m json.tool

text

External Transmission

Medium
Category
Data Exfiltration
Confidence
92% confidence
Finding

The wallet funding endpoint performs an authenticated external financial action. In context, this is more dangerous than ordinary telemetry because it can initiate payment-related workflows and has clear monetary consequences.

Content

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

bash
# Get a funding invoice
curl -s -X POST https://api.pura.xyz/api/wallet/fund \
  -H "Authorization: Bearer $PURA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"amount": 10000}' | python3 -m json.tool

External Transmission

Medium
Category
Data Exfiltration
Confidence
92% confidence
Finding

The wallet funding endpoint performs an authenticated external financial action. In context, this is more dangerous than ordinary telemetry because it can initiate payment-related workflows and has clear monetary consequences.

Content

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

bash
# Get a funding invoice
curl -s -X POST https://api.pura.xyz/api/wallet/fund \
  -H "Authorization: Bearer $PURA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"amount": 10000}' | python3 -m json.tool

External Transmission

Medium
Category
Data Exfiltration
Confidence
86% confidence
Finding

The wallet balance endpoint reveals billing/balance information via an external authenticated call. That is sensitive operational data that may not be expected in a skill positioned primarily as an LLM router.

Content

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

-d '{"amount": 10000}' | python3 -m json.tool

Check balance

curl -s https://api.pura.xyz/api/wallet/balance
-H "Authorization: Bearer $PURA_API_KEY" | python3 -m json.tool

text

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

The direct model-routing example again sends prompt data to a third-party endpoint, but here it also encourages bypassing automatic selection to target a specific vendor/model. That combination increases risk of unintended data disclosure patterns and cost escalation relative to the advertised behavior.

Content

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

bash
# Force GPT-4o
curl -s -X POST https://api.pura.xyz/v1/chat/completions \
  -H "Authorization: Bearer $PURA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "gpt-4o", "messages": [{"role":"user","content":"Hello"}], "stream": false}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

The direct model-routing example again sends prompt data to a third-party endpoint, but here it also encourages bypassing automatic selection to target a specific vendor/model. That combination increases risk of unintended data disclosure patterns and cost escalation relative to the advertised behavior.

Content

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

bash
# Force GPT-4o
curl -s -X POST https://api.pura.xyz/v1/chat/completions \
  -H "Authorization: Bearer $PURA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "gpt-4o", "messages": [{"role":"user","content":"Hello"}], "stream": false}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/setup.sh (reported line 23)May include surrounding context.

sh
fi

echo "Generating Pura API key..."
RESPONSE=$(curl -s -X POST "${GATEWAY_URL}/api/keys" \
  -H "Content-Type: application/json" \
  -d '{"label":"openclaw-agent"}')

Static analysis

No suspicious patterns detected.