T09 · Insecure Skill Coding Practices
Error
- Location
- scripts/fetch-plan.sh:4
- Finding
- API Credential Disclosure to an Unrestricted Network Endpoint## Vulnerability Details **File Location**: `scripts/fetch-plan.sh:4-11`; equivalent behavior occurs in `scripts/fetch-status.sh:4-11` **Vulnerability Type**: Unrestricted transmission of sensitive credentials **Risk Level**: High ### Vulnerable Code `scripts/fetch-plan.sh:4-11`: ```bash : "${LLMSIGNAL_BASE_URL:?Missing LLMSIGNAL_BASE_URL}" : "${LLMSIGNAL_SITE_ID:?Missing LLMSIGNAL_SITE_ID}" : "${LLMSIGNAL_API_KEY:?Missing LLMSIGNAL_API_KEY}" curl -sS -X POST "${LLMSIGNAL_BASE_URL%/}/api/agent/v1/plan" \ -H "Content-Type: application/json" \ -H "X-LLMSIGNAL-KEY: ${LLMSIGNAL_API_KEY}" \ -d "{\"siteId\":\"${LLMSIGNAL_SITE_ID}\",\"apiKey\":\"${LLMSIGNAL_API_KEY}\",\"persist\":true}" ``` `scripts/fetch-status.sh:4-11`: ```bash : "${LLMSIGNAL_BASE_URL:?Missing LLMSIGNAL_BASE_URL}" : "${LLMSIGNAL_SITE_ID:?Missing LLMSIGNAL_SITE_ID}" : "${LLMSIGNAL_API_KEY:?Missing LLMSIGNAL_API_KEY}" curl -sS -X POST "${LLMSIGNAL_BASE_URL%/}/api/agent/v1/status" \ -H "Content-Type: application/json" \ -H "X-LLMSIGNAL-KEY: ${LLMSIGNAL_API_KEY}" \ -d "{\"siteId\":\"${LLMSIGNAL_SITE_ID}\",\"apiKey\":\"${LLMSIGNAL_API_KEY}\"}" ``` ### Technical Analysis Both scripts use the runtime-controlled `LLMSIGNAL_BASE_URL` directly as the destination for authenticated network requests. They do not enforce HTTPS, verify that the hostname belongs to LLM Signal, restrict ports, or explicitly prohibit redirects. The API key is sent twice: once in the `X-LLMSIGNAL-KEY` authentication header and again in the JSON request body. Including the key in the body is not necessary when header authentication is already used and increases exposure to HTTP body logging, reverse proxies, tracing systems, and server-side diagnostics. The network access itself is necessary for the declared hosted GEO workflow. However, permitting an arbitrary destination and transmitting the secret redundantly exceed the minimum privileges needed for that f ...[truncated 1046 chars]
- Remediation
- ## Remediation Suggestions 1. Enforce an HTTPS URL and a strict hostname allowlist before sending credentials. If self-hosting must be supported, require administrators to configure an explicit allowlist rather than accepting any URL. 2. Reject URL user information, unexpected ports, non-HTTPS schemes, malformed hosts, and loopback or private destinations unless explicitly required. 3. Disable redirects or validate every redirect destination: ```bash curl --proto '=https' --tlsv1.2 --max-redirs 0 ... ``` 4. Send the API key only in the authentication header. Remove the `apiKey` property from both JSON payloads and request templates. 5. Keep normal TLS certificate verification enabled and document that disabling certificate validation is unsupported. 6. Use a narrowly scoped, revocable API credential and rotate any credential that may have been sent to an untrusted destination. 7. Avoid logging command arguments, headers, environment variables, or request bodies containing secrets.
