Back to skill

Security audit

Trading Research

Security checks for vulnerabilities and agentic risk

Overview

This is mostly a transparent Binance research toolkit, but it includes live trading API guidance, a VPN bypass suggestion, and unsafe financial calculations that users should review carefully before installing.

Install only if you want a Binance-focused research helper and treat its output as educational, not financial advice. Do not give it Binance API keys with trading permissions, do not use the production order examples for live trades, ignore the VPN bypass suggestion, and independently verify position sizing and MACD-based signals before risking money.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/position_sizer.py:29
Finding

Declared Trading Risk Ceiling Is Not Enforced

Content
View full analysis
100: raise ValueError("Risk percent must be between 0 and 100") ``` The corresponding policy in `SKILL.md` states: ```text - Never exceed 3% risk per trade ``` ### Technical Analysis The skill declares that risk must never exceed 3% per trade, but the executable validation accepts any value up to 100%. The supplied percentage is then used directly to calculate the permitted loss: ```python risk_amount = account_balance * (risk_percent / 100) ``` An accepted value of `100` therefore permits a calculated maximum loss equal to the entire account balance. A narrow difference between the entry and stop-loss prices can also produce a position value substantially greater than the account balance. The program only prints an allocation warning and does not reject or cap the result. This is a safety-control enforcement failure in a financial calculation tool. It does not grant operating-system privileges or enable arbitrary code execution, but it allows callers to bypass the risk policy represented to users. ### Attack Path 1. A caller invokes the position-sizing tool with a risk value greater than the documented 3% ceiling, for example: ```bash python3 scripts/position_sizer.py \ --balance 10000 \ --risk 100 \ --entry 100000 \ --stop-loss 99000 ``` 2. The validation accepts `--risk 100` because it rejects only values above 100. 3. The calculator sets the risk amount to the full `$10,000` account balance. 4. The narrow stop distance produces a position of 10 units with a nominal value of `$1,000,000`. 5. The program presents the result and merely displays a warning rather than refusing the unsafe calculation. ...[truncated 584 chars]
Remediation
View remediation
MAX_RISK_PERCENT: raise ValueError( f"Risk percent must be greater than 0 and no more than " f"{MAX_RISK_PERCENT}" ) ``` 2. Preserve the conservative default of 1% and clearly identify 1–2% as the recommended range. 3. Reject position values greater than the available account balance unless the caller explicitly enables and configures leverage. 4. If leverage is supported, require a separate leverage parameter and calculate liquidation and margin constraints explicitly. 5. Convert allocation warnings into hard validation failures where the result violates the stated safety policy. 6. Add unit tests for boundary values including 0%, 1%, 2%, 3%, values just above 3%, and 100%. 7. Add tests covering narrow stop-loss distances and positions exceeding the account balance. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/technical_analysis.py:101
Finding

Invalid MACD Calculation Is Presented as Actionable Trading Analysis

Content
View full analysis
signal_line else "Bearish" print(f" MACD: {macd_line:.2f} ({macd_status})") print(f" Signal: {signal_line:.2f}") print(f" Histogram: {histogram:.2f}") ``` ### Technical Analysis A valid MACD signal line is the EMA, normally over nine periods, of a historical MACD series. The implementation instead assigns the current MACD value directly to the signal line. Consequently: - `signal_line` always equals `macd_line`. - `histogram` is always zero. - The displayed comparison `macd_line > signal_line` is always false, causing every available MACD result to be labeled `Bearish`. - Later crossover checks cannot accurately detect bullish or bearish crossovers. The implementation acknowledges that it is an approximation but exposes the value as a normal trading indicator without a user-visible warning. This conflicts with the formula documented in `references/indicators.md:73-79`. The defect does not provide code execution or system access. Its risk arises because the skill is designed to influence trading research and recommendations, and the invalid result is presented as actionable analysis. ### Attack Path 1. A caller runs technical analysis against any supported symbol or supplies a valid kline JSON file: ```bash python3 scr ...[truncated 1256 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
references/binance-api.md:333
Finding

Unpinned Third-Party Package Installation Guidance

Content
View full analysis
Remediation
View remediation
``` 4. Generate and verify cryptographic hashes, for example through a hash-locked requirements file. 5. Lock and review all transitive dependencies. 6. Install dependencies in an isolated virtual environment with minimal privileges. 7. Use an approved package index or internal artifact mirror. 8. Add automated dependency vulnerability and provenance scanning to the release process. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (15)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The supplied code accurately supports only a subset of the declared description: Binance crypto market data retrieval and basic display of public market information. It does not implement research logic, technical analysis indicators, planning tools, position management, whale tracking, or any trading execution/management features. Because the declared purpose presents a substantially broader trading research and position-management capability than the code actually provides, this is a description-behavior mismatch.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill explicitly recommends using a VPN to bypass Binance geo-restrictions, which encourages circumvention of legal, regulatory, or platform-imposed access controls. This is dangerous because it normalizes evasion behavior and could expose users to account sanctions, compliance violations, or use of services in prohibited jurisdictions.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
88% confidence
Finding

Documenting a direct cancel-order endpoint inside a research skill exposes a high-risk action that can alter a user's trading state if invoked with supplied parameters and credentials. In an agent context, parameterized destructive operations are especially dangerous because small prompt or tool misuse can cancel legitimate protective or profit-taking orders.

Content

Scanner excerpt · references/binance-api.md (reported line 180)May include surrounding context.

Cancel Order

text
DELETE /api/v3/order

Weight: 1

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
94% confidence
Finding

The cancel-all-open-orders endpoint is a bulk destructive operation with potentially severe consequences, including removal of all protective stops and strategic orders for a symbol. Within a research-oriented skill, exposing this operation is especially risky because it is unrelated to passive analysis yet easy to misuse or trigger accidentally.

Content

Scanner excerpt · references/binance-api.md (reported line 192)May include surrounding context.

Cancel All Open Orders

text
DELETE /api/v3/openOrders?symbol=BTCUSDT&timestamp=<timestamp>&signature=<signature>

Weight: 1

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill documents network access to Binance and file reads from a references/ directory, but it does not declare an explicit tool scope such as allowed-tools or permissions. That creates an authorization gap where the runtime may permit broader tool use than users or reviewers expect, reducing transparency and making misuse or accidental overreach harder to detect.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The activation text is very broad and can trigger on many generic trading or crypto-related questions, increasing the chance the skill is invoked in contexts the user did not intend. Over-broad invocation can cause unnecessary network access, over-collection of market data, or unreviewed financial guidance being surfaced when a narrower skill or plain response would have been safer.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The reference file materially expands a research-oriented skill into authenticated account access, live order placement, and order cancellation. In an agent setting, documenting these capabilities increases the chance the skill is used for real trading actions beyond user-safe research, especially if downstream prompts or tools expose API credentials.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The file includes direct guidance for account queries, order placement, and order cancellation, which is not clearly justified by the stated research-only purpose. This creates dangerous capability drift: an LLM agent meant to analyze markets may instead assist with or normalize high-risk live account operations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The order placement and cancellation examples present real production endpoints and parameters without any explicit warning that they can trigger irreversible market actions. In practice, this can cause users or agent implementations to treat the examples as safe templates, leading to accidental trades or mass cancellation of open positions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The Python sample demonstrates authenticated account access and live order submission against the production Binance API, making operational misuse straightforward. Because it is copy-pastable and lacks safety guardrails, an agent or user could quickly adapt it to perform unauthorized or accidental trading actions with real credentials.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file contains explicit bullish/bearish and buy/sell trading signals without a prominent disclaimer that the material is educational and not financial advice, and without reminding users of capital-loss risk. In a trading-research skill, such phrasing can be surfaced as actionable guidance and may encourage users to treat heuristic indicators as recommendations.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/indicators.md (reported line 285)May include surrounding context.

md
1. **Using too many indicators**: Leads to analysis paralysis
2. **Ignoring price action**: Indicators lag price
3. **Trading against the trend**: Indicator signals in wrong direction
4. **No confirmation**: Acting on single indicator signal
5. **Wrong timeframe**: Using day-trading indicators for swing trading
6. **Ignoring volume**: Volume confirms price moves
7. **Over-optimizing**: Finding perfect settings for past data

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This file provides detailed trading strategies, entry/exit rules, position sizing, and risk guidance that a user could reasonably treat as actionable financial advice, yet it does not include a prominent warning that the content is educational only and can lead to monetary loss. In the context of a trading-research skill, this is more dangerous because the skill is explicitly designed to answer crypto trading questions, increasing the likelihood that users will rely on it for real-money decisions in a highly volatile market.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

This code makes HTTP requests to an external service via request.urlopen, which is a safety-relevant operation for code files under the missing-warning rule. Although the script logs progress and errors, it does not explicitly disclose that it contacts Binance over the network or that runtime metadata such as the caller's IP and request details will be transmitted.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

This code performs an outbound HTTP request to Binance when no input file is provided. Although the function names and comments imply fetching data, there is no runtime notice to the user at the point of execution indicating that network access will occur.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.