T09 · Insecure Skill Coding Practices
- Location
SKILL.md:122- Finding
Configurable API Origin Can Exfiltrate the GreenHelix Bearer Credential
- Content
View full analysis
dict: """Execute a single tool on the gateway.""" resp = self.session.post( f"{GATEWAY_URL}/v1", json={"tool": tool, "input": input_data}, timeout=30, ) ``` ### Technical Analysis The destination of every authenticated request is controlled by the `GREENHELIX_API_URL` environment variable. The client places the GreenHelix API key in the session-wide `Authorization` header and then sends that header to the configured origin without validating its scheme or hostname. Environment variables may be modified by deployment configuration, parent processes, compromised build pipelines, container configuration, or another component sharing the runtime environment. If `GREENHELIX_API_URL` points to an attacker-controlled origin, the example transmits the bearer credential directly to that origin. A session-wide authorization header also creates redirect-related risk. Unless redirects are explicitly disabled or constrained, an unexpected redirect could cause credentials or authenticated request context to reach an unintended endpoint, depending on the HTTP client’s redirect behavior and destination relationship. This outbound authentication is necessary for authenticated GreenHelix operations, but allowing an a ...[truncated 1163 chars]- Remediation
View remediation
