testkeys

command
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2026 License: Apache-2.0 Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command testkeys prints synthetic test keys generated from the embedded registry.

With no file arguments it prints "<detector-id> <key>" for every detector, sorted by id. With file arguments it expands each file as a fixture template ({{key "openai"}}, {{key "openai.project-key"}}) to stdout. Every key carries the TOKENHOUNDTEST marker; the same --seed yields byte-identical output on every OS.

Usage: go run ./tools/testkeys [--seed N] [template-file ...]

Exit codes: 0 success, 1 a file or the registry could not be read, 2 usage error or unknown detector id.

Directories

Path Synopsis
Package keygen generates synthetic test keys from registry patterns (AD-16).
Package keygen generates synthetic test keys from registry patterns (AD-16).
Package leakcheck is the one AD-3 leak checker of the test suites: it looks for more of a generated key than its redacted form in a captured output, raw and in its JSON-escaped, URL-encoded and base64-encoded views, and reports each hit by format, file, byte offset, encoding and finding id, never by the matched text.
Package leakcheck is the one AD-3 leak checker of the test suites: it looks for more of a generated key than its redacted form in a captured output, raw and in its JSON-escaped, URL-encoded and base64-encoded views, and reports each hit by format, file, byte offset, encoding and finding id, never by the matched text.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL