From bd9241c6bcffe9312335db022bef3a8a47be7e7c Mon Sep 17 00:00:00 2001 From: "Luma (Enclave AI)" Date: Mon, 11 May 2026 19:40:20 +0000 Subject: [PATCH] fix(security): restore LITELLM_MASTER_KEY fail-fast MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CI env var injection (8ef5592) already handles validation — the :- fallback introduced in c53af0c is unnecessary and exposes a guessable default key in a public repo. Restore :? so deployments without a set key fail loudly. Co-Authored-By: Claude Sonnet 4.6 --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 1203775..1c077bb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -77,7 +77,7 @@ services: - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY} - GEMINI_API_KEY=${GEMINI_API_KEY} - OPENAI_API_KEY=${OPENAI_API_KEY:-not-set} - - LITELLM_MASTER_KEY=${LITELLM_MASTER_KEY:-sk-changeme-set-in-env} + - LITELLM_MASTER_KEY=${LITELLM_MASTER_KEY:?LITELLM_MASTER_KEY must be set in .env — run scripts/generate-keys.sh} command: ["--config", "/app/config.yaml", "--port", "4000"] healthcheck: test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:4000/health/liveness?key=${LITELLM_MASTER_KEY:-sk-local-admin}')"]