Back to skill

Security audit

Kraken Exchange

Security checks for vulnerabilities and agentic risk

Overview

This Kraken skill is coherent for exchange access, but it combines real-money trading authority with broad activation, unpinned executable installation, plaintext credential handling, and recurring automation examples.

Review before installing. Use read-only Kraken API keys unless trading is necessary, never grant withdrawal or transfer permissions unless required, pin and verify the tentactl binary, avoid plaintext long-lived credentials when possible, and do not enable recurring trading without explicit limits, expiry, and manual approval controls.

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 (2)

T08 · Insecure Dependencies

Error
Location
SKILL.md:15
Finding

Unpinned Third-Party Executable Receives Financial Credentials

Content
View full analysis
/dev/null || echo "")}" [[ -z "$KRAKEN_MCP_BINARY" && -x "$HOME/.cargo/bin/tentactl" ]] && export KRAKEN_MCP_BINARY="$HOME/.cargo/bin/tentactl" [[ -z "$KRAKEN_MCP_BINARY" ]] && { echo "Error: tentactl not found. Install: cargo install tentactl" >&2; exit 1; } exec python3 "$SCRIPT_DIR/kraken.py" "$@" ``` ```python proc = subprocess.Popen([binary], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, text=True) ``` ### Technical Analysis The installation command retrieves the current `tentactl` package from the Cargo registry without pinning an exact version, using a lockfile, or verifying an artifact checksum or signature. The GitHub source reference in the documentation does not establish that the installed registry artifact corresponds to a reviewed and immutable source revision. The wrapper loads Kraken credentials into its environment before launching `tentactl`. The child process therefore inherits financial API credentials and is trusted to communicate with Kraken and perform sensitive operations. The documented tool set includes order placement, transfers, earn allocation, account changes, and withdrawals. Consequently, compromise of the dependency or its distribution channel would directly expose a high-value execution and credential boundary. This finding does not establish th ...[truncated 1816 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/kraken.sh:7
Finding

Credential Configuration File Is Executed as Arbitrary Shell Code

Content
View full analysis
Remediation
View remediation
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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (20)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
See `references/tools.md` for full parameter docs on all 114 tools.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · scripts/kraken.sh (reported line 2)May include surrounding context.

sh
#!/usr/bin/env bash
# Convenience wrapper. Loads .env and delegates to kraken.py.
# Usage: kraken.sh <tool_name> [json_arguments]

SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill invokes shell commands and relies on environment-provided secrets, but it does not declare a restrictive tool scope such as allowed tools or permissions. In an agent environment, that omission increases the chance the skill is selected with broader-than-necessary execution capabilities, enabling unintended command execution or secret exposure if the skill is misused or composed with other prompts.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger description is broad enough to activate on generic crypto, trading, or portfolio-management requests, not just clearly Kraken-specific intent. That can route unrelated financial requests into a skill capable of account access and real-money trading, increasing the risk of overreach and accidental order placement in the wrong context.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

bash
echo "KRAKEN_API_KEY=your-key" > ~/.tentactl.env
echo "KRAKEN_API_SECRET=your-secret" >> ~/.tentactl.env
chmod 600 ~/.tentactl.env

Or use the 1Password setup script: scripts/setup-keys.sh

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The automation example schedules recurring crypto purchases and includes language suggesting eventual execution after validation, but it does not require fresh user approval for each run. In a real-money trading context, recurring unattended execution can lead to unauthorized or unexpected trades, especially if market conditions or user intent change.

Content

No source excerpt is available for this finding.

Unbounded Resource Access

Medium
Category
Excessive Agency
Confidence
75% 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.

Content

Scanner excerpt · references/tools.md (reported line 39)May include surrounding context.

cancel_all_after

Dead man's switch: cancel all orders after timeout seconds. Set timeout=0 to disable. Call every 15-30s with timeout=60 for protection. Requires API keys.

Parameters:

json

Unbounded Resource Access

Medium
Category
Excessive Agency
Confidence
75% 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.

Content

Scanner excerpt · references/tools.md (reported line 903)May include surrounding context.

cancel_all_after

Dead man's switch: cancel all orders after timeout seconds. Set timeout=0 to disable. Call every 15-30s with timeout=60 for protection. Requires API keys.

Parameters:

json

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The wf_batch_order tool is explicitly marked as REAL MONEY and can submit send/cancel/edit futures instructions in bulk, but its description does not require explicit user confirmation before execution. In an agent setting, omission of a confirmation guard materially increases the chance of unauthorized or accidental trading actions with immediate financial consequences, especially because batch instructions can bundle multiple operations in one call.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
95% confidence
Finding

The script launches an external executable, which is expected for a wrapper, but the executable path is not fixed or authenticated. Because the binary can be selected via environment variable or PATH lookup, an attacker who can influence the runtime environment can cause arbitrary code execution under the user's privileges.

Content

Scanner excerpt · scripts/kraken.py (reported line 20)May include surrounding context.

python
notif = json.dumps({"jsonrpc":"2.0","method":"notifications/initialized"})
call = json.dumps({"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":tool,"arguments":args}})

proc = subprocess.Popen([binary], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, text=True)
proc.stdin.write(init + "\n" + notif + "\n" + call + "\n")
proc.stdin.flush()

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This script launches an external binary via subprocess based on runtime input and an environment variable, but it provides no confirmation prompt, user-facing log, or warning comment about that execution. For a code file, subprocess execution is a safety-relevant operation that should have some visible disclosure unless clearly communicated elsewhere.

Content

No source excerpt is available for this finding.

Tainted flow: 'binary' from os.environ.get (line 8, credential/environment) → subprocess.Popen (code execution)

Medium
Category
Data Flow
Confidence
99% confidence
Finding

The value passed to subprocess.Popen is derived from KRAKEN_MCP_BINARY, an environment-controlled input, with no trust boundary enforcement. In environments where attackers can set or influence environment variables, this becomes a direct arbitrary program execution primitive and is especially sensitive here because the tool may access cryptocurrency account data and trading functions.

Content

Scanner excerpt · scripts/kraken.py (reported line 20)May include surrounding context.

python
notif = json.dumps({"jsonrpc":"2.0","method":"notifications/initialized"})
call = json.dumps({"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":tool,"arguments":args}})

proc = subprocess.Popen([binary], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, text=True)
proc.stdin.write(init + "\n" + notif + "\n" + call + "\n")
proc.stdin.flush()

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script automatically sources an environment file using Bash source, which executes arbitrary shell code in that file rather than merely parsing key/value pairs. If an attacker can modify ~/.tentactl.env or influence KRAKEN_ENV_FILE, they can achieve code execution whenever the wrapper runs, and this is especially sensitive in a crypto-trading skill that may hold exchange API credentials and execute trades.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

md
#!/usr/bin/env bash
# Setup Kraken API keys from 1Password or manual input.
# Stores them in ~/.tentactl.env (chmod 600).

set -euo pipefail

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · scripts/setup-keys.sh (reported line 3)May include surrounding context.

sh
#!/usr/bin/env bash
# Setup Kraken API keys from 1Password or manual input.
# Stores them in ~/.tentactl.env (chmod 600).

set -euo pipefail

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · scripts/setup-keys.sh (reported line 57)May include surrounding context.

sh
#!/usr/bin/env bash
# Setup Kraken API keys from 1Password or manual input.
# Stores them in ~/.tentactl.env (chmod 600).

set -euo pipefail

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · scripts/setup-keys.sh (reported line 86)May include surrounding context.

sh
#!/usr/bin/env bash
# Setup Kraken API keys from 1Password or manual input.
# Stores them in ~/.tentactl.env (chmod 600).

set -euo pipefail

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script extracts secrets from 1Password using --reveal and immediately converts them into plaintext environment file entries without explicitly disclosing that handling to the user. This defeats some of the protection users expect from a password manager by moving credentials into a less protected, persistent local file. Because these are Kraken API credentials for a trading integration, the operational risk is higher than ordinary application tokens.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script persists Kraken API credentials to ~/.tentactl.env without an explicit warning that the secrets will be stored on disk for future reuse. Even with chmod 600, local plaintext storage increases exposure to backup leakage, accidental sourcing, shell tooling disclosure, or compromise of the user account. In a cryptocurrency trading skill, exposed API keys can enable account access and potentially unauthorized trading or fund movement depending on key permissions.

Content

No source excerpt is available for this finding.

Excessive Permissions

Low
Category
Privilege Escalation
Confidence
80% confidence
Finding

Skill requests more permissions than appear necessary for its stated functionality. Review if elevated access is justified.

Content

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

md
Or use the 1Password setup script: `scripts/setup-keys.sh`

**Key permissions:** Create keys at https://www.kraken.com/u/security/api
- Read-only: enable **Query Funds** and **Query Open Orders & Trades**
- Trading: also enable **Create & Modify Orders**

Static analysis

No suspicious patterns detected.