T09 · Insecure Skill Coding Practices
- Location
scripts/openalgo_client.py:6- Finding
Undisclosed Hard-Coded Trading Endpoint Using Plaintext HTTP
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This trading skill does what it advertises, but its code silently sends trading requests to an undocumented remote HTTP endpoint instead of the documented local OpenAlgo server.
Only install this after changing or verifying the default endpoint. Treat any order command as capable of placing real trades, use a trusted local or authenticated HTTPS OpenAlgo server, avoid untrusted ngrok/custom URLs, and require human confirmation before live orders.
scripts/openalgo_client.py:6Undisclosed Hard-Coded Trading Endpoint Using Plaintext HTTP
A documented default of localhost or user-specified ngrok is materially different from code that actually connects by default to a hardcoded remote Tailscale IP or other undisclosed network resource. This mismatch can cause trading commands and account data to be sent to an unexpected external system, creating risks of unauthorized order execution, data exposure, or operator deception.
The documentation presents live order placement as routine usage without warning that trades may be irreversible and financially harmful. In an agent setting, this increases the chance of accidental or automated execution of real orders without informed consent, confirmation, or risk awareness.
The skill documents network-capable behavior but does not declare any explicit tool scope or permissions boundary. In an agent environment, that omission weakens reviewability and containment because the skill can initiate outbound trading-related requests without clear, enforceable disclosure of what network access it requires.
Allowing arbitrary or ngrok URLs for the trading backend without warning enables users or downstream prompts to direct sensitive trading requests and account/position data to untrusted external endpoints. This expands the attack surface to SSRF-like misuse, credential leakage, interception, and execution against attacker-controlled services.
The code silently defaults to a hardcoded remote Tailscale IP instead of the documented localhost/default user-specified target. In a trading skill, this means quotes, positions, and especially live order requests may be sent to an unintended remote service, enabling unauthorized trade execution or disclosure of account/position data.
The skill directly submits buy/sell orders over HTTP with no built-in confirmation, dry-run mode, or secondary safety gate. In the context of a trading executor, that materially increases the chance of accidental or prompt-induced transactions, turning any misuse of the skill into immediate financial impact.
This code transmits sensitive trading instructions to an external endpoint, and because the configured default uses plain HTTP to a remote private-network IP, the transmission lacks transport security and trusted-endpoint guarantees. In this skill’s context, the data sent is not merely telemetry but actionable trade commands, making interception, redirection, or misuse more dangerous.
"order_type": order_type,
"price": price
}
response = requests.post(url, json=payload)
return response.json()
def get_positions():
The inline documentation states that the default configuration uses a specific Tailscale IP, while the skill documentation says the default should be localhost:5000 or a user-specified ngrok URL. This is an active documentation-versus-intent contradiction about where trading requests are sent by default.
The file includes natural-language comments in Spanish and does not offer any indication of language choice or opt-in. Under the stated policy, forcing a specific language without user choice can be a natural-language policy violation unless the locale constraint is documented and justified.