Back to skill

Security audit

Aster-Skill

Security checks for vulnerabilities and agentic risk

Overview

This skill openly aims to trade crypto, but it can automatically place leveraged real-money orders from LLM-analyzed news on a schedule without enough user controls.

Install only after adding or verifying safeguards: paper trading by default, explicit approval for each live trade, strict position and loss limits, exchange-side withdrawal-disabled keys, pinned dependencies, and clear disclosure that news content is sent to OpenAI. Treat this as real-money automated leveraged trading, not an informational news tool.

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)

T09 · Insecure Skill Coding Practices

Error
Location
crypto-news-trader-index.js:128
Finding
Untrusted News Content Can Manipulate Automated Leveraged Trades<![CDATA[ ## Vulnerability Details **File Location**: `crypto-news-trader-index.js`, lines 128–140, 177–199, and 328–353 **Vulnerability Type**: Prompt injection through untrusted external content controlling a financial action **Risk Level**: High ### Vulnerable Code ```js formatForLLM(articles) { return articles .map( (a, i) => ` [Article ${i + 1}] Source: ${a.source} Author: ${a.author || "Unknown"} PublishedAt: ${new Date(a.publishedAt).toISOString()} Title: ${a.title || ""} Content: ${(a.content || a.description || "").slice(0, 700)} URL: ${a.url || ""} Engagement: likes=${a.likes || 0} retweets=${a.retweets || 0} replies=${a.replies || 0} `.trim() ) .join("\n\n---\n\n"); } ``` ```js async analyze(coin, formattedNews) { const prompt = SENTIMENT_ANALYSIS_PROMPT .replaceAll("{COIN}", coin) .replace("{NEWS_CONTENT}", formattedNews); const resp = await this.openai.chat.completions.create({ model: "gpt-4o", temperature: 0.1, max_tokens: 1200, response_format: { type: "json_object" }, messages: [ { role: "system", content: "Return strict JSON only. No markdown. No extra text." }, { role: "user", content: prompt } ] }); return JSON.parse(resp.choices[0].message.content); } ``` ```js const formatted = monitor.formatForLLM(articles); let analysis; try { analysis = await analyzer.analyze(coin, formatted); } catch (e) { console.error(`[Analyzer] Failed:`, e?.message || e); continue; } console.log(`[Analyzer]`, { sentiment: analysis.sentiment, confidence: analysis.confidence, signal_strength: analysis.signal_strength, action: analysis.recommended_action, summary: analysis.summary }); const signal = analyzer.getTradeSignal(analysis); if (!signal) { console.log(`[Decision] No trade.`); continue; } // Step 3 try { await trader.place(coin, signal.side, analysis); } catch (e) { console.error(`[Trade] Failed:`, e?.message || e); } ``` ### Technical ...[truncated 2928 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Treat all article content as untrusted data** - Clearly delimit article content using a structured format. - Add a system-level instruction that article text is evidence only and that instructions contained within it must never be followed. - Remove unnecessary article fields before sending data to the model. 2. **Detect and reject adversarial content** - Scan titles and content for instruction-like phrases, model directives, forged JSON, and attempts to override the prompt. - Quarantine suspicious articles instead of using them for automated trading. 3. **Apply strict output validation** - Validate the response with a JSON Schema. - Restrict `sentiment`, `signal_strength`, `recommended_action`, and `urgency` to documented enumerations. - Require `confidence` to be a finite number between zero and one. - Validate all score fields and reject missing or unexpected properties. 4. **Require independent corroboration** - Do not trade based on a single social-media post or article. - Require matching reports from multiple independent, approved sources. - Use deterministic source allowlists and assign lower trust to user-generated sources. 5. **Separate analysis from trade authorization** - Require human confirmation before placing a live order. - Alternatively, use a separate deterministic policy engine that considers the LLM response only as one non-authoritative input. - Provide a paper-trading mode as the default. 6. **Enforce exchange-side risk controls** - Use API credentials restricted to trading only, with withdrawals disabled. - Set maximum order size, daily loss, position, leverage, and order-frequency limits. - Verify that stop-loss and take-profit orders are accepted and active before considering the operation successful. ]]>

T08 · Insecure Dependencies

Warning
Location
crypto-news-trader-skill.json:16
Finding
Unpinned Packages Are Installed and Executed Through npx<![CDATA[ ## Vulnerability Details **File Location**: `crypto-news-trader-skill.json`, lines 16–19; `Skill.md`, lines 43–47 **Vulnerability Type**: Unpinned third-party package installation and supply-chain exposure **Risk Level**: Medium ### Vulnerable Code `crypto-news-trader-skill.json`: ```json "mcpServers": { "opennews": { "command": "npx", "args": ["clawhub", "install", "opennews-mcp"] } } ``` `Skill.md`: ```bash npx clawhub install opennews-mcp ``` The JavaScript entry point also imports third-party packages whose versions and integrity are not defined by a package manifest or lockfile included in the audited project: ```js import { AsterClient } from "@asterdex/aster-skills-hub"; import { OpenNewsClient } from "opennews-mcp"; import OpenAI from "openai"; ``` ### Technical Analysis The MCP configuration invokes `npx` using the mutable package name `clawhub` without an exact version or integrity constraint. It then requests installation of `opennews-mcp`, which is also not version-pinned. An `npx` invocation can retrieve and execute package code resolved from an external package registry. Because neither the CLI nor the installed MCP package is pinned to an audited version, the effective code executed during a future installation can differ from the code that was originally reviewed. The project contains no package manifest, dependency lockfile, integrity hashes, or provenance verification for `clawhub`, `opennews-mcp`, `openai`, or `@asterdex/aster-skills-hub`. This prevents reproducible dependency resolution and increases exposure to compromised releases, dependency takeover, malicious lifecycle scripts, or registry account compromise. ### Attack Path 1. An attacker compromises the publisher account, registry entry, release process, or a transitive dependency associated with `clawhub` or `opennews-mcp`. 2. The attacker publishes a malicious version under the same mutable package name or causes dependency resolution to select com ...[truncated 1141 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Pin exact dependency versions** - Invoke an explicitly audited version, for example `npx clawhub@<exact-version>`. - Pin `opennews-mcp`, `openai`, and `@asterdex/aster-skills-hub` to exact versions rather than ranges or implicit latest releases. 2. **Add reproducible dependency metadata** - Include a package manifest and committed lockfile. - Use deterministic installation such as `npm ci`. - Preserve and verify registry integrity hashes. 3. **Verify package provenance** - Confirm package ownership, repository source, release signatures, and build provenance. - Use trusted registries and an organizational package allowlist. - Audit transitive dependencies before deployment. 4. **Avoid installation during Skill execution** - Install and verify dependencies during a controlled build or deployment phase. - Package approved dependencies into an immutable artifact rather than dynamically resolving them when the Skill runs. 5. **Restrict installation privileges** - Run package installation in a sandbox without production credentials. - Deny unnecessary filesystem and network access. - Disable package lifecycle scripts where compatible with the required dependencies. 6. **Separate credentials from dependency setup** - Do not expose Aster, OpenAI, or Twitter credentials to package installation processes. - Inject credentials only after dependency verification and immediately before the operational process starts. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

Missing User Warnings

High
Confidence
96% confidence
Finding
This skill automates leveraged long/short market orders based on LLM-classified news, but the description does not clearly warn users that it can place live trades with real financial loss, including amplified losses from leverage. In this context, omission of a prominent warning is especially dangerous because users may treat the skill as informational rather than execution-capable, increasing the chance of unintended or poorly understood trading activity.

Ssd 4

High
Confidence
99% confidence
Finding
Untrusted external news content is inserted directly into an LLM prompt, and the returned classification is used as a trading signal for real order placement. This creates a high-risk indirect prompt-injection and market-manipulation path where malicious articles, tweets, or coordinated rumor campaigns can steer the model into recommending trades that cause direct financial harm.

Missing User Warnings

High
Confidence
98% confidence
Finding
The code automatically places real market orders based on model-generated sentiment without any human confirmation, dry-run mode, or explicit safety gate. In a trading skill, this is especially dangerous because noisy news, LLM misclassification, prompt-injected article text, or market manipulation can directly trigger financial loss on a live account.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
The skill instructs users to install an MCP component via an unpinned `npx clawhub install opennews-mcp`, which can resolve to whatever package/version is current at install time. That creates a supply-chain risk: a malicious or compromised upstream release could be installed and then influence news ingestion or broader agent behavior in a trading workflow.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
The configuration forces `language: "en"`, which constrains the skill to English-language news only. Because the file does not offer a language/locale choice or explain a justified region-specific requirement, this is a natural-language locale policy concern.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The skill sends aggregated news content, including article text, metadata, URLs, and social engagement data, to an external OpenAI service for analysis without any disclosure or user-controlled data-sharing boundary. While the data is mostly public news, undisclosed external transmission can create privacy, compliance, and operational risks, especially if feeds later include proprietary or licensed content.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The manifest explicitly advertises automated long/short order placement based on news classification, but provides no warning, approval gate, or indication of safeguards for financial actions. In this context, unattended trading can directly cause monetary loss, especially because the skill is scheduled to run every 5 minutes and uses live exchange credentials.

Static analysis

Detected: suspicious.env_credential_access

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
crypto-news-trader-index.js:118