T09 · Insecure Skill Coding Practices
- Location
trade_client.py:15- Finding
Unauthenticated Cleartext WebSocket Trading Protocol
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a coherent trading client, but it exposes high-impact marketplace actions with weak transport and authorization safeguards.
Review before installing or using against a real marketplace. Use only a trusted Hub endpoint, prefer wss:// for remote connections, require server-side authentication and authorization for every state-changing message, and treat direct transaction creation as unsafe unless the Hub validates it from accepted bids or negotiations.
trade_client.py:15Unauthenticated Cleartext WebSocket Trading Protocol
The natural-language content of the skill, including the description and instructions, is presented in Chinese only. This can constitute a language policy violation when a skill effectively forces a specific language without user opt-in or an explicitly documented regional justification.
This markdown file documents operations such as listing_cancel, listing_cancel_batch, bid_accept, negotiation_accept, and transaction_create, which can change marketplace state or finalize transactions, but it does not include any user warning about irreversible or data-affecting consequences. Under the markdown variant of SQP-2, descriptions should warn when behavior could affect user data or system integrity.
This code establishes a WebSocket connection and later sends listing, bid, negotiation, and transaction data over the network, but the file provides no user-facing warning beyond a generic connection log. The docstrings describe functionality, but they do not disclose that user-supplied trade details and participant identifiers will be transmitted to an external service.
The client exposes a public method that can directly emit a transaction_create message with arbitrary buyer_id, seller_id, listing_id, and price. In a trading system, transaction creation should be derived server-side from validated bid/negotiation acceptance flows; allowing the client to initiate it directly enables forged or inconsistent transaction records if the server trusts client messages.
The docstring explicitly says transaction creation is 'internal use', but the method is publicly callable and sends the message over the websocket without access control, confirmation, or integrity checks. This mismatch increases the chance that downstream developers or agents will call it as a supported action, potentially creating fraudulent transaction entries or bypassing intended business workflow controls.
The file declares HUB_URL and the examples show connecting to a websocket server and sending listing, bid, negotiation, and transaction data, but the markdown does not warn users that business data will be transmitted over the network. For markdown files, networked behaviors that may affect privacy should be disclosed.
The module and class docstrings are written entirely in Chinese, and the skill does not indicate that language selection is configurable or that the locale restriction is intentional for a region-specific use case. Under the policy, forcing a specific language without opt-in can be a natural-language policy violation.