Back to skill

Security audit

A Clawdbot skill that gives your agent native access to DWLF — a market analysis platform for crypto and stocks.

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a disclosed DWLF trading-platform integration, but it handles powerful account credentials and write/delete actions with weak scoping and an API wrapper that can send the API key to an arbitrary configured host.

Review this before installing if you will use a real DWLF account. Prefer a narrowly scoped, expiring API key in an environment variable or secrets manager, avoid putting keys in TOOLS.md, do not set DWLF_API_URL unless you fully trust the destination, and require explicit confirmation before creating, updating, deleting, compiling, purging, or activating trading-related resources.

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

Error
Location
scripts/dwlf-api.sh:14
Finding

API Key Disclosure Through an Unrestricted API Base URL Override

Content
View full analysis

Vulnerability Details

File Location: scripts/dwlf-api.sh, lines 14–45
Vulnerability Type: Credential disclosure through an attacker-controlled request destination
Risk Level: High

Vulnerable Code

bash
API_BASE="${DWLF_API_URL:-https://api.dwlf.co.uk}/v2"
API_KEY="${DWLF_API_KEY:-}"

# Try reading from TOOLS.md if no env var set
if [ -z "$API_KEY" ]; then
  TOOLS_FILE="${TOOLS_MD:-$HOME/clawd/TOOLS.md}"
  if [ -f "$TOOLS_FILE" ]; then
    # Extract Jenna's API key from TOOLS.md
    API_KEY=$(grep -A1 "Jenna's own key" "$TOOLS_FILE" | grep "API Key:" | head -1 | sed 's/.*: //')
  fi
fi

if [ -z "$API_KEY" ]; then
  echo "Error: No API key found. Set DWLF_API_KEY or add to TOOLS.md" >&2
  exit 1
fi

URL="${API_BASE}${PATH_AND_QUERY}"

CURL_ARGS=(
  -s
  -X "$METHOD"
  -H "Content-Type: application/json"
  -H "Authorization: ApiKey ${API_KEY}"
)

if [ -n "$BODY" ]; then
  CURL_ARGS+=(-d "$BODY")
fi

curl "${CURL_ARGS[@]}" "$URL" | jq .

Technical Analysis

The script permits DWLF_API_URL to specify an arbitrary API origin. It does not validate the URL scheme, hostname, port, or resolved destination before attaching the DWLF API key to the request.

The authorization header is constructed independently of the selected destination:

bash
-H "Authorization: ApiKey ${API_KEY}"

Consequently, any process or launcher capable of influencing DWLF_API_URL can direct a subsequent Skill request to an attacker-controlled server. The script will retrieve the credential from DWLF_API_KEY or the configured TOOLS.md file and transmit it to that server.

Shell command injection was not identified because arguments are passed through a Bash array and quoted. The vulnerability is instead a trust-boundary failure: sensitive authentication material is sent to a destination whose origin is not constrained.

Attack Path

  1. An attacker, compromised launch ...[truncated 1287 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove the DWLF_API_URL override if custom API origins are not an essential feature:

    bash
    API_BASE="https://api.dwlf.co.uk/v2"
    
  2. If an override is operationally required, parse and validate it before loading or attaching credentials. Allowlist only the expected HTTPS origin, reject user-information components and fragments, and reject unexpected ports:

    bash
    case "${DWLF_API_URL:-https://api.dwlf.co.uk}" in
      "https://api.dwlf.co.uk")
        API_BASE="https://api.dwlf.co.uk/v2"
        ;;
      *)
        echo "Error: Unapproved DWLF API origin" >&2
        exit 1
        ;;
    esac
    
  3. Never attach the production API key to development, test, or user-selected origins. Use separate, narrowly scoped credentials for approved non-production endpoints.

  4. Enforce HTTPS and retain normal TLS certificate verification. Do not introduce curl -k or equivalent certificate-validation bypasses.

  5. Apply least privilege to DWLF API keys. Grant only required scopes, configure expiration where supported, and rotate the key immediately if exposure is suspected.

  6. Add automated tests confirming that non-DWLF hosts, plaintext HTTP URLs, alternate ports, URLs containing user information, and malformed origins are rejected before any network request occurs.

  7. Consider using curl --fail-with-body --proto '=https' and an explicit approved URL to improve transport enforcement and error handling. These controls supplement, but do not replace, strict hostname allowlisting.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (29)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The documented purpose is market analysis, but the skill also instructs the agent to retrieve credentials from a local file and perform broad authenticated API actions, including account-modifying operations. This mismatch hides sensitive capability behind a benign description, which can lead to unauthorized data access or destructive account changes under the guise of normal analysis.

Content

No source excerpt is available for this finding.

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 · references/api-endpoints.md (reported line 128)May include surrounding context.

md
- Body: `{ data: { ... } }` (any top-level fields: `symbol`, `timeframe`, `type`, `data`, `origin`)
- Response: `{ annotation: { annotationId, ... } }`

### DELETE /v2/annotations/:annotationId
Delete an annotation.
- Response: `{ deleted: true }`

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 · references/api-endpoints.md (reported line 155)May include surrounding context.

md
- Body: `{ settings: { eventNotifications: [...], ... } }`
- Response: `{ settings: { ... } }`

### DELETE /v2/user/settings/:settingKey
Delete a specific setting by key.
- Response: `{ deleted: true }`

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 · references/api-endpoints.md (reported line 189)May include surrounding context.

md
- Body: partial fields (e.g. `{ exitPrice, notes, status }`)
- Response: `{ trade: { tradeId, ... } }`

### DELETE /v2/trades/:tradeId
Delete a trade.
- Response: `{ deleted: true }`

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 · references/api-endpoints.md (reported line 216)May include surrounding context.

md
- Body: partial update fields
- Response: `{ tradePlan: { planId, ... } }`

### DELETE /v2/trade-plans/:planId
Delete a trade plan.
- Response: `{ deleted: true }`

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 · references/api-endpoints.md (reported line 234)May include surrounding context.

md
Add symbol to watchlist.
- Body: `{ symbol: "BTC-USD" }`

### DELETE /watchlist/{symbol}
Remove symbol from watchlist.

## Custom Events

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 · references/api-endpoints.md (reported line 281)May include surrounding context.

md
Deactivate a single symbol for an event.
- Response: `{ eventId, symbol, isActive: false }`

### DELETE /custom-event-symbols/:eventId/:symbol
Permanently delete a symbol association for an event.

## Strategy Symbol Activation

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 · references/api-endpoints.md (reported line 316)May include surrounding context.

md
Deactivate a single symbol for a strategy.
- Response: `{ strategyId, symbol, isActive: false }`

### DELETE /strategy-symbols/:strategyId/:symbol
Permanently delete a symbol association for a strategy.

## Evaluations

Missing User Warnings

High
Category
Not specified by scanner
Confidence
94% confidence
Finding

The API key creation endpoint returns a raw secret and the docs only briefly note that it is shown once, without prominently flagging it as highly sensitive or instructing agents not to log, echo, persist, or expose it. In an AI-agent context, this is more dangerous because agents often summarize responses, store traces, or surface outputs to users and logs, which can accidentally exfiltrate credentials.

Content

No source excerpt is available for this finding.

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 · references/api-endpoints.md (reported line 343)May include surrounding context.

md
- Body: `{ name, scopes: ["read", "write"], expiresAt? }`
- Response: `{ keyId, rawKey, name, scopes }` — rawKey shown ONCE

### DELETE /accounts/api-keys/{keyId}
Revoke an API key.

## Academy (CDN — no auth required)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README instructs users to place an API key directly in TOOLS.md, which may be stored in the workspace, committed to source control, exposed to other tools, or read by the agent as ordinary context. Because this key grants access to market, portfolio, and trade-related capabilities, exposure could enable unauthorized use of the DWLF account and any connected sensitive data or write operations.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README says the skill 'triggers automatically' for a broad set of topics like market analysis, portfolio, indicators, and trading signals without defining boundaries or requiring explicit user confirmation. In an agent environment, broad auto-activation increases the chance the skill is invoked in unintended contexts and may lead the agent toward external API calls or account-linked actions when the user did not clearly request DWLF-specific behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README advertises data-modifying capabilities such as logging trades, adding notes, and closing positions, but it does not warn that these actions change persistent user data or should be confirmed before execution. In a trading skill context, ambiguous natural-language prompts could cause accidental account changes, incorrect trade records, or unintended operational decisions based on modified data.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill advertises shell-based execution via curl/jq helper scripts but does not declare any explicit tool scope such as allowed tools or permissions. That leaves execution authority implicit, which increases the chance the agent can invoke shell capabilities more broadly than reviewers or users expect.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Broad trigger phrases such as casual market-related language can cause the skill to activate unintentionally in conversations that were not meant to invoke DWLF. Because the skill has authenticated external and state-changing capabilities, accidental invocation materially raises the risk of unnecessary data exposure or unintended actions.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

Telling the agent to fetch an API key from TOOLS.md creates credential-access behavior inside the skill instructions. A market-analysis skill does not need to instruct the model to read secrets from local files, and this pattern can normalize secret retrieval and increase the risk of credential leakage or misuse.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill documents many write, update, duplicate, enable/disable, and delete operations over user data but does not require confirmation or warn users before destructive actions. In a finance/trading context, unintended mutations to trade plans, signals, watchlists, settings, or backtests can directly affect user decisions and account state.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · SKILL.md (reported line 21)May include surrounding context.

md
# DWLF API Endpoints Reference

Base URL: `https://api.dwlf.co.uk/v2`

## Market Data

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · references/api-endpoints.md (reported line 3)May include surrounding context.

md
# DWLF API Endpoints Reference

Base URL: `https://api.dwlf.co.uk/v2`

## Market Data

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

This markdown reference lists delete operations for annotations but does not include an explicit warning about irreversible removal or user-data impact. Under the markdown-file criteria, behavior that can affect user data or system integrity should be accompanied by clear warnings, not just endpoint names.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The file documents a DELETE endpoint for trades with no accompanying warning about permanent deletion of user records. For markdown skill/reference files, destructive behaviors that affect user data should be clearly disclosed to prevent accidental misuse.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This endpoint removes a user's trade plan, but the documentation provides no explicit caution about irreversible deletion. That omission weakens user awareness for a data-affecting action in a markdown file.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The documentation says the association is permanently deleted, but it does not provide a user-focused warning about the consequences of removing event activation state. For markdown files, destructive changes to user configuration should be clearly highlighted.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This endpoint permanently deletes a strategy-symbol association, affecting how strategies generate signals, but the documentation does not clearly warn about the impact. Such configuration-destructive behavior should be explicitly disclosed in markdown documentation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file explains how to create executable trading strategies and states that they compile into executable trade signals, but it does not include any user-facing warning about financial risk or the consequences of deploying or compiling such strategies. Because the documented behavior can affect user assets and system actions in a safety-critical domain, the omission of a warning fits the missing user warnings criterion for markdown files.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.