Filed by the SaaS launch review. Priority P0.1 — severity critical, category security.
Problem
.gitignore covers .env, .env.local and .env.staging but not .env.production, while .env.production.example instructs operators to copy it and fill in ANTHROPIC_API_KEY + AUTH_SECRET, and deploy.yml writes the real file inside the production git checkout. Any git add -A publishes live keys and the JWT signing secret to a public AGPL repo; git clean -fd on the server deletes the live env file.
Evidence
.gitignore:62
.env.production.example:2
.github/workflows/deploy.yml:412
verified: git check-ignore .env.production exits 1 (no match)
Acceptance criteria
Atomic by construction: one developer, one focused session.
Problem
.gitignore covers .env, .env.local and .env.staging but not .env.production, while .env.production.example instructs operators to copy it and fill in ANTHROPIC_API_KEY + AUTH_SECRET, and deploy.yml writes the real file inside the production git checkout. Any
git add -Apublishes live keys and the JWT signing secret to a public AGPL repo;git clean -fdon the server deletes the live env file.Evidence
.gitignore:62.env.production.example:2.github/workflows/deploy.yml:412verified:git check-ignore .env.productionexits 1 (no match)Acceptance criteria
git check-ignore .env.productionmatches, preferably via.env*with!.env*.exampleAtomic by construction: one developer, one focused session.