T09 · Insecure Skill Coding Practices
- Location
scripts/strategy_engine.py:116- Finding
Protective Order Failures Can Leave Live Leveraged Positions Unprotected
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
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.
scripts/strategy_engine.py:116Protective Order Failures Can Leave Live Leveraged Positions Unprotected
scripts/strategy_engine.py:30Declared Daily-Loss and Leverage Controls Are Not Enforced
scripts/strategy_engine.py:99Minimum-Order Clamping Can Exceed the Intended Per-Trade Risk
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.
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.
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.
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.
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.
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.
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.
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.
No suspicious patterns detected.