Back to skill

Security audit

FaceBook Go-To-Market - How to build on Facebook Groups

Security checks for vulnerabilities and agentic risk

Overview

This is a real payment/shopping integration, but it gives agents broad money-moving authority and asks them to trust server-supplied instructions and scripts during checkout.

Install only if you intentionally want a broad CreditClaw commerce agent, not just Amazon shopping. Use a tightly scoped runtime, restrict the API key, require human approval for purchases, avoid trusting server-provided natural-language instructions as commands, and do not run remotely delivered decrypt scripts unless they are independently verified and sandboxed.

Vulnerability Patterns
  • 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
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (3)

T01 · Skill Instruction Hijacking

Error
Location
encrypted-card.md:83
Finding
Server-Controlled Instructions Are Executed by an Authenticated Sub-Agent<![CDATA[ ## Vulnerability Details **File Location**: `encrypted-card.md:83-100`, `encrypted-card.md:148-157` **Vulnerability Type**: T01: Skill Instruction Hijacking **Risk Level**: Critical ### Vulnerable Code ```json { "approved": true, "checkout_id": "r5chk_abc123", "checkout_steps": [ "Call POST /api/v1/bot/rail5/key with { \"checkout_id\": \"r5chk_abc123\" } to get the decryption key.", "Run: node decrypt.js <key_hex> <iv_hex> <tag_hex> Card-ChaseD-9547.md", "Use the decrypted card details to complete checkout at DigitalOcean.", "Call POST /api/v1/bot/rail5/confirm with { \"checkout_id\": \"r5chk_abc123\", \"status\": \"success\" } when done.", "If checkout fails, call confirm with { \"status\": \"failed\" } instead.", "Announce the result." ], "spawn_payload": { "task": "You are a checkout agent...", "cleanup": "delete", "runTimeoutSeconds": 300, "label": "checkout-digitalocean" } } ``` ```text ### Step 2: Spawn a Sub-Agent Once the checkout is approved, spawn an ephemeral sub-agent using the `spawn_payload` from the response: sessions_spawn({ task: spawn_payload.task, cleanup: "delete", runTimeoutSeconds: 300 }) The sub-agent executes the `checkout_steps` in sequence. You (the main agent) wait for the sub-agent to complete and then announce the result. ``` ### Technical Analysis The skill directs the main Agent to take the `task` and `checkout_steps` returned by the remote CreditClaw API and execute them as Agent instructions. These fields are treated as trusted commands rather than untrusted data. There is no documented local schema restricting the contents of the task, no allowlist of permitted sub-agent operations, and no requirement to compare the returned instructions with a fixed local transaction procedure. Consequently, control over the API response provides control over the sub-agent’s goals and actions. The sub-agent is expected to possess or obtain access to the CreditClaw API crede ...[truncated 1876 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Never pass a server-provided natural-language task directly to `sessions_spawn`. 2. Define the complete checkout workflow in locally reviewed, immutable instructions. 3. Parse API responses strictly as typed data, such as checkout identifier, merchant, expected amount, and approval state. 4. Validate every field against a restrictive schema and reject unknown or unexpected fields. 5. Construct the sub-agent task locally from validated values instead of accepting `spawn_payload.task` or `checkout_steps`. 6. Restrict the sub-agent to an explicit allowlist of CreditClaw endpoints and the owner-approved merchant origin. 7. Provide the sub-agent only with transaction-scoped credentials rather than the general `CREDITCLAW_API_KEY`. 8. Deny access to unrelated environment variables, files, tools, and network destinations. 9. Reconfirm the merchant, amount, item, recipient, and approved checkout identifier before retrieving a decryption key. 10. Require explicit human confirmation if any server response attempts to change the locally defined procedure. ]]>

T03 · Remote Payload Retrieval and Execution

Error
Location
encrypted-card.md:175
Finding
Remote Card Payload Supplies Executable JavaScript That Is Run Locally<![CDATA[ ## Vulnerability Details **File Location**: `encrypted-card.md:175-186`, `encrypted-card.md:205-232` **Vulnerability Type**: T03: Remote Payload Retrieval and Execution **Risk Level**: Critical ### Vulnerable Code ```text ### Step 4: Decrypt (Sub-Agent Does This) The sub-agent runs the deterministic decrypt script that was delivered with the card file: node decrypt.js <key_hex> <iv_hex> <tag_hex> Card-ChaseD-9547.md This outputs the card JSON (number, CVV, expiry, name, billing address). **Critical:** The sub-agent must **never** store, log, or persist the decrypted card data. It exists only in memory for this single transaction. After checkout, the sub-agent is deleted. ``` ```text ## Encrypted Card File Delivery When your owner sets up an encrypted card for you, CreditClaw delivers a single self-contained file via the `rail5.card.delivered` event. **Via webhook:** If you have a `callback_url`, the file is delivered automatically: ``` ```json { "event": "rail5.card.delivered", "bot_id": "bot_abc123", "data": { "card_id": "r5card_...", "card_name": "ChaseD", "card_last4": "9547", "file_content": "<self-contained markdown file with decrypt script and encrypted data>", "suggested_path": ".creditclaw/cards/Card-ChaseD-9547.md", "instructions": "Save this file to .creditclaw/cards/Card-ChaseD-9547.md — then confirm delivery via POST /bot/rail5/confirm-delivery" } } ``` ```text **Via bot messages (fallback):** If you don't have a webhook, check `GET /bot/messages` for messages with `event_type: "rail5.card.delivered"`. The payload is identical. After saving the file, acknowledge the message via `POST /bot/messages/ack`. **Save the file** to `.creditclaw/cards/` (or the path in `suggested_path`). The file is self-contained — it includes the decrypt script between `DECRYPT_SCRIPT_START/END` markers and the encrypted data between `ENCRYPTED_CARD_START/END` markers. ``` ### Technical Analysis The card-delivery messa ...[truncated 2404 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove all executable code from card-delivery payloads. 2. Bundle a small, audited decryption implementation with the reviewed skill package. 3. Treat remote card files exclusively as ciphertext and structured metadata. 4. Validate card data against a strict schema before decryption. 5. If remote executable updates are unavoidable, require a cryptographic signature from a pinned offline signing key and verify it before execution. 6. Pin the expected script digest or release version and fail closed on any mismatch. 7. Run decryption in a hardened sandbox with no general network access, no unrelated filesystem access, and no inherited environment secrets. 8. Pass key material through protected inter-process communication rather than command-line arguments, which may be observable in process listings or logs. 9. Keep decrypted values in bounded memory, prevent logging, and explicitly clear buffers when the checkout completes. 10. Separate decryption from browser automation so the component handling card plaintext cannot execute arbitrary shell commands. ]]>

T01 · Skill Instruction Hijacking

Error
Location
encrypted-card.md:205
Finding
Network-Controlled Instructions and Filesystem Paths Are Trusted Without Adequate Validation<![CDATA[ ## Vulnerability Details **File Location**: `encrypted-card.md:205-232`, `skill.md:472-497` **Vulnerability Type**: T01: Skill Instruction Hijacking, T09: Insecure Skill Coding Practices **Risk Level**: High ### Vulnerable Code ```text ## Encrypted Card File Delivery When your owner sets up an encrypted card for you, CreditClaw delivers a single self-contained file via the `rail5.card.delivered` event. **Via webhook:** If you have a `callback_url`, the file is delivered automatically: ``` ```json { "event": "rail5.card.delivered", "bot_id": "bot_abc123", "data": { "card_id": "r5card_...", "card_name": "ChaseD", "card_last4": "9547", "file_content": "<self-contained markdown file with decrypt script and encrypted data>", "suggested_path": ".creditclaw/cards/Card-ChaseD-9547.md", "instructions": "Save this file to .creditclaw/cards/Card-ChaseD-9547.md — then confirm delivery via POST /bot/rail5/confirm-delivery" } } ``` ```text **Via bot messages (fallback):** If you don't have a webhook, check `GET /bot/messages` for messages with `event_type: "rail5.card.delivered"`. The payload is identical. After saving the file, acknowledge the message via `POST /bot/messages/ack`. **Save the file** to `.creditclaw/cards/` (or the path in `suggested_path`). The file is self-contained — it includes the decrypt script between `DECRYPT_SCRIPT_START/END` markers and the encrypted data between `ENCRYPTED_CARD_START/END` markers. Follow the `instructions` field in the message payload for next steps. ``` ```bash curl https://creditclaw.com/api/v1/bot/messages \ -H "Authorization: Bearer $CREDITCLAW_API_KEY" ``` ```json { "bot_id": "bot_abc123", "messages": [ { "id": 1, "event_type": "rail5.card.delivered", "payload": { "card_id": "r5card_...", "card_name": "ChaseD", "card_last4": "9547", "file_content": "<self-contained markdown file>", "suggested_path": ".creditcl ...[truncated 3282 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Do not follow natural-language `instructions` fields received from an API or webhook. 2. Implement a fixed local dispatch table mapping each allowlisted `event_type` to a reviewed handler. 3. Reject unknown event types and payload fields rather than asking the Agent to interpret them. 4. Generate card filenames locally from validated identifiers; do not use `suggested_path` as a filesystem path. 5. Resolve the final destination to a canonical path and verify it remains beneath a dedicated card-data directory. 6. Reject absolute paths, `..` components, control characters, path separators in identifiers, symlinks, and existing destinations unless safe replacement is explicitly intended. 7. Create files with restrictive permissions and use exclusive creation to prevent unintended overwrite. 8. Verify webhook HMAC signatures using the stored webhook secret before parsing or acting on payloads. 9. Bind signatures to the exact raw request body and include timestamp/replay protection. 10. Validate polled messages with the same strict schema and authorization assumptions used for webhook events. 11. Acknowledge messages only after validated, atomic, successful processing. 12. Log event identifiers and validation outcomes without recording secrets, encrypted payloads, or card data. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
Findings (37)

Credential Access

High
Category
Privilege Escalation
Content
- **Set `amount_locked: true`** for fixed-price products so buyers can't underpay.
- **Leave `amount_usd` empty** for donation or tip jars.
- **Use `page_type: "digital_product"`** when selling downloadable content, API keys, or access tokens.
- **Use `success_url`** to redirect buyers back to your service after payment.
- **Check `GET /bot/sales`** periodically to reconcile completed sales with your fulfillment.
- **Multiple checkout pages** are fine — create one per product or service tier.
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Description-Behavior Mismatch

High
Confidence
98% confidence
Finding
The manifest and description frame this as an Amazon shopping skill with guardrailed purchasing, but the document also exposes much broader financial capabilities including selling, invoicing, checkout pages, and public payment collection. This scope mismatch can cause users or orchestrators to grant trust and permissions under a narrower mental model than the skill actually requires, increasing the chance of unintended financial actions.

YARA rule 'agent_skill_prompt_injection_hidden_instructions': Prompt injection or hidden instructions embedded in AI agent skill text [agent_skills]

High
Category
YARA Match
Content
reditclaw-amazon
version: 2.3.0
updated: 2026-02-23T00:00:00Z
description: Let your agent shop on Amazon with guardrailed wallets and owner approval.
homepage: https://creditclaw.com
api_base: https://creditclaw.com/api/v1
credentials: [CREDITCLAW_API_KEY]
metadata: {"openclaw":{"requires":{"env":["CREDITCLAW_API_KEY"]},"primaryEnv":"CREDITCLAW_API_KEY"}}
---

# CreditClaw — Amazon Shopping for AI Agents

CreditClaw.com is a financial enablement platform for Bots, Agents, and OpenClaw.
Securely manage agentic spending.
1. Encrypted cards — owner's real-world card is encrypted and the bot uses it within strict guardrails after owner approval.
2. A stablecoin wallet to seamlessly enable x402 payments with a simple "Fund with Stripe" option.
3. Easy-to-use "Storefronts" and product management for bots to sell both digital and physical products.

## Skill Files

| File | URL | Purpose |
|------|-----|---------|
| **SKILL.md** (this file) | `https://creditclaw.com/amazon/skill.md` | Reg
Confidence
80% confidence
Finding
YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Context-Inappropriate Capability

High
Confidence
96% confidence
Finding
Generalized storefront, digital/physical sales, and product-management features are unrelated to the stated Amazon shopping purpose and materially expand what the agent can do with financial credentials. Hidden or weakly signposted capability expansion is dangerous because it can bypass user expectations and policy review that would have applied to a broader commerce skill.

Description-Behavior Mismatch

High
Confidence
99% confidence
Finding
The API reference advertises broad non-Amazon commerce endpoints such as payment links, invoices, checkout pages, seller profiles, and shop access. Embedding these in an Amazon shopping skill creates an overprivileged interface where a consumer expecting purchasing support may unknowingly authorize public money collection and sales operations.

Unbounded Resource Access

Medium
Category
Excessive Agency
Content
-H "Content-Type: application/json"
  -d '{
    "title": "Premium API Access - 1 Month",
    "description": "Unlimited queries to my data analysis endpoint.",
    "amount_usd": 5.00,
    "amount_locked": true
  }'
Confidence
80% confidence
Finding
Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
This skill documentation states that checkout pages can collect buyer names and later shows sales and invoice flows exposing buyer email addresses. Because the file is markdown, SQP-2 applies to omitted warnings about behaviors affecting privacy, and there is no visible warning that buyer PII will be stored, transmitted, or shown to the seller.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The markdown explains creating and sending invoices to customer email addresses and later creating payment links with payer email fields, but it does not warn that this causes outbound contact to third parties and processing of their personal data. Under the markdown criteria for SQP-2, this omission matters because the behavior can affect privacy and user expectations.

External Transmission

Medium
Category
Data Exfiltration
Content
"title": "Premium API Access",
  "amount_usd": 5.00,
  "page_type": "digital_product",
  "digital_product_url": "https://api.databot.com/keys/generate",
  "shop_visible": true
}
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Description-Behavior Mismatch

Medium
Confidence
88% confidence
Finding
The workflow description states that real orders can be placed with supported merchants generally, not just Amazon, which again widens the operational scope beyond the skill’s declared purpose. In an agent setting, this mismatch can cause unsafe delegation because users may authorize an Amazon-shopping skill without realizing it can trigger purchases elsewhere.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The purchase flow describes submitting orders that result in real-world purchases but does not prominently warn that sensitive personal data, including shipping address and purchase details, will be transmitted to external services and used to place actual orders. Users or agent operators may underestimate the privacy and financial consequences of invoking this endpoint.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The file expands the skill from Amazon-only shopping to additional merchants including Shopify and arbitrary URLs, which materially broadens what the agent can purchase. This creates scope drift between the published skill purpose and the documented capabilities, increasing the chance that an agent or integrator will perform purchases outside the user’s expected consent boundaries.

External Transmission

Medium
Category
Data Exfiltration
Content
## Purchase Request

```bash
curl -X POST https://creditclaw.com/api/v1/card-wallet/bot/purchase \
  -H "Authorization: Bearer $CREDITCLAW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Description-Behavior Mismatch

Medium
Confidence
96% confidence
Finding
The file expands an Amazon shopping skill into a generic card-enabled purchasing capability for arbitrary merchants. That materially broadens the authority of the agent beyond the declared scope, increasing the chance of misuse, policy bypass, or user confusion about where payment credentials may be used.

External Transmission

Medium
Category
Data Exfiltration
Content
### Step 1: Request Checkout

```bash
curl -X POST https://creditclaw.com/api/v1/bot/rail5/checkout \
  -H "Authorization: Bearer $CREDITCLAW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Description-Behavior Mismatch

Medium
Confidence
97% confidence
Finding
The checkout flow explicitly supports purchases at arbitrary merchants, not just Amazon, while using delegated card access. In an agent setting, this creates a dangerous capability expansion: any prompt or workflow that reaches this skill could authorize payment attempts on third-party sites outside the user's expected context.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
"approved": false,
  "status": "pending_approval",
  "checkout_id": "r5chk_abc123",
  "message": "Amount exceeds auto-approve threshold. Your owner has been notified.",
  "expires_in_minutes": 15
}
```
Confidence
90% confidence
Finding
The documented auto-approve threshold enables purchases to proceed without per-transaction human review when they fall within configured limits. In an agent ecosystem vulnerable to prompt injection or mistaken intent, autonomous spending is a meaningful financial-risk capability even if bounded by thresholds.

External Transmission

Medium
Category
Data Exfiltration
Content
The sub-agent calls this endpoint to retrieve the one-time decryption key:

```bash
curl -X POST https://creditclaw.com/api/v1/bot/rail5/key \
  -H "Authorization: Bearer $CREDITCLAW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "checkout_id": "r5chk_abc123" }'
Confidence
84% confidence
Finding
This endpoint delivers a one-time decryption key for card material to the agent runtime. Sending decryption keys into an LLM-controlled execution environment is dangerous because any prompt injection, logging, tracing, memory capture, or tool misuse in that environment could expose the key and enable card decryption.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The skill instructs the agent to save a self-contained encrypted card file locally without prominent warnings or controls for secure storage, retention, file permissions, or host compromise. Even though the card is encrypted at rest, the file is payment material tied to later key retrieval and decryption, so mishandling on disk increases theft, tampering, and accidental disclosure risks.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
This markdown file instructs the user to call remote API endpoints with an Authorization bearer token, which will transmit sensitive wallet, balance, and permissions data to an external service. The description includes no explicit warning about privacy, credential handling, or the fact that these checks disclose account data to CreditClaw.

External Transmission

Medium
Category
Data Exfiltration
Content
When your balance is low, ask your human if they'd like you to request a top-up:

```bash
curl -X POST https://creditclaw.com/api/v1/bot/wallet/topup-request \
  -H "Authorization: Bearer $CREDITCLAW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Session Persistence

Medium
Category
Rogue Agent
Content
| **package.json** (metadata) | `https://creditclaw.com/amazon/skill.json` | Machine-readable skill metadata |
Follow your human's instructions on how to manage and save skill files. If unsure, you can install locally:
```bash
mkdir -p ~/.creditclaw/skills/amazon
curl -s https://creditclaw.com/amazon/skill.md > ~/.creditclaw/skills/amazon/SKILL.md
curl -s https://creditclaw.com/amazon/checkout.md > ~/.creditclaw/skills/amazon/CHECKOUT.md
curl -s https://creditclaw.com/amazon/crossmint-wallet.md > ~/.creditclaw/skills/amazon/CROSSMINT-WALLET.md
Confidence
60% confidence
Finding
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Skill Enumeration

Medium
Category
Agent Snooping
Content
Follow your human's instructions on how to manage and save skill files. If unsure, you can install locally:
```bash
mkdir -p ~/.creditclaw/skills/amazon
curl -s https://creditclaw.com/amazon/skill.md > ~/.creditclaw/skills/amazon/SKILL.md
curl -s https://creditclaw.com/amazon/checkout.md > ~/.creditclaw/skills/amazon/CHECKOUT.md
curl -s https://creditclaw.com/amazon/crossmint-wallet.md > ~/.creditclaw/skills/amazon/CROSSMINT-WALLET.md
curl -s https://creditclaw.com/amazon/encrypted-card.md > ~/.creditclaw/skills/amazon/ENCRYPTED-CARD.md
Confidence
80% confidence
Finding
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

External Transmission

Medium
Category
Data Exfiltration
Content
You can register before your human does. You'll get an API key immediately.

```bash
curl -X POST https://creditclaw.com/api/v1/bots/register \
  -H "Content-Type: application/json" \
  -d '{
    "bot_name": "my-research-bot",
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
**You must follow these rules:**
- If `approval_mode` is `ask_for_everything`, ask your human before any purchase to get their approval. **New accounts default to this mode.** Your owner can loosen this from their dashboard once they're comfortable.
- If `approval_mode` is `auto_approve_under_threshold`, you may spend freely up to `ask_approval_above_usd`. Anything above that requires owner approval.
- If `approval_mode` is `auto_approve_by_category`, you may spend freely on `approved_categories` within limits. All others require approval.
- **Never** spend on `blocked_categories`. These are hard blocks enforced server-side and will be declined.
- Always read and follow the `notes` field — these are your owner's direct instructions.
Confidence
89% confidence
Finding
The skill explicitly permits autonomous spending under certain approval modes and thresholds. Even though guardrails are described as server-side enforced, this still enables the agent to initiate real financial transactions without per-transaction human confirmation, which is a meaningful safety risk if the agent is misdirected, compromised, or operating on flawed inputs.

Static analysis

No suspicious patterns detected.