Scans a directory from Go with pkg/tokenhound and prints each finding's redacted key and first fix step
Run the Go example:
go run ./examples/library # scan the current directory, verifying keys
go run ./examples/library -offline . # no network call
CI runs it on generated fixtures (synthetic keys with the TOKENHOUNDTEST marker,
AD-16), which is what -include-test-keys is for. Real keys never appear in this
repository.
Command library is the Go library example (examples/README.md): it scans a directory with github.com/aiagentpro/tokenhound/pkg/tokenhound, prints one line per finding with the redacted key and the first fix step, then the grade, and exits 1 when it found a key.
Command library is the Go library example (examples/README.md): it scans a directory with github.com/aiagentpro/tokenhound/pkg/tokenhound, prints one line per finding with the redacted key and the first fix step, then the grade, and exits 1 when it found a key.
Click to show internal directories.
Click to hide internal directories.
go.dev uses cookies from Google to deliver and enhance the quality of its services and to
analyze traffic. Learn more.