T09 · Insecure Skill Coding Practices
- Location
SKILL.md:161- Finding
Caller-Controlled Gateway URL Can Exfiltrate API Credentials and Sensitive Payloads
- Content
View full analysis
dict: """Execute a tool on the GreenHelix gateway.""" resp = self.session.post( f"{self.base_url}/v1", json={"tool": tool, "input": input_data}, ) if resp.status_code == 402: raise BudgetExhaustedError( f"Agent {self.agent_id} budget exceeded: {resp.text}" ) resp.raise_for_status() return resp.json() ``` The same pattern is repeated by the database, billing, and dispute clients. ### Technical Analysis The client installs the bearer credential into a persistent `requests.Session`, but accepts an arbitrary `base_url` without validating its scheme or hostname. Consequently, the credential and every tool payload are sent to whichever endpoint the caller supplies. This is especially sensitive because payloads may contain repository contents, SQL statements and query parameters, customer names and email addresses, payment identifiers, invoice information, and dispute evidence. The implementation also permits an `http://` URL, allowing the bearer credential and payload to be transmitted without transport encryption. Sending authenticated requests to the declared GreenHelix API is necessary for the guide's stated integration functionality. Allowing unrestricted replacement of the credential-bearing destination is not necessary and exceeds a safe minimum-trust design. ### Attack Path 1. An attacker infl ...[truncated 983 chars]- Remediation
View remediation
