Back to skill

Security audit

anchored-vwap-scalper

Security checks for vulnerabilities and agentic risk

Overview

This is a real automated crypto-trading skill with live order capability, but its safety claims and controls are not clear or reliable enough for live funds without review.

Treat this as a Review item before installation. Use dry-run only unless you have independently tested the strategy, verified exchange order semantics, restricted the API key to the minimum trading permissions, removed withdrawal authority if possible, and are willing to risk the configured account collateral. Do not rely on the advertised 1% risk, daily loss, leverage, stop-loss, or take-profit claims without code fixes and live-exchange validation.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/strategy_engine.py:116
Finding

Protective Order Failures Can Leave Live Leveraged Positions Unprotected

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/strategy_engine.py:30
Finding

Declared Daily-Loss and Leverage Controls Are Not Enforced

Content
View full analysis
0: logging.info(f"🚀 BTC SIGNAL: {signal['strategy']} | {side.upper()} | AVWAP {avwap:.2f} | Price {current_price:.2f}") entry_order = self.place_order(side=side, order_type='market', amount=contracts) ``` The state saved after execution only updates the bar timestamp: ```python self.state["last_bar_ts"] = str(df['timestamp'].iloc[-1]) self._save_state() return signals ``` ### Technical Analysis The configuration declares a 3% daily-loss limit and leverage of 10, and the default state contains a `daily_pnl` field. However, the reviewed execution flow does not: - Retrieve authoritative realized and unrealized daily profit and loss. - Update `daily_pnl`. - Compare current losses against `daily_loss_limit`. - Reject new entries after the loss limit is reached. - Reset and reconcile the daily metric by trading day. - Set leverage through the exchange API. - Verify that ac ...[truncated 1720 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/strategy_engine.py:99
Finding

Minimum-Order Clamping Can Exceed the Intended Per-Trade Risk

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (8)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

This second mismatch finding likewise shows the skill claims anchored VWAP, four strategies, and explicit 1% risk controls, while the underlying behavior reportedly only loads credentials and initializes an exchange client. That is dangerous because users may enable the skill with live API keys under the false assumption that the advertised trading logic and safeguards are present, leading to unsafe or unintended operation.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

This second mismatch finding likewise shows the skill claims anchored VWAP, four strategies, and explicit 1% risk controls, while the underlying behavior reportedly only loads credentials and initializes an exchange client. That is dangerous because users may enable the skill with live API keys under the false assumption that the advertised trading logic and safeguards are present, leading to unsafe or unintended operation.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding

The skill declares required environment variables and appears to rely on file-writing/state persistence, but it does not declare an explicit tool scope such as permissions or allowed-tools. That creates a trust and review gap: operators may approve the skill without understanding it can access secrets or write local state, which is especially risky in a trading context handling private keys.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documentation is internally inconsistent about whether both fixed stop-loss and take-profit are provided or only fixed stop-loss. In an automated trading skill, inconsistent safety-control documentation can directly mislead operators about exit protections and materially change financial risk assumptions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code reads a private API key and account identifiers from environment variables, which is a sensitive operation covered by the missing-warning rule for code files. The file contains no confirmation prompt, logging, comment, or docstring disclosing that credentials are accessed, and the stated purpose is not documented in this file.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The code can place live market, stop, and take-profit orders when DRY_RUN is false, but it contains no in-code warning, safety acknowledgement, or confirmation barrier around that behavior. In a trading skill, this is dangerous because a user or integrator may enable live mode via environment variables and trigger real leveraged trades on a production exchange without realizing the file is capable of executing them directly.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documentation gives conflicting risk-control behavior: the metadata describes 'fixed SL + TP' while the body later states 'fixed SL only'. In an automated trading skill, inconsistent stop-loss/take-profit semantics can cause an operator to deploy the strategy under false assumptions about exit controls, increasing the chance of unmanaged positions or unexpected loss behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This code persists state to ../state/avwap_state.json, which is a file write affecting the local filesystem. There is no confirmation prompt, logging/print statement, or explanatory docstring/comment disclosing that the skill creates and updates a state file.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.