Back to skill

Security audit

Raven NGN Transfers

Security checks for vulnerabilities and agentic risk

Overview

The skill appears built for Raven payouts, but it can send the Raven API key and transfer details to any endpoint configured through an environment variable.

Review this before installing in any environment that can move real money. Use a restricted Raven API key if available, do not set RAVEN_API_BASE unless you fully control and trust the endpoint, keep the key in a locked-down secret source, and require human review for every confirmed transfer.

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/raven-transfer.mjs:9
Finding
Unrestricted API Base Override Can Exfiltrate Credentials and Financial Data<![CDATA[ ## Vulnerability Details **File Location**: `scripts/raven-transfer.mjs:9` and `scripts/raven-transfer.mjs:234-261` **Additional Location**: `tests/contract-live.test.mjs:6-25` **Vulnerability Type**: Arbitrary authenticated request destination / sensitive-data disclosure **Risk Level**: High ### Vulnerable Code From `scripts/raven-transfer.mjs:9`: ```js const API_BASE = process.env.RAVEN_API_BASE || "https://integrations.getravenbank.com/v1"; ``` From `scripts/raven-transfer.mjs:234-261`: ```js export async function ravenRequest(method, path, body, options = {}) { const { retries = 0, operation = "request", timeoutMs = TIMEOUT_MS, fetchImpl = fetch, } = options; let lastError; for (let attempt = 0; attempt <= retries; attempt += 1) { const controller = new AbortController(); const timer = setTimeout(() => controller.abort(), timeoutMs); try { const response = await fetchImpl(`${API_BASE}${path}`, { method, headers: { Authorization: `Bearer ${getApiKey()}`, "Content-Type": "application/json", }, ...(body ? { body: JSON.stringify(body) } : {}), signal: controller.signal, }); const data = await response.json().catch(() => ({})); ``` The live-contract tests repeat this trust model in `tests/contract-live.test.mjs:6-25`: ```js const apiBase = process.env.RAVEN_API_BASE || "https://integrations.getravenbank.com/v1"; const runLive = process.env.RAVEN_CONTRACT_TESTS === "1"; const apiKey = (() => { try { return resolveApiKey(process.env); } catch { return null; } })(); async function ravenLive(method, path, body) { const response = await fetch(`${apiBase}${path}`, { method, headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json", }, ...(body ? { body: JSON.stringify(body) } : {}), }); const data = await response.json().catch(() => ({})); return { response, d ...[truncated 3148 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Remove the endpoint override unless it is operationally required.** Use a fixed Raven API origin for production operation. 2. **Strictly validate any required override before sending credentials:** ```js const ALLOWED_API_ORIGINS = new Set([ "https://integrations.getravenbank.com", // Add an official sandbox origin only if Raven documents and supports it. ]); function resolveApiBase(rawValue) { const url = new URL( rawValue || "https://integrations.getravenbank.com/v1" ); if (url.protocol !== "https:") { throw new Error("RAVEN_API_BASE must use HTTPS."); } if (url.username || url.password) { throw new Error("RAVEN_API_BASE must not contain URL credentials."); } if (!ALLOWED_API_ORIGINS.has(url.origin)) { throw new Error("RAVEN_API_BASE is not an approved Raven endpoint."); } return url.toString().replace(/\/+$/, ""); } ``` 3. **Apply validation before credential resolution or request construction.** Do not load or attach the API key until the destination has passed validation. 4. **Do not rely on suffix matching alone.** Checks such as `hostname.endsWith("getravenbank.com")` can be implemented incorrectly and may accept lookalike domains. Prefer an exact allowlist of documented hosts. 5. **Separate development and production credentials.** If arbitrary endpoints are genuinely required for local testing, require an explicit unsafe-development flag and refuse to attach production credentials. Use a dedicated, low-privilege test credential. 6. **Apply the same endpoint validation to `tests/contract-live.test.mjs`.** Prefer importing a shared validated endpoint resolver rather than maintaining a second request implementation. 7. **Reduce credential privileges at the provider.** Use a Raven key restricted to only the API operations required by this Skill, if the provider supports scopes or account-level restrictions. ...[truncated 757 chars]
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (13)

Ae1

High
Category
analysis-evasion
Content
- `scripts/raven-transfer.mjs` (transfer CLI implementation)
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
- `scripts/raven-transfer.mjs` (transfer CLI implementation)
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
- Node.js 18+
- One auth source in your environment:
  - `RAVEN_API_KEY_FILE` (preferred, points to a `chmod 600` or `chmod 400` file)
  - `RAVEN_API_KEY`

Optional environment variables:
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
- Node.js 18+
- One auth source in your environment:
  - `RAVEN_API_KEY_FILE` (preferred, points to a `chmod 600` or `chmod 400` file)
  - `RAVEN_API_KEY`

Optional environment variables:
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
- Node.js 18+
- One auth source in your environment:
  - `RAVEN_API_KEY_FILE` (preferred, points to a `chmod 600` or `chmod 400` file)
  - `RAVEN_API_KEY`

Optional environment variables:
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
- Node.js 18+
- One auth source in your environment:
  - `RAVEN_API_KEY_FILE` (preferred, points to a `chmod 600` or `chmod 400` file)
  - `RAVEN_API_KEY`

Optional environment variables:
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
- Node.js 18+
- One auth source in your environment:
  - `RAVEN_API_KEY_FILE` (preferred, points to a `chmod 600` or `chmod 400` file)
  - `RAVEN_API_KEY`

Optional environment variables:
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
- Node.js 18+
- One auth source in your environment:
  - `RAVEN_API_KEY_FILE` (preferred, points to a `chmod 600` or `chmod 400` file)
  - `RAVEN_API_KEY`

Optional environment variables:
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
- Node.js 18+
- One auth source in your environment:
  - `RAVEN_API_KEY_FILE` (preferred, points to a `chmod 600` or `chmod 400` file)
  - `RAVEN_API_KEY`

Optional environment variables:
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Lp3

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding
The skill invokes a local Node.js script and explicitly relies on shell execution and environment-based secrets, but the manifest does not declare any tool restrictions such as permissions or allowed-tools. In an agent runtime, that omission broadens the effective capability surface and can let the skill run with more authority than reviewers or policy expect, increasing the risk of unauthorized command execution or secret access.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
5. Execute transfer exactly once with `--confirm="CONFIRM TXN_..."`.
6. Report normalized result fields (`available_balance`, `fee`, `total_debit`, `status`, `raw_status`).

Do not skip confirmation token checks. Do not auto-retry transfer submission.
Failed transfer note: yes, a failed Raven transfer is typically auto-reversed/refunded after a few minutes; wait, then re-check `transfer-status` and wallet balance before any retry.

## Required environment
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.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
```bash
mkdir -p "$HOME/.config/raven"
security find-generic-password -a "$USER" -s "raven-api-key" -w > "$HOME/.config/raven/raven_api_key"
chmod 600 "$HOME/.config/raven/raven_api_key"
export RAVEN_API_KEY_FILE="$HOME/.config/raven/raven_api_key"
```
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
```bash
mkdir -p "$HOME/.config/raven"
security find-generic-password -a "$USER" -s "raven-api-key" -w > "$HOME/.config/raven/raven_api_key"
chmod 600 "$HOME/.config/raven/raven_api_key"
export RAVEN_API_KEY_FILE="$HOME/.config/raven/raven_api_key"
```
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Static analysis

Detected: suspicious.env_credential_access, suspicious.exposed_secret_literal

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
tests/contract-live.test.mjs:6

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
tests/unit-normalizers.test.mjs:171