How shatakshi192007-sketch/gitaudit works
GitAudit is a local pre-commit credential scanner. A commit-triggered run gets staged paths and added-line diffs from Git, scans those lines against credential signatures, then exits with a pass or failure status so insecure commits can be blocked. The README also describes Git-hook integration and cross-platform UTF-8 handling; the hook itself is not present in the supplied tree, so it is represented only as a documented trigger. The graph follows the sampled runtime code and README; no separate storage layer exists.
Main entry points: main.py Audit runner · git_helper.py Git diff helper · scanner.py Regex scanner
Components 6
Scan orchestration
- Audit runner
main.py - Commit status
main.py
Staged Git changes
- Git diff helper
core/git_helper.py
Credential detection
- Regex scanner
scanner.py
Other components
- Commit attempt
- Git CLI
Connections 8
- Commit attempt → Audit runner: triggers scan
README.md - Audit runner → Git diff helper: gets staged files
main.py - Audit runner → Git diff helper: gets staged diff
main.py - Git diff helper → Git CLI: runs diff
core/git_helper.py - Audit runner → Regex scanner: scans added lines
main.py - Regex scanner → Audit runner: returns findings
main.py - Audit runner → Commit status: sets exit status
main.py - Commit status → Commit attempt: blocks on leaks
README.md