fix: remove committed .env.dev and close the .gitignore gap - #46
Merged
Conversation
.env.dev was tracked in a public repository. .gitignore already excluded .env, .env.prod and .env.test; .env.dev was simply missed, so it was committed with real values rather than the placeholders in .env.sample. Contains a MongoDB password, a JWT signing secret and a BTCPay private credential. Removing the file from HEAD does not remove it from history — these values must be treated as disclosed and rotated. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ThreatCrush Security Scan2 finding(s) HIGH/CRITICAL: 2
Snippets are redacted; ThreatCrush never prints matched credential material. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
Removes
.env.devfrom version control and adds it to.gitignore.Why
.env.devwas tracked in this public repository..gitignorealreadyexcluded
.env,.env.prodand.env.test—.env.devwas simply missed, soit was committed carrying real values instead of the placeholders that
.env.sampledocuments.Found by the ThreatCrush scan added in the CI rollout.
Credentials involved
MONGO_URI/MONGO_INITDB_ROOT_PASSWORDmongoserviceJWT_SECRETBTCPAY_PRIVATEMAILGUN_*Values are deliberately not reproduced here.
This does not un-disclose them
Deleting the file from
HEADleaves it in git history, and the repository ispublic. These values should be treated as disclosed and rotated —
particularly
BTCPAY_PRIVATE, which is a payment credential. Rotation is theonly fix that actually closes this; the commit only stops it getting worse.
Verification
git ls-files .env.devreturns nothing after this change..env.sampleremains as the documented template..env.devother than as a local dev convention.