Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-privacy-scanner

git-privacy-scanner — public release gate for Git

Scan a Git repository for privacy and security risks before publishing it.

git-privacy-scanner checks both the current working tree and Git history so a deleted secret does not remain silently recoverable from an old commit. Findings are fingerprinted instead of echoed back, which keeps scan logs from becoming a second leak.

Release gate

git-privacy-scanner architecture

What it catches

  • Common API keys, bearer tokens, private-key blocks and secret assignments
  • Personal email addresses in files and commit metadata
  • Phone-number-shaped PII
  • macOS user-directory paths
  • Private RFC1918 IP addresses
  • Risky files such as environment files, database dumps, private keys and logs
  • Sensitive strings embedded inside binary metadata
  • Secrets or PII that were committed and later deleted
  • History scans that exceed the configured safety limit

GitHub noreply addresses and documentation-only example domains are allowed.

Install

Run: python3 -m pip install .

Direct use: PYTHONPATH=src python3 -m git_privacy_scanner.cli /path/to/repo

For CI, add --json and treat exit code 1 as a publishing blocker.

The JSON report contains rule names, severity, locations and SHA-256 fingerprints. It intentionally does not print the raw matched secret or PII value.

Scope

This tool is a strong release gate, not a proof that a repository contains no sensitive information. Review final staged files manually and use synthetic data for demos. Fresh public history is preferable when a private production repository has years of mixed operational data.

About

Scan Git repositories for secrets, PII, private files, local paths and risky commit history before publishing.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages