Repository navigation
Add secret + git-hygiene scanning (v1.1.0) - #2
Merged
Merged
Conversation
Expand leakguard from an identity/topology gate into a full secret + git-hygiene scanner while keeping it deterministic, zero-network, and zero-dependency. - 30+ provider secret rules (ported from gitleaks) + connection-string creds + sensitive-filename detection, in a new detectors.py. - entropy + generic key=value heuristics as non-blocking audit warnings. - baseline workflow (.leakguard-baseline.json, hashes only) with `--report` triage; commit-msg gate; large-file tripwire; .gitignore completeness check. - pre-commit framework support via .pre-commit-hooks.yaml. High-precision blocking (keyword pre-filter + allowlists + placeholder denylist), findings masked so a raw secret is never printed. Tests 14 -> 59.
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.
Summary
detectors.py: 30+ provider secret rules (ported from gitleaks), connection-string creds (incl. no-usernameredis://:pass@), and sensitive-filename detection — with a keyword pre-filter, allowlist layer, and placeholder denylist. Findings are masked (raw secret never printed).baseline(accept a repo's existing leaks, block only new ones; hashes only,--reporttriage),commit-msggate, large-file tripwire,.gitignorecompleteness check, and entropy/generickey=valueheuristics as non-blockingauditwarnings..pre-commit-hooks.yamlfor install via the pre-commit framework.Test plan
pytest -q— 59 tests pass (was 14)leakguard ci --base mainself-scan clean on this PR.env.example, AWSEXAMPLE,pk_publishable, placeholder values, public certs do not