Skip to content

Ignore .env files in .gitignore - #35

Open
Gandy2025 wants to merge 1 commit into
mainfrom
fix/gitignore-dotenv
Open

Ignore .env files in .gitignore#35
Gandy2025 wants to merge 1 commit into
mainfrom
fix/gitignore-dotenv

Conversation

@Gandy2025

Copy link
Copy Markdown
Contributor

What

Append an environment/secrets block to the repo-root .gitignore:

.env
.env.*
!.env.example

Why

Fixes the sole finding from the 2026-07-09 production readiness scan
(score 96/100, tier Launch-ready): [Minor · confirmed] .env is not
ignored in .gitignore
— dimension Secrets & Credentials.

Nothing is leaked today (no tracked .env exists), but without this a
future git add . could commit a .env holding real credentials. The
!.env.example negation is harmless future-proofing so a template can be
committed later.

Machine-readable findings: https://report.first-tree.ai/agent-team-foundation-launch-readiness-scan-20260709-e22635db.json

Verification

$ git check-ignore .env
.env

$ git check-ignore .env.local     # matched by .env.*
.env.local

$ git check-ignore .env.example   # negation → NOT ignored (exit 1)
$ echo $?
1

.env and .env.* are now ignored; .env.example remains committable.
Only .gitignore is changed (6 insertions).

Add .env / .env.* to .gitignore (with an !.env.example negation so a
template can still be committed later). Nothing is leaked today — no
tracked .env exists — but this prevents a future `git add .` from
committing real credentials.

Fixes the sole minor finding (Secrets & Credentials) from the
2026-07-09 production readiness scan.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

2 participants