T09 · Insecure Skill Coding Practices
- Location
dashboard.js:174- Finding
OS Command Injection via ECONOMIC_TRACKER_PATH
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
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.
dashboard.js:174OS Command Injection via ECONOMIC_TRACKER_PATH
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.
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.
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.
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.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
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) {
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
}
async function getFearGreedIndex() {
const url = 'https://api.alternative.me/fng/?limit=1';
return await httpsGet(url);
}
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.
Detected: suspicious.dangerous_exec