T09 · Insecure Skill Coding Practices
- Location
SKILL.md:104- Finding
Bearer Credential Disclosure Through an Unrestricted API Endpoint Override
- Content
View full analysis
dict: """Execute a GreenHelix tool via the GreenHelix REST API.""" response = session.post( f"{GATEWAY_URL}/v1", json={"tool": tool, "input": params}, timeout=30, ) response.raise_for_status() return response.json() ``` ### Technical Analysis The destination receiving the `GREENHELIX_API_KEY` is controlled by the `GREENHELIX_API_URL` environment variable. No hostname allowlist, URL scheme validation, certificate pinning, or separation between sandbox and production credentials is applied before the shared session sends the bearer token. If a deployment configuration, CI variable, shell environment, container configuration, or orchestration manifest can be modified, an attacker can set `GREENHELIX_API_URL` to an HTTPS server under their control. Every subsequent call to `execute()` will send the real bearer credential in the `Authorization` header to that server. Although environment-variable endpoint configuration is common, combining an unrestricted endpoint override with automatic attachment of a write-capable bearer credential creates a credential-exfiltration sink. The skill metadata explicitly describes `GREENHELIX_API_KEY` as having read/write access to purchased API tools, increasing the potential impact of disclosure. ### Attack Path 1. The victim stores a valid `GREENHELIX_API_KEY` in the runtime environment. 2. The attacker gains the ability to influence deployment configuratio ...[truncated 1194 chars]- Remediation
View remediation
