Skip to content

Ignore env and all .env variants - #174

Merged
NardinNakhla merged 1 commit into
mainfrom
fix/gitignore-env-files
Oct 21, 2026
Merged

NardinNakhla merged 1 commit into
mainfrom
fix/gitignore-env-files

Conversation

@NardinNakhla

Copy link
Copy Markdown
Collaborator

Why

On Oct 19, a file named env containing production secrets was committed to this public repo. Google flagged the leaked API key the same day. .gitignore only listed specific .env names, so nothing stopped it.

Change

Adds two rules to .gitignore:

  • env
  • .env*, which covers .env, .env.local, .env.production and similar

No tracked files match either pattern, so nothing currently in the repo is affected. .dockerignore already excludes both.

Not covered here

Ignoring the file doesn't undo the leak. The leaked keys still need to be rotated or revoked.

🤖 Generated with Claude Code

A file named env containing production API keys and the database
password was committed to this public repo on 2026-10-19, because only
specific .env names were ignored. Ignore env and every .env* file so
neither can be committed again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@NardinNakhla
NardinNakhla merged commit 456ab5b into main Oct 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant