Expand description
sparrow hook install and sparrow hook scan commands.
The install subcommand installs a pre-commit hook via git config that
scans staged files for secrets, tokens, and other sensitive content before
each commit.
The scan subcommand performs a one-off scan of staged files (or the
entire working tree) for secrets and sensitive patterns.
Constants§
- PRE_
COMMIT_ HOOK_ SCRIPT - The shell script that is installed as a Git pre-commit hook.
It runs
sparrow hook scanto check staged files.
Functions§
- run_
hook_ install - Install the Sparrow pre-commit hook into the current git repository.
- run_
hook_ scan - Run a one-off scan of staged files (or the entire working tree if
scan_allis true) for secrets and sensitive patterns.