Back to browse
GitHub Repository

LLM friendly git hooks to avoid leaking keys and pii

1 starsPython

Git Shield – local hooks for secrets and PII

by veke87·May 1, 2026·2 points·0 comments

AI Analysis

●●SolidSolve My ProblemCozy

Blocks PII at push time when gitleaks alone would miss it.

Strengths
  • Combines regex secret scanning with contextual LLM-based PII detection.
  • Runs entirely locally; no code leaves the machine during scans.
  • Outputs line numbers and instructions specifically formatted for LLM agents.
Weaknesses
  • No native Windows support; requires WSL which limits enterprise adoption.
  • Heavy PII scanning at push time may slow down workflows without GPU.
Target Audience

Developers using AI coding assistants or handling sensitive data

Similar To

gitleaks · Talisman · GitGuardian

Post Description

I made this after worrying that AI coding sessions, copied logs, or quick test fixtures could leak real data into a repo.

Git Shield installs pre-commit/pre-push hooks. It uses gitleaks for secrets and OpenAI Privacy Filter for contextual PII in outgoing diff additions. Everything runs locally; code is not sent to a service.

The current tradeoff is: fast secret scan at commit time, heavier PII scan at push time. It supports Linux, macOS, and WSL, with CPU fallback for small diffs.

Repo: https://github.com/vekexasia/git-shield

The tool is made for crankers so output contains both line numbers and clear instructions for llms to follow. Most of the times the agent ask me what to do but was able to automatically ignore some false positives.

Similar Projects