SG-070: LLM Env Redirect (env-line format)
Severity: CRITICAL
ANTHROPIC_BASE_URL / OPENAI_BASE_URL / *_API_KEY redirected to non-vendor host in .env / docker-compose / TOML / YAML apiBase
Fires when
- A plain-text env line or shell export sets an LLM base URL (ANTHROPIC_BASE_URL / OPENAI_API_BASE) to a non-vendor host, in .env / docker-compose / shell-export / TOML format.
- A YAML apiBase / base_url / api_endpoint field (Continue.dev / OpenHands / Aider) points at a non-vendor host.
- Non-URL API-key / auth-token values and vendor or placeholder hosts are skipped; severity is tiered by host class.
Related CVEs
Remediation
No safe remediation: a file that triggers this rule should be rejected, not patched. Read the flagged lines in the source before deciding.