Back to skill

Security audit

clawdeals

Security checks for vulnerabilities and agentic risk

Overview

This docs-only skill is coherent for Clawdeals API use, but some copy/paste smoke examples are too risky for production credentials.

Install only if you trust Clawdeals and intend to let an agent use its API. Use least-privilege, short-lived credentials; keep CLAWDEALS_API_BASE fixed to an approved host; avoid running the provided smoke script against production; do not auto-approve contact reveal or offer acceptance; and verify any optional MCP tooling separately before use.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
examples.md:56
Finding

Bearer Credential May Be Transmitted to an Unvalidated Environment-Controlled Endpoint

Content
View full analysis

Vulnerability Details

File Location: examples.md:19-27, 56-72
Vulnerability Type: Unvalidated destination for bearer-token transmission
Risk Level: High

The documented CI script verifies only that CLAWDEALS_API_BASE and CLAWDEALS_API_KEY are non-empty:

bash
if [ -z "${CLAWDEALS_API_BASE:-}" ]; then
  echo "Missing CLAWDEALS_API_BASE"
  exit 1
fi

if [ -z "${CLAWDEALS_API_KEY:-}" ]; then
  echo "Missing CLAWDEALS_API_KEY"
  exit 1
fi

It subsequently attaches the bearer credential to requests sent to URLs derived from the environment-controlled base URL:

bash
curl_json() {
  local method="$1"
  local url="$2"
  local json_body="${3:-}"
  local expected_csv="$4"
  local idempotency_key="${5:-}"

  local headers=(-H "Authorization: Bearer $CLAWDEALS_API_KEY" -H "Content-Type: application/json")
  if [ -n "$idempotency_key" ]; then
    headers+=(-H "Idempotency-Key: $idempotency_key")
  fi

  local out
  if [ -n "$json_body" ]; then
    out="$(curl -sS -X "$method" "$url" "${headers[@]}" -d "$json_body" -w "\n__HTTP_STATUS:%{http_code}\n")"
  else
    out="$(curl -sS -X "$method" "$url" "${headers[@]}" -w "\n__HTTP_STATUS:%{http_code}\n")"
  fi

Technical Analysis

CLAWDEALS_API_BASE is trusted without validation of its URL scheme, hostname, port, or canonical path. Every request made through curl_json includes Authorization: Bearer $CLAWDEALS_API_KEY.

Although SKILL.md declares a runtime network allowlist and identifies https://app.clawdeals.com/api as the canonical production endpoint, that metadata does not protect the shell block when copied into an ordinary CI environment. A compromised workflow variable, repository environment, CI secret configuration, or operator shell can redirect requests to an attacker-controlled server.

The absence of redirect restrictions also increases exposure if an allowed endpoint returns an HTTP redirect an ...[truncated 1405 chars]

Remediation
View remediation

Remediation Suggestions

  1. Validate CLAWDEALS_API_BASE before making any authenticated request:

    • Require HTTPS.
    • Require an exact approved hostname.
    • Reject embedded credentials, fragments, unexpected ports, and malformed paths.
    • Permit localhost only behind an explicit development flag.
  2. Hard-code the production API origin where practical instead of accepting an arbitrary environment-controlled URL.

  3. Use a separate, short-lived, minimally scoped smoke-test credential that cannot access production resources.

  4. Add a preflight assertion similar to:

    bash
    case "$CLAWDEALS_API_BASE" in
      "https://app.clawdeals.com/api") ;;
      *)
        echo "Refusing unapproved CLAWDEALS_API_BASE" >&2
        exit 1
        ;;
    esac
    
  5. Explicitly disable redirects for authenticated requests or validate every redirect destination before forwarding credentials.

  6. Protect CI environment variables from untrusted pull requests and restrict who can modify workflow, environment, and secret configuration.

  7. Document immediate credential revocation and rotation procedures for suspected endpoint misconfiguration.

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
examples.md:210
Finding

Production-Compatible Smoke Test Performs Persistent and Transactional Marketplace Actions

Content
View full analysis

Vulnerability Details

File Location: examples.md:1-3, 99-223
Vulnerability Type: Excessive privileges and unsafe state-changing test behavior
Risk Level: Medium

The document explicitly presents the examples as suitable for staging or production:

markdown
# examples.md (Clawdeals REST)

This file contains **CI-friendly** and **copy/paste** examples for smoke checks (staging or production).

The workflow accepts an offer, obtains the resulting transaction identifier, and requests contact reveal:

bash
ACCEPT_BODY="$(curl_json "POST" "$CLAWDEALS_API_BASE/v1/offers/$COUNTER_OFFER_ID/accept" \
  '{}' \
  "200" \
  "$(uuid)")"
TX_ID="$(printf "%s" "$ACCEPT_BODY" | node -e 'const fs=require("node:fs"); const d=JSON.parse(fs.readFileSync(0,"utf8")); console.log(d.transaction?.tx_id || "")')"
if [ -z "$TX_ID" ]; then
  echo "Failed to parse tx_id"
  echo "$ACCEPT_BODY"
  exit 1
fi

# Request contact reveal (202 or 200 depending on policy/flags)
curl_json "POST" "$CLAWDEALS_API_BASE/v1/transactions/$TX_ID/request-contact-reveal" \
  '{}' \
  "200,202,403" \
  "$(uuid)" >/dev/null

echo "Smoke skill examples passed."

Earlier portions of the same script also create deals, cast a vote, create a watchlist, publish a listing, create an offer, and counter the offer. Only one dedicated test deal is removed; the script does not provide comprehensive cleanup for the other created resources.

Technical Analysis

A CI smoke test should normally use read-only checks or isolated disposable resources. This script instead requires a write-capable credential and performs business-level actions, including offer acceptance and transaction creation. Those actions exceed the minimum privileges necessary to verify API availability or credential validity.

The script does not enforce a staging hostname, test tenant, disposable account, or explicit operator confirmation. Its own documentation all ...[truncated 1979 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the claim that the smoke script is suitable for production.
  2. Enforce an exact staging or test hostname before executing any write operation.
  3. Use a dedicated test tenant and a short-lived credential limited to the smallest required test scopes.
  4. Make the default smoke test read-only, such as GET /v1/agents/me and non-mutating health or list requests.
  5. Split transactional tests into a separate opt-in suite requiring:
    • An explicit environment flag.
    • Interactive confirmation when run outside CI.
    • A test-account assertion.
    • A clear warning that offer acceptance creates a transaction.
  6. Do not request contact reveal in a general smoke test. Test that behavior only in an isolated environment with synthetic identities.
  7. Add cleanup for every reversible resource created by the test, including watchlists and listings.
  8. Add server-supported test namespaces, dry-run endpoints, or transaction rollbacks where full lifecycle testing is required.
  9. Fail closed if the active account or policy permits unintended automatic approval of offer acceptance or contact disclosure.
  10. Separate read-only and write-test credentials so ordinary CI validation never receives transactional production privileges.
Vulnerability Patterns
  • 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
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (34)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · CHANGELOG.md (reported line 80)May include surrounding context.

md
## 0.1.6 - 2026-02-10

- Document deal fix workflows: `PATCH /v1/deals/{deal_id}` and `DELETE /v1/deals/{deal_id}` (NEW-window only).
- Add smoke examples for updating/removing a deal immediately after posting.

## 0.1.2 - 2026-02-09

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| **SKILL.md** (this file) | `./SKILL.md` | `https://clawdeals.com/skill.md` |

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
- Never send your API key to the docs/marketing host (`clawdeals.com`). Many clients drop `Authorization` on redirects.

Auth:
- Agents authenticate with `Authorization: Bearer <token>` where the token is either an agent API key (`cd_live_...`) or an OAuth access token (`cd_at_...`).
- Do not log or persist tokens/keys (see Safety rules).

JSON:

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
- Never send your API key to the docs/marketing host (`clawdeals.com`). Many clients drop `Authorization` on redirects.

Auth:
- Agents authenticate with `Authorization: Bearer <token>` where the token is either an agent API key (`cd_live_...`) or an OAuth access token (`cd_at_...`).
- Do not log or persist tokens/keys (see Safety rules).

JSON:

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
- Never send your API key to the docs/marketing host (`clawdeals.com`). Many clients drop `Authorization` on redirects.

Auth:
- Agents authenticate with `Authorization: Bearer <token>` where the token is either an agent API key (`cd_live_...`) or an OAuth access token (`cd_at_...`).
- Do not log or persist tokens/keys (see Safety rules).

JSON:

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
- Never send your API key to the docs/marketing host (`clawdeals.com`). Many clients drop `Authorization` on redirects.

Auth:
- Agents authenticate with `Authorization: Bearer <token>` where the token is either an agent API key (`cd_live_...`) or an OAuth access token (`cd_at_...`).
- Do not log or persist tokens/keys (see Safety rules).

JSON:

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

Secure storage check (run only if file fallback is used instead of OS keychain):

bash
OPENCLAW_CREDENTIAL_FILE="${OPENCLAW_CREDENTIAL_FILE:-$HOME/.config/openclaw/credentials.json}"
if test -f "$OPENCLAW_CREDENTIAL_FILE"; then
  stat -c "%a %n" "$OPENCLAW_CREDENTIAL_FILE" 2>/dev/null || stat -f "%Lp %N" "$OPENCLAW_CREDENTIAL_FILE"
fi

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · reference.md (reported line 80)May include surrounding context.

md
Requires `Idempotency-Key`.

### DELETE /v1/deals/{deal_id}
Remove a deal (soft delete):
- Sets `status=REMOVED`.
- Only the creating agent can remove.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding

The changelog documents executing npx -y clawdeals-mcp install without a pinned package version, which can cause users to fetch and run whatever version is latest at execution time. That creates a supply-chain risk: if the package is compromised or a breaking/malicious release is published, operators following the docs may install and execute unreviewed code.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding

This entry again references npx -y clawdeals-mcp install with no version pin, so the documentation encourages installation of an unpinned remote package. In a security-sensitive skill ecosystem, that weakens reproducibility and increases exposure to dependency hijacking or malicious package updates.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding

The unpinned npx example appears a third time, reinforcing a risky installation pattern across the docs. Repetition increases the chance that users will execute a mutable package version, making any future package compromise immediately exploitable through normal operator behavior.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · HEARTBEAT.md (reported line 95)May include surrounding context.

md
- Human-in-the-loop for risky actions (approvals).
- Budget caps and currency constraints.
- Allowlist/denylist for who is allowed to act.
- Safer automation (auto-approve only for low-risk actions).

## 2) Default policy (safe)

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

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

md
- Human-in-the-loop for risky actions (approvals).
- Budget caps and currency constraints.
- Allowlist/denylist for who is allowed to act.
- Safer automation (auto-approve only for low-risk actions).

## 2) Default policy (safe)

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · POLICIES.md (reported line 27)May include surrounding context.

md
- Human-in-the-loop for risky actions (approvals).
- Budget caps and currency constraints.
- Allowlist/denylist for who is allowed to act.
- Safer automation (auto-approve only for low-risk actions).

## 2) Default policy (safe)

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · POLICIES.md (reported line 31)May include surrounding context.

md
- Human-in-the-loop for risky actions (approvals).
- Budget caps and currency constraints.
- Allowlist/denylist for who is allowed to act.
- Safer automation (auto-approve only for low-risk actions).

## 2) Default policy (safe)

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · POLICIES.md (reported line 151)May include surrounding context.

md
- Human-in-the-loop for risky actions (approvals).
- Budget caps and currency constraints.
- Allowlist/denylist for who is allowed to act.
- Safer automation (auto-approve only for low-risk actions).

## 2) Default policy (safe)

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · POLICIES.md (reported line 156)May include surrounding context.

md
- Human-in-the-loop for risky actions (approvals).
- Budget caps and currency constraints.
- Allowlist/denylist for who is allowed to act.
- Safer automation (auto-approve only for low-risk actions).

## 2) Default policy (safe)

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · POLICIES.md (reported line 43)May include surrounding context.

md
"offer_amount_gt": 200,
    "contact_reveal": "always"
  },
  "auto_approve": {
    "message_types": ["question", "answer", "info"],
    "actions": ["listing.create", "thread.create"]
  },

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · POLICIES.md (reported line 67)May include surrounding context.

md
"offer_amount_gt": 200,
    "contact_reveal": "always"
  },
  "auto_approve": {
    "message_types": ["question", "answer", "info"],
    "actions": ["listing.create", "thread.create"]
  },

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

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

md
"offer_amount_gt": 200,
    "contact_reveal": "always"
  },
  "auto_approve": {
    "message_types": ["question", "answer", "info"],
    "actions": ["listing.create", "thread.create"]
  },

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · POLICIES.md (reported line 112)May include surrounding context.

md
"offer_amount_gt": 200,
    "contact_reveal": "always"
  },
  "auto_approve": {
    "message_types": ["question", "answer", "info"],
    "actions": ["listing.create", "thread.create"]
  },

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

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

md
"offer_amount_gt": 200,
    "contact_reveal": "always"
  },
  "auto_approve": {
    "message_types": ["question", "answer", "info"],
    "actions": ["listing.create", "thread.create"]
  },

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · POLICIES.md (reported line 155)May include surrounding context.

md
"offer_amount_gt": 200,
    "contact_reveal": "always"
  },
  "auto_approve": {
    "message_types": ["question", "answer", "info"],
    "actions": ["listing.create", "thread.create"]
  },

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

The documentation states that any non-empty string other than 'always' for contact_reveal is treated as auto-approve by the current v0 evaluator. Because contact details are sensitive and disclosure is irreversible, this permissive parsing behavior can cause accidental or malicious policy misconfiguration to silently enable automatic contact disclosure.

Content

Scanner excerpt · POLICIES.md (reported line 148)May include surrounding context.

md
- Safe default: `"always"` (always requires approval).
- Impact:
  - `"always"`: requires approval.
  - any other non-empty string: treated as auto-approve by current v0 evaluator (use with caution).

### `auto_approve.message_types` (string[])
- Meaning: typed message types that can be auto-approved when sending messages.

Unrestricted Tool Access

Medium
Category
Excessive Agency
Confidence
70% confidence
Finding

Skill grants unrestricted tool access without appropriate constraints. An agent with unfettered tool access can perform arbitrary actions including file modification, network requests, and code execution.

Content

Scanner excerpt · POLICIES.md (reported line 162)May include surrounding context.

md
### `allowlist_agent_ids` (string[])
- Meaning: if non-empty, only agents in this list are allowed to act.
- Default recommendation: empty (allowlist disabled).
- Impact: if enabled, unknown agents are denied with `403 SENDER_NOT_ALLOWED`.

### `denylist_agent_ids` (string[])

Static analysis

No suspicious patterns detected.