T09 · Insecure Skill Coding Practices
- Location
btc_15m.cjs:31- Finding
Unnecessary Plaintext Wallet Private-Key Handling
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This trading skill should be reviewed carefully because it asks for sensitive trading and wallet credentials while advertising live automation that the reviewed code does not actually implement.
Install only if you are comfortable reviewing a financial trading tool yourself. Do not provide a wallet private key or live trading credentials to this version; based on the inspected code, it appears suitable only for public-data scanning and dry-run signal logging. Expect local JSON files to be written under the skill directory, and avoid cron/nohup background runs unless you intentionally want continuous monitoring.
btc_15m.cjs:31Unnecessary Plaintext Wallet Private-Key Handling
Referenced artifact was not completely inspected
### 1. NegRisk Arbitrage Scanner (`negrisk_scanner.cjs`)
Referenced artifact was not completely inspected
### 2. Latency Arbitrage Bot (`latency_arb.cjs`)
Referenced artifact was not completely inspected
### 4. Alpha Scanner (`alpha_scan.cjs`)
Referenced artifact was not completely inspected
### 5. Universe Scanner (`universe_scanner.cjs`)
Referenced artifact was not completely inspected
### 6. Edge Finder (`edge_finder.cjs`)
The header comments and usage examples explicitly state that the tool places trades and supports continuous trading, but the implementation contains no live execution path. In a financial trading skill, this mismatch is more dangerous than in ordinary software because users may deploy it expecting autonomous market actions while nothing is actually executed, causing missed hedges, stale positions, or incorrect assumptions about risk coverage.
The manifest advertises 'NegRisk arbitrage (100% win rate),' while this latency arbitrage file estimates fair value via a sigmoid-based heuristic over recent BTC price changes rather than a risk-free arbitrage mechanism. The code explicitly resolves signals as either won or lost and tracks PnL, showing the strategy is speculative and fallible rather than guaranteed.
The skill describes executing Node.js programs that use network access and environment variables, but it declares no explicit tool scope such as permissions or allowed-tools. That creates an authorization gap where a host agent or user may not understand the skill’s required capabilities before invocation, increasing the risk of unintended secret exposure or network activity.
The live trading setup instructs users to place API credentials and private keys in environment variables or a .env file, but it does not include a strong warning about secret handling, storage, logging, or source-control exposure. In a trading context, leaked credentials could enable unauthorized account access, order placement, or theft of funds.
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.
*/15 * * * * cd /path/to/polymarket-alpha && node negrisk_scanner.cjs scan >> logs/negrisk.log 2>&1
nohup node latency_arb.cjs watch --dry > logs/latency.log 2>&1 &
### Data Export
The header advertises multiple signal types such as time decay and momentum, but the code only performs simple market filtering by price, expiry, and volume. In a trading skill, overstating implemented analytics can mislead users into trusting outputs as institutional-grade signals, increasing the chance of poor financial decisions based on nonexistent analysis.
The comment and output framing describe near-expiry markets as 'high confidence' and having a 'clear winner', but the actual code only checks days-to-expiry and volume, then visually flags extreme prices. This creates unjustified authority around the recommendations and can cause users to infer predictive validation that the script does not perform.
The script ends with actionable trading instructions and promotional framing but provides no warning that outputs are heuristic, unvalidated, and financially risky. In the context of a trading tool marketed as battle-tested and institutional-grade, omission of a disclaimer materially increases the risk that users will treat the output as reliable investment advice.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
async function getBTCMomentum() {
try {
// Use Hyperliquid for real-time BTC data (no rate limit)
const r = await fetch('https://api.hyperliquid.xyz/info', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ type: 'candleSnapshot', req: { coin: 'BTC', interval: '5m', startTime: Date.now() - 3600000 } })
The tool presents itself as a trading utility and the trade path computes signals, sizes positions, and records a trade, but it never actually submits a live order even when credentials are present. This is a security-relevant integrity issue because users may rely on it for automated execution while the system silently only logs dry-run entries, creating a false sense of action and potentially leading to unmanaged market exposure or bad operational decisions.
The header describes a demo of the suite's 6 tools, and the printed summary at L047 advertises 'whale tracking'. However, the actual tools array does not include any whale-tracking tool; it includes 'Universe Scanner' and 'Edge Finder' instead. This is an active contradiction between the file's stated overview and what the code actually demos.
The manifest markets 'NegRisk arbitrage (100% win rate)' and 'battle-tested on 8,347 signals', but this file prints broader suite performance of '73.4% win rate' over 8,347 signals. Because this demo file presents those numbers as representative suite outcomes, it conflicts with the stronger success claim associated with the suite description.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
// --- Config ---
const GAMMA_BASE = 'https://gamma-api.polymarket.com';
const HL_API = 'https://api.hyperliquid.xyz/info';
const DATA_DIR = path.join(__dirname, 'data');
const SIGNALS_FILE = path.join(DATA_DIR, 'latency_arb_signals.json');
const POLL_MS = 5000; // Poll every 5 seconds
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
// --- Config ---
const GAMMA_BASE = 'https://gamma-api.polymarket.com';
const HL_API = 'https://api.hyperliquid.xyz/info';
const DATA_DIR = path.join(__dirname, 'data');
const SIGNALS_FILE = path.join(DATA_DIR, 'latency_arb_signals.json');
const POLL_MS = 5000; // Poll every 5 seconds
The script persistently writes signal history to a local JSON file without clear user notice or consent. While the stored data is limited, silent local persistence can expose trading behavior and timestamps to other local users, backups, or shared environments.
The manifest describes an 'institutional-grade' Polymarket trading suite including latency arbitrage, which implies actual trade execution capability. In this file, the watch flow computes divergences, prints 'BUY' recommendations, marks them as 'Theoretical,' and persists dry-run/live signal records locally, but never submits orders to Polymarket or any exchange.
The script prints trading guidance such as 'potential high-return asymmetric bets' and 'time-decay alpha' that encourages speculative betting behavior without any risk disclosure, suitability warning, or jurisdiction/compliance notice. In a trading-focused skill marketed as 'institutional-grade' and 'battle-tested,' this language can materially nudge users toward risky financial activity while omitting important safety context.
The README advertises commands like node universe_scanner.cjs --save but does not clearly warn users that running them may persist market data to disk. While this is not an exploit by itself, it can create unexpected local data retention, privacy, or operational issues for users who assume scans are ephemeral, especially when API-derived data is written automatically.
The documentation notes JSON output and auto-created data files, but it does not clearly warn users that running the tools may persist market scans, signals, or trade history to local storage. Silent persistence can expose sensitive operational data on shared machines or leave behind artifacts that users did not expect.
The script persists trade history to a JSON file via saveTrade(), which writes under the local data directory. Although the code logs dry-run/live status, it does not clearly disclose to the user at the point of operation that trade metadata will be stored on disk, which is a data-affecting action.
Detected: suspicious.dangerous_exec, suspicious.env_credential_access