Getting Started
The current release is v0.2.0. Release archives exist for Linux and macOS, each on amd64 and arm64 (AArch64, including Apple silicon).
Prerequisites
Section titled “Prerequisites”- git. whac runs the
gitbinary for file lists that obey.gitignore, for staged changes and for history. - cue (optional). Rule authors use it to run
cue veton their.whac/layers.
Install a release
Section titled “Install a release”- Download the archive for your platform and
SHA256SUMSfrom the v0.2.0 release. The archive name iswhac_0.2.0_<os>_<arch>.tar.gz, for examplewhac_0.2.0_darwin_arm64.tar.gz. - Verify the checksum:
sha256sum --check --ignore-missing SHA256SUMS. On macOS, useshasum -a 256 --check --ignore-missing SHA256SUMS. - Verify the build provenance with GitHub CLI 2.49 or newer:
gh attestation verify whac_0.2.0_darwin_arm64.tar.gz --repo infrashift/whac-a-leak. - Extract the archive, and put
whacon yourPATH. - Run
whac version.
- Expected result: whac prints
whac v0.2.0with the commit and the build date.
Install with Go
Section titled “Install with Go”Run go install github.com/infrashift/whac-a-leak/cmd/whac@v0.2.0. This
needs Go 1.25 or newer.
Build from source
Section titled “Build from source”git clone https://github.com/infrashift/whac-a-leakcd whac-a-leakmake build # → bin/whacmake release # → dist/: archives for every platform and SHA256SUMSScan a directory
Section titled “Scan a directory”- Run
whac scan .in the directory to scan. - Read the findings. Each finding shows the severity, the rule ID, the location, the redacted secret and the fingerprint.
- Read the exit code:
0for no findings,1for findings.
- Expected result: whac prints the findings and a summary line.
To check commits before they happen, read Pre-commit Hook. To scan old commits, read Scanning Git History. To add your own rules, read Writing Rules. To suppress a false positive, read Allowlists & Fingerprints.
Audit an agent’s context
Section titled “Audit an agent’s context”Run whac scan --agent-context before an AI agent starts. See
Agent-Context Preflight.
Exit codes:
| Code | Meaning |
|---|---|
0 |
No findings |
1 |
One or more findings |
2 |
Error: bad configuration, failed rule sample, or I/O error |