Provider secret detectors
internal/checks/secretsproviders is the issuer-specific companion to the
provider-neutral internal/checks/secrets package. Version 1.0.0 contains
independent GitHub, AWS, Stripe, Slack, and Anthropic detectors. All are
registered built-ins but remain disabled by the default runtime policy.
Contract and interpretation
A finding means only that text matched a published issuer prefix plus this package's conservative bounded grammar. It does not mean that a credential exists, is valid, is active, or belongs to any account. Detection is entirely offline: no provider, DNS, filesystem, environment, clock, or random source is used. Findings contain spans and typed evidence, never matched values or value fingerprints.
Each detector has a stable ID, v1 manifest, and v1 capability contract under
internal/checks/secretsproviders. The machine-readable catalogue is
data/secrets-providers-catalogue.json,
and value-free test evidence is
test/secrets-providers/maturity-evidence.json.
| Detector | Supported evidence | State / action ceiling |
|---|---|---|
| GitHub | documented token prefix and bounded type grammar; exact classic/fine-grained shapes; stateless installation structure | strong forms probable, redact eligible; unexpected fine-grained lengths candidate, observe only |
| AWS | AKIA/ASIA access-key ID prefix; exact-labelled 40-character secret value with bounded entropy | both candidate, observe only |
| Stripe | documented sensitive server/organization prefixes; publishable keys excluded | probable, redact eligible |
| Slack | documented token prefixes and webhook host/path with bounded sections | probable, redact eligible |
| Anthropic | official API-key partial hint, bounded high-entropy body and suffix | candidate, observe only |
AWS access-key IDs use category security.credential.access_key_id.aws; secret
access-key values use security.credential.secret_access_key.aws. They are not
interchangeable, and an ID alone is not secret authentication material.
Placeholder markers (EXAMPLE, REDACTED, CHANGEME, and similar) and very
low-diversity bodies are rejected. Shannon entropy is used only for bounded
opaque AWS and Anthropic values where prefix/context alone is insufficient.
Policy posture and redaction
policies/examples/secrets-baseline.yaml
is explicit opt-in. observe records every supported form. The
redact-experimental profile redacts only strong GitHub, Stripe, and Slack
findings with [GITHUB_TOKEN], [STRIPE_KEY], and [SLACK_TOKEN]. AWS and
Anthropic remain observe-only. No provider detector has block authority; that
requires independent holdout and operational evidence not present here.
Measured package checks
On the integration orb (linux/amd64, Xeon 2.60 GHz), the bounded one-MiB
benchmark (-benchtime=3x) measured 20.26 MB/s GitHub, 29.58 MB/s AWS,
7.49 MB/s Stripe, 101.90 MB/s Slack, and 1200.35 MB/s Anthropic. The targeted
suite measured 97.7% statement coverage and its ten-second fuzz run completed
41,144 executions. These are engineering measurements, not production latency
or false-positive evidence.
Sources and compatible public resources
Issuer sources were checked on 4 October 2026 and are pinned in each capability
contract: GitHub token-format docs and engineering checksum article; AWS IAM
identifier and STS credential references; Stripe key docs; Slack token and
webhook docs; Anthropic Admin API partial key hints; and OpenAI authentication
docs. OpenAI documents key secrecy and bearer use but not a stable complete key
grammar, so generic sk- strings are intentionally excluded. Anthropic is the
requested equivalent model-provider detector.
Public detector projects were reviewed for compatibility and test ideas, not copied or imported:
- Gitleaks, MIT;
- detect-secrets, Apache-2.0;
- regextokens, MIT;
- TruffleHog, AGPL-3.0.
The implementation is original and uses only Go's standard library. In particular, it does not incorporate TruffleHog code and does not adopt its live verification model.
Known gaps
- Issuer formats can change; source review and detector versioning are manual.
- GitHub's checksum input remains unpublished, so no checksum is claimed.
- Stripe and Slack publish prefixes but not complete body grammars; bounds are conservative implementation limits.
- AWS session-token and pair correlation, Slack configuration/service tokens, Stripe webhook signing secrets, and Anthropic admin/OAuth credentials are not covered.
- No cross-segment joining, decoding, deobfuscation, live validity check, independent private holdout, or production false-positive evidence exists.