Back to skill

Security audit

Crypto Daily Dashboard

Security checks for vulnerabilities and agentic risk

Overview

This crypto dashboard is mostly purpose-aligned, but it contains an unsafe optional shell command path that can turn an environment variable into local command execution.

Review before installing. Use read-only Binance API keys, do not run this with trading or withdrawal permissions, and do not set ECONOMIC_TRACKER_PATH unless you fully control the target script and launch environment. The shell execution should be fixed before scheduled or unattended use.

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
dashboard.js:174
Finding
OS Command Injection via ECONOMIC_TRACKER_PATH<![CDATA[ ## Vulnerability Details **File Location**: `dashboard.js:35-36`, `dashboard.js:174-176` **Vulnerability Type**: OS command injection through an untrusted environment variable **Risk Level**: High The tracker path is read directly from the process environment: ```js economicTracker: { enabled: process.env.ECONOMIC_TRACKER_PATH ? true : false, path: process.env.ECONOMIC_TRACKER_PATH || '' }, ``` It is subsequently interpolated into a command string executed through a system shell: ```js const { execSync } = require('child_process'); const output = execSync(`python3 ${CONFIG.economicTracker.path} status`, { timeout: 5000, encoding: 'utf8' }); ``` ### Technical Analysis `ECONOMIC_TRACKER_PATH` is not validated, escaped, or constrained to an approved filesystem location. `child_process.execSync()` executes its string argument through a shell. Consequently, shell metacharacters embedded in the environment variable are interpreted as command syntax rather than as part of a file path. This permits command injection whenever an attacker can set or influence the dashboard process's environment. Merely quoting the value would not be a sufficient long-term fix because shell quoting is error-prone and platform-dependent. The operation does not require a shell at all. ### Attack Path 1. An attacker obtains the ability to define or modify `ECONOMIC_TRACKER_PATH`. Potential sources include a compromised launcher, cron configuration, service environment file, CI job, wrapper script, or another process configuration mechanism. 2. The attacker sets the variable to a value containing shell syntax, such as: ```text /tmp/tracker.py; id; # ``` 3. The dashboard is launched normally with `node dashboard.js`. 4. `getEconomicStatus()` constructs the following effective shell command: ```sh python3 /tmp/tracker.py; id; # status ``` 5. The shell runs the injected `id` command in addition to attempting to run the configured tracker. 6. The at ...[truncated 1140 chars]
Remediation
<![CDATA[ ## Remediation Suggestions Avoid invoking a shell. Pass the executable and arguments separately with `execFileSync()`: ```js const { execFileSync } = require('child_process'); const path = require('path'); const fs = require('fs'); const trackerPath = path.resolve(CONFIG.economicTracker.path); const allowedDirectory = path.resolve('/opt/crypto-dashboard/trackers'); if ( trackerPath !== allowedDirectory && !trackerPath.startsWith(`${allowedDirectory}${path.sep}`) ) { throw new Error('Economic tracker path is outside the approved directory'); } const stat = fs.statSync(trackerPath); if (!stat.isFile()) { throw new Error('Economic tracker path must identify a regular file'); } const output = execFileSync('python3', [trackerPath, 'status'], { timeout: 5000, encoding: 'utf8', shell: false, windowsHide: true }); ``` Additional hardening measures: 1. Resolve the configured path to an absolute, canonical path before use. 2. Restrict tracker scripts to a dedicated administrator-controlled directory. 3. Reject symlinks if untrusted users can modify the tracker directory. 4. Verify that the tracker is a regular file with safe ownership and permissions. 5. Run the dashboard under a dedicated, unprivileged operating-system account. 6. Supply only the environment variables required by the tracker rather than automatically inheriting sensitive credentials. 7. Do not permit untrusted users to edit cron entries, service environment files, or launcher configuration. 8. Log tracker validation failures without printing credentials or other sensitive environment data. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

Context-Inappropriate Capability

High
Confidence
99% confidence
Finding
The code executes a shell command built from the environment-controlled ECONOMIC_TRACKER_PATH using execSync and string interpolation. If an attacker can influence that environment variable, they can inject shell metacharacters or point to an unexpected program, resulting in arbitrary local command execution under the user's privileges.

Lp3

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding
The skill declares executable behavior and explicitly relies on environment variables for sensitive Binance API credentials, but it does not declare any tool scope or permission boundaries. In an agent ecosystem, this weakens reviewability and containment because operators cannot easily see that the skill expects env access and will execute code, increasing the chance of over-privileged execution or unintended secret exposure.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The output example and surrounding troubleshooting text show the dashboard interface in Chinese, but the skill description does not mention that the UI is Chinese-only or provide any language selection. This is a natural-language locale policy concern because it imposes a specific language on users without opt-in or justification.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
The code defaults CONFIG.locale to 'zh-CN' when LANG is unset, which imposes a specific language/locale choice on users by default. The policy allows locale constraints only when user choice or clear justification is provided, neither of which is present here.

External Transmission

Medium
Category
Data Exfiltration
Content
async function getCryptoPrices() {
  // Try CoinGecko first (free, no API key)
  const coins = ['bitcoin', 'ethereum', 'solana'];
  const cgUrl = `https://api.coingecko.com/api/v3/simple/price?ids=${coins.join(',')}&vs_currencies=usd&include_24hr_change=true`;
  const cg = await httpsGet(cgUrl);
  
  if (cg && cg.bitcoin && cg.bitcoin.usd) {
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
}

async function getFearGreedIndex() {
  const url = 'https://api.alternative.me/fng/?limit=1';
  return await httpsGet(url);
}
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
98% confidence
Finding
The ECONOMIC_TRACKER_PATH value is passed directly into a shell command without validation or escaping. This is not just a missing warning; it is a command injection sink, because shell parsing will treat crafted characters in the path as additional commands.

Static analysis

Detected: suspicious.dangerous_exec

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
dashboard.js:195