Skip to content

Repo hygiene: secret gitignore patterns + gitleaks pre-commit#19

Open
akan72 wants to merge 1 commit into
mainfrom
akan72/repo-hygiene
Open

Repo hygiene: secret gitignore patterns + gitleaks pre-commit#19
akan72 wants to merge 1 commit into
mainfrom
akan72/repo-hygiene

Conversation

@akan72
Copy link
Copy Markdown
Owner

@akan72 akan72 commented May 29, 2026

Summary

Branch 7: repo hygiene + secret-scanning.

  • .gitignore: block *.pem, *.key, .env, .env.*, credentials.json, *.secret
  • Add .pre-commit-config.yaml with the gitleaks hook (pinned v8.30.1) for secret detection before commit
  • Gitignore Brewfile.lock.json — it records per-machine/arch bottle hashes and isn't portable, so it isn't useful to track for reproducibility on new machines

Why & alternatives (from explanations.txt — Branch 7)

Change Why Alternatives
Add secret patterns to .gitignore Catch accidental commits of .env, *.pem, etc. before they hit remote. Use a global gitignore (~/.config/git/ignore).
Add gitleaks pre-commit hook Scans commits for high-entropy strings (tokens/keys) before push. Defense in depth on top of .gitignore. detect-secrets (Yelp); GitHub secret scanning (server-side, after push).
Brewfile.lock.json Decision: gitignore. It pins exact versions but isn't a portable lockfile that helps reproduce on new machines. Commit it to pin versions (accepted version drift instead).

- .gitignore: block *.pem, *.key, .env, .env.*, credentials.json, *.secret
  from ever being committed
- Add .pre-commit-config.yaml with the gitleaks hook (pinned v8.30.1) for
  secret scanning before commit
- Gitignore Brewfile.lock.json (records per-machine/arch bottle hashes; not
  portable, so not useful to track for reproducibility)
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