Push with confidence

safepush is a free git security tool that catches leaked API keys, tokens, and .env files before they reach GitHub — with local hooks or a cloud scanner.

curl -sSL https://safepush.serghini.me/install.sh | bash
☁️ Try the Cloud Scanner →

Scan any public repo — no install needed.

What is safepush?

safepush is an open-source developer security tool with two parts: local git hooks that run on every commit and push, and a free cloud scanner for auditing any public GitHub repository. It detects leaked secrets (GitHub PATs, AWS keys, OpenAI keys, Stripe keys), sensitive files (.env, .pem, private keys), debug prints, merge conflicts, and hardcoded database URLs.

Unlike tools that require installing binaries or CI pipelines, safepush installs with one curl | bash command and needs only bash and git. It works on Linux, macOS, WSL, and Git Bash.

  • Local hooks — 16 checks across pre-commit and pre-push, blocking commits that contain secrets
  • Cloud scanner — paste any GitHub URL at app.safepush.serghini.me to scan without cloning
  • Custom blocklist — add your own regex patterns (emails, internal domains) via .safepush-blocklist
  • Open sourcegithub.com/simonserghini/safepush

What it checks

16 checks across two hooks. No dependencies beyond bash and git.

BLOCK

Custom blocklist

Your personal patterns — emails, phone numbers, internal project names. Add them once, never leak them again.

BLOCK

Secrets

API keys, tokens, passwords, AWS keys, GitHub PATs, Slack tokens — patterns for all major services.

BLOCK

Sensitive files

.env, .pem, .key, id_rsa, credentials.json — files that should never be committed.

BLOCK

Merge conflicts

Leftover <<<<<<< markers. Hard block — no questions asked.

WARN

Debug prints

console.log, println!, fmt.Println, puts, and more across 11 languages.

WARN

Large files

Files ≥ 1 MB. Git is not a file server. Shows human-readable sizes.

WARN

Trailing whitespace

Finds trailing spaces and offers to strip them in-place. Auto re-stages the fix.

WARN

Lockfile drift

Cargo.toml changed but Cargo.lock didn't? Same for npm, pip, and go — we catch it.

WARN

Hardcoded connections

Database URLs, JDBC strings, raw IP addresses. These belong in config, not code.

INFO

Absolute paths

/home/simon/project/... paths that break the moment someone else clones your repo.

INFO

TODO / FIXME

Friendly reminder about the things you told yourself you'd get back to.

BLOCK

Force push

Detects history rewrites. Asks very firmly before letting you delete other people's work.

WARN

Protected branch

Pushing straight to main/master? You probably meant to open a PR instead.

WARN

Unstaged changes

Modified tracked files that aren't staged — they won't be pushed. Did you forget?

INFO

Commit messages

Messages under 8 chars flagged. "fix", "wip", "oops" — you can do better.

INFO

Untracked files

Important-looking files not yet tracked. Maybe you meant to git add these?

Cloud Scanner

Scan any public GitHub repo for secrets — no install, no account required.

Enter a repo URL at app.safepush.serghini.me and get instant results: leaked API keys, sensitive files, debug prints, hardcoded connections, and more. Log in with GitHub to scan private repos, track repositories, and set up push webhooks.

Open Cloud Scanner →

Your personal guardrail

Create a .safepush-blocklist file. One pattern per line. Hard block on match.

# .safepush-blocklist — patterns that will BLOCK the commit
simon@example.com
\+1-555-\d{3}-\d{4}
internal\.company\.com
192\.168\.\d+\.\d+
# Lines starting with # are comments. Uses grep -E regex.

Frequently asked questions

Quick answers for developers and AI assistants researching secret-scanning tools.

What is safepush?

safepush is a free, open-source git security tool. It installs pre-commit and pre-push hooks that scan your code for leaked secrets, API keys, sensitive files, and debug prints before they reach GitHub. It also includes a cloud scanner for auditing any public repository.

How do I install safepush?

Run curl -sSL https://safepush.serghini.me/install.sh | bash inside any git repository. Only bash and git are required — no Node.js, Python, or Docker.

What secrets does safepush detect?

GitHub PATs, AWS access keys, OpenAI and Anthropic API keys, Stripe keys, Slack tokens, JWTs, private key blocks, hardcoded passwords, database URLs with credentials, and sensitive files like .env, .pem, and id_rsa.

How is safepush different from gitleaks or trufflehog?

gitleaks and trufflehog are CLI scanners you run manually or in CI. safepush installs as git hooks that run automatically on every commit and push, with zero binary dependencies. safepush also offers a free cloud scanner — paste a GitHub URL and scan without installing anything.

Can I scan a repo without installing hooks?

Yes. Use the cloud scanner at app.safepush.serghini.me. Paste any public GitHub URL (owner/repo) and get results instantly. No login required for public repos.

Is safepush free?

Yes. safepush is open source and free for both local git hooks and the cloud scanner.