Skip to content

Releases

v1.0.1

Choose a tag to compare

@github-actions github-actions released this 29 Nov 01:26
b04e166

Changed

  • CI is split into tiers (Story 4.29). Pull requests into main and pushes to
    main run a fast set of twelve jobs in .github/workflows/ci.yml: go test -race
    on ubuntu, macOS and Windows, one lint job (golangci-lint, gofmt, vet including
    GOOS=windows), the leak test, the self-scan, workflow lint, community files, npm
    packages and PyPI wheels on ubuntu, and the Action self-test on ubuntu and
    Windows. Everything else (arm64 legs, macOS and Windows packaging legs, fuzz
    targets, the benchmark jobs, reproducible builds, the goreleaser snapshot and
    container image, the docs walkthrough, the adoption suite, examples, registry id
    stability, supply chain and coverage) moves to the new
    .github/workflows/nightly.yml, which runs daily on main and opens or updates one
    issue labelled ci-nightly when a job fails, closing it on the next passing run.
    Docs-only changes run the tools tests instead of the whole race suite
    (scripts/ci-changes.sh); lint, the leak test and the self-scan always run. The
    release gates are unchanged. tools/workflowcheck allows nightly.yml no write
    scope but issues and id-token.

Fixed

  • The GitHub Action runs on Windows ARM runners (windows-11-arm) (Story 4.30).
    sigstore/cosign-installer stops there with unsupported architecture ARM64, so
    the Action failed before it downloaded TokenHound. On Windows ARM64 the Action now
    downloads cosign v3.1.4's cosign-windows-amd64.exe from the sigstore/cosign GitHub
    release (it has no Windows ARM64 build; Windows 11 on ARM runs it under x64
    emulation), checks it against a sha256 pinned from that release's
    cosign_checksums.txt and fails closed on a mismatch; every other runner keeps
    cosign-installer. The post-publish install check's Windows ARM64 binaries row
    installs cosign the same way, and the Action self-test gains a nightly
    windows-11-arm leg. How the TokenHound binary is verified is unchanged.
  • The post-publish install check's Homebrew rows run brew update before
    brew install (analytics off), as a user's auto-updating Homebrew does. With
    HOMEBREW_NO_AUTO_UPDATE=1 and no update, the macos-15-intel image's Homebrew
    6.0.18 rejected the published cask (invalid 'zap' stanza: wrong number of arguments) and failed the v1.0.0 homebrew brew (macos amd64) row, though the
    cask installs with an updated brew. The cask is unchanged.

Benchmark

Of 1,047 AI keys hidden in agent files, repository files, git history, encoded values and notebooks, TokenHound found 1,047, gitleaks 825 and TruffleHog 440.

Tool Keys found Keys missed False alarms
TokenHound 1,047 of 1,047 (100%) 0 39
gitleaks 825 of 1,047 (79%) 222 203
TruffleHog 440 of 1,047 (42%) 607 8

The test keys are generated from TokenHound's own patterns, which favours TokenHound at finding them; read the method before comparing.

Each row is a tool at its default config: the tuned gitleaks and TruffleHog configs found no extra keys, so they get no rows of their own. Not compared yet: GitHub secret scanning.

What these numbers mean:

  • Keys found: of the 1,047 keys planted, how many the tool reported. A missed key is a leak you never hear about, so this is the number that matters most.
  • False alarm: an alert on something that was not a key (the test also holds 1,175 look-alike decoys). A false alarm costs you a moment to check and dismiss.

Where others do better: TruffleHog raises fewer false alarms (8 against TokenHound's 39), but it found only 440 of the 1,047 keys (42%).

TokenHound's live or dead check gave the right answer for 534 of the 534 keys it checked (against the benchmark's stand-in for the provider APIs, not real providers).

Run on 2026-11-19 with the open agent leak benchmark against TokenHound commit b6aa45ed4bc9, seed 20261119. Full technical results, with precision and recall per category, the tuned configs and every place TokenHound scores lower: RESULTS.md; summary: summary.json; data: https://github.com/aiagentpro/tokenhound/blob/v1.0.1/docs/benchmark/results.json.

Verify this release

Download checksums.txt, checksums.txt.sigstore.json and the archives you want, then check the signature and the digests:

cosign verify-blob --bundle checksums.txt.sigstore.json --certificate-identity https://github.com/aiagentpro/tokenhound/.github/workflows/release.yml@refs/heads/main --certificate-oidc-issuer https://token.actions.githubusercontent.com checksums.txt
sha256sum --ignore-missing -c checksums.txt

(shasum -a 256 --ignore-missing -c checksums.txt on macOS.) Every archive has an SPDX JSON SBOM named <archive>.spdx.json, also listed in checksums.txt. The container image is signed too:

cosign verify ghcr.io/aiagentpro/tokenhound:1.0.1 --certificate-identity https://github.com/aiagentpro/tokenhound/.github/workflows/release.yml@refs/heads/main --certificate-oidc-issuer https://token.actions.githubusercontent.com

Install

Channel Command Platforms
npm (no install) npx tokenhound macOS, Linux and Windows; amd64 and arm64
PyPI uvx tokenhound, pipx run tokenhound or pip install tokenhound macOS, Linux and Windows; amd64 and arm64
Homebrew brew install aiagentpro/tap/tokenhound macOS and Linux; amd64 and arm64
Scoop scoop bucket add aiagentpro https://github.com/aiagentpro/scoop-bucket then scoop install tokenhound Windows; amd64 and arm64
Docker docker run --rm -v "$PWD:/src" ghcr.io/aiagentpro/tokenhound scan /src Linux; amd64 and arm64
Go go install github.com/aiagentpro/tokenhound/cmd/tokenhound@latest macOS, Linux and Windows; amd64 and arm64
GitHub Action uses: aiagentpro/tokenhound/dist/github-action@v1.0.1 macOS, Linux and Windows; amd64 and arm64
Binaries Releases, with checksums.txt and its cosign bundle macOS, Linux and Windows; amd64 and arm64

v1.0.0

Choose a tag to compare

@github-actions github-actions released this 28 Nov 23:53
15a6b89

Added

  • Repository skeleton: Go module, package layout, tokenhound --help.

  • Apache-2.0 licence for the code and CC0-1.0 for registry data; contributing,
    security, governance and code of conduct documents.

  • Lint gates for architecture rules (secret reveal, HTTP clients, error text, stage
    imports) with a self-test, a dash lint, a cross-OS CI matrix, CodeQL and GoReleaser
    snapshot builds.

  • Provider registry: JSON Schema (registry/schema/provider.json), embedded snapshot
    2026.11.13 with OpenAI (project, service account, admin and legacy user keys) and
    Anthropic (API and admin keys), a validating loader that reports
    file:line: field: message, _template.yaml, the tools/testkeys generator,
    make registry-test and the make registry-ids id stability check.

  • CLI root with global flags (--format, --config, --no-verify, --deterministic,
    --no-color, --plain, --quiet, -v/--verbose, --log-format text|json),
    log/slog logging to stderr and one-line usage errors with the correct form (exit 2).

  • tokenhound version shows the version, commit, build date, registry snapshot and
    schema version; tokenhound providers lists every provider with its detectors,
    verify host and revoke URL. Both support --format json.

  • Finding and Report model in the root package (statuses with live, unverified and
    dead classes, confidence, grades, locations, targets, warnings) and the JSON Schema
    docs/schema/report.v1.json (schema_version: 1, USD with two decimals, RFC 3339
    UTC times).

  • internal/secret.Secret, an opaque key type whose every print, marshal and log
    path shows only the redacted form (sk-pro...a1b2 (51)), never more than half of
    a key; the th_ fingerprint id; internal/warnx warnings built from error codes
    without error text; and the internal detect-to-verify candidate envelope.

  • Library scan API: tokenhound.Scan(ctx, Options) with Path, Stdin and Reader
    sources, Results.Events() progress events (finding-detected, location-added),
    Results.Wait() for the final Report and Results.Findings for range loops;
    Options.Timeout returns partial results with a timeout warning per incomplete
    source, and Options.Deterministic pins the generated time and duration.

  • Scan engine: source, decode (pass-through for now), detect, suppress, verify
    (verification off for now), enrich, grade and fix plan stages over bounded
    channels with GOMAXPROCS workers; each stage has one interface and an adapter
    registry. The working tree source skips .git, never follows symlinks inside the
    tree, reads plain files only (no archive expansion) and names the target after the normalised origin remote;
    unreadable files become file_unreadable warnings. Detect matches every registry
    pattern, dedupes each key into one finding with every location, picks one winning
    detector (keyword context, then confidence, then id) and lists the others in
    also_matched_by. Generated test keys are suppressed as test_marker unless
    IncludeTestKeys is set. Findings, locations, targets and warnings are sorted
    deterministically.

  • tokenhound scan [path|-] scans a directory, a file or standard input and prints
    the JSON Report (--format json) or a minimal terminal summary (meta line, count
    line, one row per finding with status word, provider, redacted key and first
    location). --include-test-keys keeps generated test keys unsuppressed; -o
    writes one format to a file, or several formats (--format json,terminal) to a
    directory as tokenhound.json with the summary on stdout. When stdout carries JSON
    or everything goes to files, the summary goes to stderr unless --quiet. Exit
    codes: 0 nothing matched fail_on (default: unsuppressed live keys), 1 something
    did, 2 usage or fatal error.

  • report.Render(w, format, *Report) with the json and terminal reporters;
    meta.files_scanned in the Report and its schema; tokenhound.ErrRegistry for a
    broken embedded registry.

  • make leak-test (also a CI job on Linux, macOS and Windows) fails if any output or
    debug log contains more than 10 characters of a generated key; make self-scan
    (also a CI job) scans this repository and fails on any unsuppressed finding.

  • Configuration: tokenhound.yaml (project tier, or --config), the user file
    <user config dir>/tokenhound/config.yaml, TOKENHOUND_* environment variables
    and flags, resolved once with that precedence by the new public config.Load into
    tokenhound.Options, which gains typed Verify, FailOn, Grade, Limits,
    Network, Hook, Alerts, Ping and Warnings fields. The published schema
    docs/schema/config.v1.json lists every key; a missing version means 1 and any
    other version exits 2. Schema errors print as file:line: field: message and fail
    every verb with exit 2. Trust tiers: network.*, alerts.*, hook.* and ping
    are honoured only from the user tier; a project file may not disable verification,
    set timeout, lower a limits.* value or verify.timeout, raise a limit above
    4x its default, or raise grade.f_threshold_usd_per_day or
    verify.max_concurrency; a project fail_on may only tighten (unioned on top of
    every layer, flags included); ${NAME} expands only in the user tier (also inside
    one-line { ... } mappings, so the documented example parses as written) and
    project paths must stay inside the root;
    ignored values become untrusted_config_key and config_path_outside_root
    warnings in the log and the Report. The library never reads config or env itself.

  • scan exits 1 per fail_on: statuses, min_dollars_at_risk (a missing amount
    counts as 0) and warning codes; with CI=true, fail_on.warnings defaults to
    [timeout]. New scan flags --fail-on-status, --fail-on-warnings,
    --fail-on-min-dollars and --timeout; --no-verify and --config (paths inside
    it resolve against the scan root) are wired, and --no-verify=false changes nothing. Config files
    must be regular files: a FIFO, device or directory is a config error, never a hang.
    Durations must be greater than 0, and verify.timeout and alerts.timeout at most
    5m. An empty TOKENHOUND_* variable counts as unset (an empty
    TOKENHOUND_FAIL_ON_WARNINGS still means no codes), and an empty
    --fail-on-status is a usage error.

  • limits.max_file_bytes (default 10 MiB) bounds every file and stdin read; larger
    input is skipped with a file_too_large warning and not counted as scanned (add
    file_too_large to fail_on.warnings to fail on it). The schema caps every
    limits.* key (for example max_file_bytes at 1 GiB) and
    verify.max_concurrency (64) in every tier. tokenhound help and --help never load config, so a broken config cannot
    block help.

  • internal/netx, the one HTTP client factory: a closed purpose enum (verify,
    registry, forge, alert, image, git, ping), host allowlists (literal
    hosts and one-label * templates under a fixed suffix) checked before any dial,
    HTTPS and TLS 1.2+ only, no redirects for verify, an HTTPS proxy over CONNECT
    with no_proxy and credentials held as a secret, a CA bundle added to the system
    pool, typed errors with codes and no URL, query or credential text, a process-wide
    dial counter, and internal/netx/netxtest (test CA, TLS server, CONNECT proxy).

  • Decoding: the default decode stage now unwraps base64 (standard and URL-safe,
    padded or not), percent-encoding, JSON escapes and env-file values in memory,
    recursively up to limits.decode_max_depth (default 3). A key found in decoded
    content is located at the line and column where its encoded form starts in the
    original file. Deeper nesting, or decoded output past 4 times the file size, stops
    with a new decode_depth_limit warning (details max_depth, size_budget).
    Corrupt input is skipped silently and decoded content is never logged or printed.

  • Confidence: computed per finding from one documented rule table
    (docs/detection.md): declared pattern confidence, +1 with
    keyword context on the match line or an adjacent line, -1 for prefix-less
    patterns found in decoded content. Patterns with entropy.min drop matches below
    it. New registry field requires_keywords drops prefix-less matches without
    keyword context.

  • Generic detector generic.high-entropy (provider generic): high-entropy values
    assigned to api_key, token or secret names, confidence low or medium,
    always losing to a provider detector on the same secret (listed in
    also_matched_by).

  • tools/testkeys templates gain b64, b64url, pct and jsonesc so fixtures
    can hold generated keys in every encoding.

  • Frontier providers (registry snapshot 2026.11.13.1): google-gemini,
    google-vertex, azure-openai, aws, mistral, cohere, groq, xai,
    deepseek, openrouter and perplexity, each with revoke, rotate and usage links
    and a read-only verify request (gcp-key, azure-key, aws-sigv4 against Bedrock
    ListFoundationModels, or bearer). Prefix-less key shapes (Mistral, Cohere, Azure
    keys, AWS secret access keys, Vertex AI keys) count only with keyword context.

  • Multi-part credentials: detect pairs the parts of a credential
    (credential.parts, same-file or same-surface-entry) within one file and what
    was decoded from it, nearest by line, and reports one finding whose id covers every
    part in declared order. A primary part without its partners is reported alone with
    confidence: low and status_reason: unpaired; a lone secondary part is not
    reported. Pairing rules are in docs/detection.md.

  • Provider schema: snake_case or kebab-case part names, a templated verify.url
    (https://<resource>.openai.azure.com/...) with verify.host_suffixes, template
    labels constrained to [a-z0-9-]{1,63}, and an optional per-pattern verify bl...

Read more