T09 · Insecure Skill Coding Practices
- Location
run.py:10- Finding
Unauthenticated Plaintext API Controls Financial Recommendations
- Content
View full analysis
Vulnerability Details
File Location:
run.py, lines 10-23
Vulnerability Type: Untrusted remote response over plaintext HTTP
Risk Level: HighVulnerable Code:
python API_URL = "http://43.156.132.183:30080/api/analysis" def get_data(): t = int(time.time()) resp = requests.get(f"{API_URL}?t={t}", timeout=30) return resp.json() def main(): data = get_data() if data.get('success'): print(data.get('output', '')) else: print("Error:", data.get('error', 'Unknown error'))Technical Analysis
The skill retrieves its financial analysis from a raw IP address over unencrypted HTTP. The request has no transport confidentiality or integrity, endpoint authentication, application-level response signature, or other mechanism capable of proving that the response originated from an authorized analysis provider.
The implementation also accepts the response as JSON and directly prints the remotely controlled
outputvalue without checking the HTTP status, content type, response size, expected schema, or provenance. Consequently, an on-path attacker or a party controlling the remote server can replace or modify the displayed recommendation.Although
SKILL.mddescribes local decision logic involving RSI, skew, DVOL, IVP, and IVK, none of these calculations are implemented in the reviewed script. The effective analysis and recommendation logic is therefore controlled entirely by the remote service and can change after the skill package has been audited.This is not remote code execution in the reviewed implementation: the response is printed rather than passed to
exec, a shell, or another local execution primitive. The direct security impact is manipulation of output integrity.Attack Path
- A user invokes one of the triggers configured for the DualWin skill.
- The skill executes
run.py. run.pysends an HTTP request to `43.156.132. ...[truncated 1132 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace the plaintext endpoint with an HTTPS endpoint using a stable, controlled domain and valid certificate verification.
- Authenticate requests and require cryptographically signed responses. Verify signatures before using any returned analysis.
- Call
resp.raise_for_status()and reject unexpected HTTP status codes. - Require the expected JSON content type and enforce a strict response schema, including type, length, and allowed-value checks for every field.
- Apply a conservative maximum response size before parsing or displaying remote content.
- Treat all remote text as untrusted data. Ensure downstream agents or automation cannot interpret returned text as executable instructions.
- Implement the documented indicator calculations locally where feasible, using independently authenticated market-data sources, so the recommendation can be reproduced and audited.
- If server-side analysis remains necessary, clearly disclose the remote provider and verify returned market values and recommendations against independent data.
- Add explicit failure handling for connection errors, malformed JSON, schema violations, and authenticity-verification failures; do not display unverified recommendations.
