Rules / CFG065
CFG065 Continue config has a hardcoded inline apiKey
Severity: error
OWASP: LLM02:2026 – Sensitive Information Disclosure
What cfgaudit checks
Continue's config.yaml configures model providers and MCP servers, each of which can carry an inline apiKey. A committed .continue/config.yaml with a real key literal leaks that credential to anyone with repo access.
cfgaudit flags a hardcoded apiKey literal on:
- a
models[]entry (provider credential), and - a remote
mcpServers[]entry (sse / streamable-http server credential)
in .continue/config.yaml (project) and ~/.continue/config.yaml (with --user).
Not flagged
Continue's reference syntax is the safe pattern and does not fire: ${{ secrets.NAME }} / ${{ inputs.NAME }} templates, an $ENV-style reference, the continue-proxy provider's apiKeyLocation, and obvious placeholders (YOUR_API_KEY, <...>, changeme, …). Values under 8 characters are ignored.
Trigger example
models:
- name: gpt
provider: openai
apiKey: sk-proj-AbCdEf0123456789
→ error.
Safe alternative
models:
- name: gpt
provider: openai
apiKey: ${{ secrets.OPENAI_API_KEY }}
References
- CFG007 (hardcoded secret in a Claude Code
envblock), CFG050 / CFG054 (secrets in MCPenv/headers) — related credential-exposure rules - Continue config reference
Documentation for cfgaudit 1.18.1. Source of this page · Rule implementation