Back to skill

Security audit

risk art agent

Security checks for vulnerabilities and agentic risk

Overview

This is a real-looking Bankr crypto and LLM integration, but it needs review because it can perform irreversible wallet actions and persists powerful credentials.

Install only if you intentionally want Bankr to access a dedicated, limited-funds crypto wallet and LLM gateway. Prefer read-only keys unless transactions are required, use separate Agent and LLM keys, enable IP allowlisting where possible, avoid copying keys into shell or IDE config, pin or verify the CLI package before global install, and require explicit human review before any trade, transfer, signature, automation, or raw transaction submission.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (3)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:52
Finding
Unpinned Global Installation of a Wallet-Authorized CLI Dependency<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:52-62` and `SKILL.md:786-790` **Vulnerability Type**: Unpinned third-party executable dependency **Risk Level**: Medium ### Vulnerable Code ```bash bun install -g @bankr/cli ``` Or with npm: ```bash npm install -g @bankr/cli ``` The troubleshooting section repeats the unpinned installation: ```bash # Reinstall if needed bun install -g @bankr/cli ``` ### Technical Analysis The Skill directs users to globally install the latest version of `@bankr/cli` without specifying a reviewed version, lockfile, package integrity hash, or reproducible verification procedure. The installed CLI is subsequently entrusted with sensitive operations, including: - Receiving and storing Bankr API and LLM keys. - Sending authenticated requests to Bankr services. - Signing messages and structured data. - Submitting irreversible cryptocurrency transactions. - Writing configuration into Agent and development-tool configuration files. Global installation increases the potential impact because package lifecycle scripts and executable code run with the invoking user's permissions. Although the audit found no evidence that the named package is currently malicious, an upstream account compromise, malicious future release, or registry compromise could change the executable payload after the Skill itself has been reviewed. ### Attack Path 1. An attacker compromises the package publisher, registry account, or package distribution process. 2. The attacker publishes a malicious version under the existing `@bankr/cli` package name. 3. A user follows the Skill instructions and runs the unpinned global installation command. 4. The package executes locally with the user's privileges. 5. The malicious package reads Bankr credentials, modifies Agent configuration, alters transaction destinations, or captures transaction requests. 6. If the exposed key has Agent API write access, the attacker can invoke signing or transaction-s ...[truncated 789 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the CLI to a specifically reviewed version, for example: ```bash npm install -g @bankr/cli@REVIEWED_VERSION ``` 2. Publish and verify the expected package integrity hash before installation. 3. Document the official package publisher, source repository, and release-signing process. 4. Prefer a project-local installation with a committed lockfile instead of global installation. 5. Disable or audit package lifecycle scripts where the package manager permits it. 6. Run the CLI under a dedicated, low-privilege operating-system account. 7. Use a dedicated Agent wallet with limited funds and a purpose-specific API key. 8. Require a security review before updating the pinned CLI version. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:110
Finding
API Keys Exposed Through Command-Line Arguments and Diagnostic Output<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:110-125`, `SKILL.md:798-805`; `references/llm-gateway.md:21-36`, `references/llm-gateway.md:328-334`; `references/safety.md:150-157` **Vulnerability Type**: Sensitive credential exposure through process arguments, shell history, and terminal output **Risk Level**: Medium ### Vulnerable Code The Skill recommends passing API keys directly as command-line arguments: ```bash bankr login --api-key bk_YOUR_KEY_HERE ``` It also recommends passing or storing an LLM key through command arguments: ```bash bankr login --llm-key YOUR_LLM_KEY bankr config set llmKey YOUR_LLM_KEY ``` The safety reference similarly documents non-interactive login with keys on the command line: ```bash # Direct key login — no prompts bankr login --api-key bk_YOUR_KEY # With separate LLM key bankr login --api-key bk_AGENT_KEY --llm-key bk_LLM_KEY ``` Diagnostic instructions can print the configured key or environment variable: ```bash bankr config get llmKey ``` ```bash echo $BANKR_LLM_KEY ``` ### Technical Analysis Secrets supplied as command-line arguments may be exposed through: - Interactive shell history. - Process inspection utilities while the command is running. - Terminal session recording. - CI/CD command logs. - Agent execution transcripts. - Error-reporting or telemetry systems that capture command lines. Commands that retrieve or echo a key additionally disclose the secret in terminal output. That output may be retained in scrollback buffers, shared screens, build logs, support bundles, or Agent conversation history. The consequences are elevated because the project supports keys with Agent API capability. Such keys may authorize `/agent/sign` and `/agent/submit`, including immediate transaction execution without a separate confirmation prompt. ### Attack Path 1. A user follows the documentation and supplies a real API key using `--api-key`, `--llm-key`, or `config set`. 2. The command is retained in ...[truncated 1208 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Do not accept secrets through ordinary command-line arguments. 2. Provide hidden interactive input that disables terminal echo. 3. For automation, accept keys through protected standard input, file descriptors, or an operating-system secret manager. 4. Make credential retrieval commands redact values by default, for example: ```text bk_abcd...wxyz ``` 5. Remove the recommendation to use `echo $BANKR_LLM_KEY`; replace it with a boolean configuration check that never returns the secret. 6. Warn users that previously executed commands may remain in shell history and provide shell-specific removal procedures. 7. Ensure CI/CD examples use masked secret variables and never enable shell command tracing around authentication. 8. Rotate any key that has appeared in terminal output, logs, process telemetry, or an Agent transcript. 9. Default to separate LLM and Agent keys so exposure of one service credential does not grant unrelated authority. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
references/safety.md:127
Finding
Plaintext High-Authority Credentials Persisted Across CLI, Agent, IDE, and Shell Configuration<![CDATA[ ## Vulnerability Details **File Location**: `references/safety.md:127-145`; `references/llm-gateway.md:153-170`, `references/llm-gateway.md:219-230`, and `references/llm-gateway.md:232-249` **Vulnerability Type**: Plaintext storage and duplication of sensitive credentials **Risk Level**: Medium ### Vulnerable Code The safety documentation confirms that keys are stored directly in a JSON configuration file: ```json { "apiKey": "bk_...", "llmKey": "bk_...", "apiUrl": "https://api.bankr.bot", "llmUrl": "https://llm.bankr.bot" } ``` The OpenClaw setup writes a provider configuration containing the key: ```json { "models": { "providers": { "bankr": { "baseUrl": "https://llm.bankr.bot", "apiKey": "your_key_here", "api": "openai-completions", "models": [ { "id": "claude-sonnet-4.6", "name": "Claude Sonnet 4.6", "api": "anthropic-messages" }, { "id": "claude-haiku-4.5", "name": "Claude Haiku 4.5", "api": "anthropic-messages" }, { "id": "gemini-3-flash", "name": "Gemini 3 Flash" }, { "id": "gpt-5.2", "name": "GPT 5.2" } ] } } } } ``` The Claude Code setup recommends persisting the token in shell startup files: ```bash export ANTHROPIC_BASE_URL="https://llm.bankr.bot" export ANTHROPIC_AUTH_TOKEN="your_key_here" ``` The documentation then instructs: ```text Add these to ~/.zshrc or ~/.bashrc so all Claude Code sessions use the gateway. ``` The key-resolution logic also permits the LLM Gateway to fall back to the Agent API key: ```text BANKR_LLM_KEY environment variable llmKey in ~/.bankr/config.json Falls back to your Bankr API key (BANKR_API_KEY / apiKey) ``` ### Technical Analysis The setup duplicates reusable credentials into multiple plaintext configuration locations, potentially including: - `~/.bankr/config.json` - `~/.openclaw/openclaw.json` - `~/.config/opencode/opencode.json` - Cursor configuration - `~/.zshrc` - `~/.bashrc` Th ...[truncated 2282 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Store credentials in an operating-system keychain, hardware-backed credential store, or established secret-management service. 2. Write secret references or credential-provider identifiers into Agent and IDE configuration instead of raw key values. 3. Generate separate keys by default: - An LLM-only key for `llm.bankr.bot`. - A read-only Agent key for monitoring. - A narrowly controlled write key only where transaction execution is required. 4. Remove automatic fallback from the LLM key to a write-enabled Agent API key, or refuse fallback when the Agent key has write capability. 5. Enforce restrictive permissions atomically on every generated configuration file and verify ownership before writing. 6. Avoid storing tokens directly in `.zshrc` or `.bashrc`; load them at runtime from a protected secret provider. 7. Provide a command that inventories every location where the CLI has written a credential. 8. Ensure logout and revocation procedures remove or invalidate copies from Bankr, OpenClaw, OpenCode, Cursor, and shell configuration. 9. Add credential-expiration and rotation support so a copied key has a limited useful lifetime. 10. Continue recommending dedicated wallets, limited funding, read-only keys, and IP allowlisting as defense-in-depth controls. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
Findings (62)

Missing User Warnings

High
Confidence
93% confidence
Finding
The skill advertises high-risk financial capabilities like crypto transfers, leverage, betting, token deployment, and raw transaction signing without an upfront warning in the manifest-level description. Because routing and selection may happen before a user sees deeper safety text, users and orchestrators may invoke a dangerous capability without immediately understanding the risk profile.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
}
```

### DELETE /agent/profile

Delete the authenticated user's profile. Returns `{ "success": true }`.
Confidence
89% confidence
Finding
The skill documents a destructive authenticated action, `DELETE /agent/profile`, without showing any additional safety controls such as explicit user-confirmation requirements, dry-run behavior, or anti-automation safeguards. In an agent setting, exposing deletion-capable operations via natural-language workflows increases the risk that ambiguous prompts, prompt injection, or mistaken tool use could delete a user's public profile unintentionally.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Content
done
```

## Output Guidelines

### Response Formatting
Confidence
85% confidence
Finding
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

External Model or Provider Selection

High
Category
Excessive Agency
Content
bankr llm claude

# Pass any Claude Code flags through
bankr llm claude --model claude-sonnet-4.6
bankr llm claude --allowedTools Edit,Write,Bash
bankr llm claude --resume
```
Confidence
90% confidence
Finding
Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

YARA rule 'agent_skill_mcp_tool_poisoning_metadata': MCP/tool metadata poisoning indicators in tool schemas or skill manifests [agent_skills]

High
Category
YARA Match
Content
nTransaction` | Missing transaction |
| 401 | `Authentication required` | Missing or invalid API key |
| 403 | `Agent API access not enabled` | API key lacks agent access |

## POST /agent/submit

Submit raw transactions directly to the blockchain.

### Request Body

```json
{
  "transaction": {
    "to": "0x...",
    "chainId": 8453,
    "value": "1000000000000000000",
    "data": "0x..."
  },
  "description": "Transfer 1 ETH",
  "waitForConfirmation": true
}
```

### Transaction Fields

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `to` | string | Yes | Destination address |
| `chainId` | number | Yes | Chain ID (8453=Base, 1=Ethereum, 137=Polygon) |
| `value` | string | No | Value in wei (as string) |
| `data` | string | No | Calldata (hex string) |
| `gas` | string | No | Gas limit |
| `gasPrice` | string | No | Legacy gas price |
| `maxFeePerGas` | string | No | EIP-1559 max fee |
| `maxPriorityFeePerGas` | string | No | EIP-1559 priority fe
Confidence
80% confidence
Finding
YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Vague Triggers

Medium
Confidence
88% confidence
Finding
The invocation text is extremely broad and overlaps with many common user intents, including wallets, transfers, trading, LLM access, and raw transaction signing. In an agent routing system, this can cause over-selection of a high-privilege skill, increasing the chance that unrelated or ambiguous user requests get sent to a tool that can move funds or sign transactions.

External Transmission

Medium
Category
Data Exfiltration
Content
All requests require an `X-API-Key` header:

```bash
curl -X POST "https://api.bankr.bot/agent/prompt" \
  -H "X-API-Key: bk_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "What is my ETH balance?"}'
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
```bash
# Start — the response includes a threadId
curl -X POST "https://api.bankr.bot/agent/prompt" \
  -H "X-API-Key: $BANKR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "What is the price of ETH?"}'
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
## Safety & Access Control

**Dedicated Agent Wallet**: When building autonomous agents, create a separate Bankr account rather than using your personal wallet. This isolates agent funds — if a key is compromised, only the agent wallet is exposed. Fund it with limited amounts and replenish as needed.

**API Key Types**: Bankr uses a single key format (`bk_...`) with capability flags (`agentApiEnabled`, `llmGatewayEnabled`). You can optionally configure a separate LLM Gateway key via `bankr config set llmKey` or `BANKR_LLM_KEY` — useful when you want independent revocation or different permissions for agent vs LLM access.
Confidence
84% confidence
Finding
The skill explicitly encourages persistent dedicated agent wallets and stored API credentials for autonomous use. While operationally useful, session persistence combined with trading, signing, and submission capabilities increases blast radius if the host, config file, or agent workflow is compromised.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
- Store keys in environment variables (`BANKR_API_KEY`, `BANKR_LLM_KEY`), never in source code
- Add `~/.bankr/` and `.env` to `.gitignore` — the CLI stores credentials in `~/.bankr/config.json`
- Test with small amounts on low-cost chains (Base, Polygon) before production use
- Use `waitForConfirmation: true` with `/agent/submit` — transactions execute immediately with no confirmation prompt
- Rotate keys periodically and revoke immediately if compromised at [bankr.bot/api](https://bankr.bot/api)

**Reference**: [references/safety.md](references/safety.md)
Confidence
94% confidence
Finding
The documentation explicitly notes that `/agent/submit` executes transactions immediately with no confirmation prompt. In a system that supports autonomous agents and natural-language requests, absence of an enforced confirmation step for irreversible on-chain actions creates a direct path to accidental or malicious fund transfer.

External Transmission

Medium
Category
Data Exfiltration
Content
```bash
# Sign a plain text message
curl -X POST "https://api.bankr.bot/agent/sign" \
  -H "X-API-Key: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"signatureType": "personal_sign", "message": "Hello, Bankr!"}'
Confidence
92% confidence
Finding
The sign endpoint can transmit signing requests to a remote service and produce legally/financially meaningful signatures. In a crypto skill, this is materially risky because signatures can enable approvals, token spending, delegated actions, or transaction authorization without the user fully understanding the payload.

External Transmission

Medium
Category
Data Exfiltration
Content
```bash
# Sign a plain text message
curl -X POST "https://api.bankr.bot/agent/sign" \
  -H "X-API-Key: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"signatureType": "personal_sign", "message": "Hello, Bankr!"}'
Confidence
92% confidence
Finding
The sign endpoint can transmit signing requests to a remote service and produce legally/financially meaningful signatures. In a crypto skill, this is materially risky because signatures can enable approvals, token spending, delegated actions, or transaction authorization without the user fully understanding the payload.

External Transmission

Medium
Category
Data Exfiltration
Content
-d '{"signatureType": "personal_sign", "message": "Hello, Bankr!"}'

# Sign EIP-712 typed data (permits, orders)
curl -X POST "https://api.bankr.bot/agent/sign" \
  -H "X-API-Key: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"signatureType": "eth_signTypedData_v4", "typedData": {...}}'
Confidence
94% confidence
Finding
EIP-712 typed-data signing is especially dangerous because malicious permits, order signatures, or delegation approvals can be hard for non-experts to interpret while still authorizing asset movement or control. In this skill's context, exposing such capability through natural-language tooling substantially raises phishing and prompt-manipulation risk.

External Transmission

Medium
Category
Data Exfiltration
Content
-d '{"signatureType": "eth_signTypedData_v4", "typedData": {...}}'

# Sign a transaction without broadcasting
curl -X POST "https://api.bankr.bot/agent/sign" \
  -H "X-API-Key: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"signatureType": "eth_signTransaction", "transaction": {"to": "0x...", "chainId": 8453}}'
Confidence
95% confidence
Finding
Signing transactions, even without immediate broadcast, can create pre-authorized payloads ready for submission elsewhere. Because the skill also supports raw transaction submission and agent-driven workflows, this capability can be chained into irreversible fund loss if a malicious or mistaken prompt generates a harmful transaction.

External Transmission

Medium
Category
Data Exfiltration
Content
```bash
# Submit a raw transaction
curl -X POST "https://api.bankr.bot/agent/submit" \
  -H "X-API-Key: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
Confidence
96% confidence
Finding
The submit endpoint enables direct raw transaction broadcasting to the blockchain, which is irreversible and can transfer assets or execute arbitrary contract calldata. In an LLM-mediated skill, combining natural-language intent parsing with arbitrary transaction submission creates a very high-risk path for accidental or manipulated fund movement.

Description-Behavior Mismatch

Medium
Confidence
96% confidence
Finding
The manifest describes Bankr as a crypto trading agent and LLM gateway for wallets, transactions, NFTs, leverage, betting, token deployment, automation, and raw transaction signing/submission. This file additionally documents creation, update, and deletion of public agent profile pages and project updates, which is a distinct social/content management capability not reflected in the manifest description.

External Transmission

Medium
Category
Data Exfiltration
Content
**Create profile:**
```bash
curl -X POST "https://api.bankr.bot/agent/profile" \
  -H "X-API-Key: $BANKR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"projectName": "My Agent", "tokenAddress": "0x...", "description": "An AI trading agent"}'
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
**Request:**
```bash
curl -X POST "https://api.bankr.bot/agent/prompt" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "What is my ETH balance?"}'
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The workflow includes examples for token swaps and other trading actions without an explicit warning that these operations can be irreversible and financially risky. In a crypto-trading skill, users may copy these patterns directly, so omission of a confirmation/risk warning increases the chance of accidental loss even if no malicious behavior is present.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
This reference file instructs users on setting automated trading actions, including limit orders, stop losses, DCA, TWAP, and scheduled commands, but it does not clearly warn that these actions can execute later without further confirmation and may create real financial loss. In a crypto trading skill that supports live asset transfers and order execution, omission of explicit risk, auto-execution, and balance/gas consequences can cause users to trigger unintended or poorly understood financial actions.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
```bash
bankr llm credits add 25                   # Add $25 credits (USDC default)
bankr llm credits add 50 --token 0x...     # Add $50 from a specific token
bankr llm credits add 25 -y                # Skip confirmation prompt
```

Configure automatic top-up so credits never run out:
Confidence
88% confidence
Finding
The docs explicitly advertise `bankr llm credits add 25 -y` to skip confirmation and also encourage auto top-up from a wallet. In a finance-linked skill, reducing friction around spending actions increases the risk of unintended or automated fund depletion, especially if an agent or script invokes the command without adequate user review.

Session Persistence

Medium
Category
Rogue Agent
Content
## LLM Gateway Setup

If the user already has a Bankr account, they just need to configure the gateway. If not, they need to create one first.

### Have Bankr Account
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.

Session Persistence

Medium
Category
Rogue Agent
Content
Auto-install the Bankr provider into your OpenClaw config:

```bash
# Write config to ~/.openclaw/openclaw.json
bankr llm setup openclaw --install

# Preview the config without writing
Confidence
90% confidence
Finding
The OpenClaw setup writes provider config containing `apiKey: "your_key_here"` into `~/.openclaw/openclaw.json`, which implies storing a reusable secret in a local config file. Persisting credentials in plaintext config files can expose them through weak file permissions, backups, dotfile syncing, or accidental commits, leading to unauthorized use of the LLM gateway and possibly broader Bankr access if the same key is reused.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The documentation tells users to add `ANTHROPIC_AUTH_TOKEN` to `~/.zshrc` or `~/.bashrc`, creating a long-lived secret in shell startup files without any warning about credential exposure. Shell profiles are commonly backed up, synced, inspected by other tools, or accidentally shared, so this increases the chance of API key compromise and unauthorized gateway use.

External Transmission

Medium
Category
Data Exfiltration
Content
The gateway is compatible with standard OpenAI and Anthropic SDKs — just override the base URL.

### curl (OpenAI format)

```bash
curl -X POST "https://llm.bankr.bot/v1/chat/completions" \
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Static analysis

No suspicious patterns detected.