🛡️ SafeGuardian
Privacy-First Pre-Push Security Scanner for Developers
THE PROBLEM

Every developer has done it — pushed a .env file, committed an API key, or accidentally included offensive content in a variable name or comment. GitHub flags it, your account gets restricted, and the secret is now public forever.

THE SOLUTION

SafeGuardian intercepts your git push before it happens. Runs entirely offline. Zero data leaves your machine.

HOW IT WORKS

You run: git push
              ↓
    SafeGuardian scans staged files
              ↓
    ┌─────────────────────────┐
    │  Secrets?   → BLOCK     │
    │  Bad words? → BLOCK     │
    │  .env file? → BLOCK     │
    │  All clean? → ALLOW     │
    └─────────────────────────┘
              ↓
    Push goes through (or doesn't)
WHAT IT CATCHES

Category	Examples
🔐 API Keys & Secrets	OpenAI, AWS, GitHub, Stripe, Google, Slack tokens
🧬 High-Entropy Strings	Unknown secret formats detected by entropy analysis
📁 Sensitive Files	.env, id_rsa, credentials.json, .pem files
🚫 Explicit Content	Abusive language, hate speech, explicit keywords
🧹 Repo Hygiene	node_modules/ staged, files >5MB, missing .gitignore
RISK SCORING

Score	Level	Action
50+	🔴 HIGH	Push blocked
20–49	🟡 MEDIUM	Warning shown
0–19	🟢 LOW	Push allowed
SETUP — 2 COMMANDS

node safeGuardian/install.js   # installs git hook once
node safeGuardian/cli.js       # run manually anytime
After install, it runs automatically on every git push. No config needed.

KEY FACTS

100% offline — no API calls, no cloud, no data transmission
Works on any git repo — Node.js only, no extra dependencies
Configurable rules — edit JSON files to add your own patterns
Emergency bypass — git push --no-verify if you're sure
BUILT FOR

New developers learning git · Student projects · Startups · Anyone who's ever had their GitHub account flagged

