Skip to content

chore: harden secret leak prevention#495

Merged
aly-obol merged 5 commits into
mainfrom
fix/gitignore-log-files
May 15, 2026
Merged

chore: harden secret leak prevention#495
aly-obol merged 5 commits into
mainfrom
fix/gitignore-log-files

Conversation

@aly-obol
Copy link
Copy Markdown
Contributor

@aly-obol aly-obol commented May 15, 2026

Summary

  • Add *.txt to .gitignore (with !**/templates/NOTES.txt exception for Helm charts) to prevent accidental commits of log/debug output files
  • Add custom gitleaks rules for HTTP Basic Auth and Authorization header patterns commonly found in Charon log output
  • Add gitleaks CI workflow (gitleaks.yml) to enforce secret scanning on PRs and pushes to main

Context

Gitleaks was already configured in .pre-commit-config.yaml (good), but:

  1. Pre-commit hooks only run if the developer has run pre-commit install locally
  2. There was no CI-side enforcement — a developer who skips pre-commit or doesn't have it installed could still push secrets
  3. .gitignore didn't block .txt files

This PR closes all three gaps.

Test plan

  • Verify *.txt files are ignored by git (except Helm NOTES.txt)
  • Verify gitleaks CI workflow runs on PRs
  • Verify custom rules catch Authorization=Basic <base64> patterns

- Add *.txt to .gitignore (with NOTES.txt exception for Helm charts)
  to prevent accidental commits of log/debug output files
- Add custom gitleaks rules for HTTP Basic Auth and Authorization
  header patterns in log output
- Add gitleaks CI workflow to enforce scanning on PRs and pushes

Prompted by an incident where a Charon log file containing a Basic Auth
header was accidentally committed.
Comment thread .github/workflows/gitleaks.yml Fixed
@aly-obol aly-obol merged commit 7aea4a7 into main May 15, 2026
7 checks passed
@aly-obol aly-obol deleted the fix/gitignore-log-files branch May 15, 2026 02:48
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.

3 participants