Skip to content
Benchmarks

redact-secret · Report

API token

hf_ prefixed access token.

  • Hugging Face
  • Detectors: huggingface-token
  • Run 2026-10-07
  • Mode published · redact-secret 0.1.0-beta.14
  • Dossier verdictReady
  • Dossier evidence levelT1 · Provider-documented
  • Dossier researched2026-09-23

Research record

From credential-evidence snapshot-2026.10.06.4 · records at 77ce761 · schema 1.8.0. It describes the research on the format, not what any scanner or the product does, and not a support status.
  • Review stateDraft, not reviewed
  • Format revision1 · current
  • ResearchResearched
  • Researched2026-09-23

2 events in the review history: 1 observed, 1 reviewed. Latest: observed on 2026-09-23 by automation, project maintainer. Project-maintained review is not independent validation. The family record at this release.

Format

Provider format research from credential-evidence snapshot-2026.10.06.4 · records at 77ce761 · schema 1.8.0.

What it looks like

Descriptive pattern
^hf_[A-Za-z0-9]{34}$

Parts are shown as recorded. Evidence classes belong to the facts below; no class is assigned to a part.

Format facts

  • Provider documented · provider-source · current · observed 2026-09-23

    @huggingface/hub SDK reference AccessToken type (hf_${string}): Hugging Face's SDK reference on huggingface.co types the user access token as hf_${string}, establishing the hf_ prefix; the provider's Hub OpenAPI spec (/.well-known/openapi.json, POST /api/credentials/revoke) gives a raw access-token example of hf_ followed by 34 placeholder characters, which establishes the 34-character body length on example strength only. The [A-Za-z0-9] body alphabet is not provider-stated and remains a support-policy union of the tool alphabets (gitleaks letters only, TruffleHog alphanumeric); the api_org_ variant is not covered by this provider source

    • huggingface.co/docs/huggingface.js/hub/modulesprovider-documentation · last read 2026-09-23 · latest outcome read · supports Hugging Face's SDK reference on huggingface.co types the user access token as hf_${string}, establishing the hf_ prefix; the provider's Hub OpenAPI spec (/.well-known/openapi.json, POST /api/credentials/revoke) gives a raw access-token example of hf_ followed by 34 placeholder characters, which establishes the 34-character body length on example strength only. The [A-Za-z0-9] body alphabet is not provider-stated and remains a support-policy union of the tool alphabets (gitleaks letters only, TruffleHog alphanumeric); the api_org_ variant is not covered by this provider source
  • Tool corroborated · tool-corroboration · current · observed 2026-09-23

    Pinned scanner rules are consistent with the contract grammar (2 artifacts: gitleaks 8.30.1; trufflehog 3.97.4).

  • Unresolved · listed-references · current · observed 2026-09-23

    The legacy contract lists 1 reference without stating which property each supports.

  • Provider documented · dossier-research · current · observed 2026-09-23

    Legacy dossier research (verdict ready, tier T1) cited 3 sources; the dossier does not attribute sources to individual properties.

Open questions

No open question is recorded for this revision.

Benchmark dossier notes

From the provider dossier, as written. The evidence level above says how well the format is backed; a fact the dossier does not record is not shown.
Shape
hf_ then 34 characters. Core accepts [A-Za-z0-9]; every observed sample and letters-only tool regex is narrower, and no source says digits never occur. hf_oauth_… and hf_jwt_… are other documented hf_ tokens, so a later _ in a body does not prove it is not Hugging Face.
Basis
prefix: the SDK reference types AccessToken as hf_${string} (a type annotation, not prose; accepted as T1 by maintainer ruling in the #575 record). Length: the POST /api/credentials/revoke example is hf_ plus 34 placeholder characters; the schema says only minLength 1 and maxLength 200, so length is on example strength. Alphabet: T2 only; Hugging Face's own current code (hf-mcp-server, agent-manager) and a retired inference-playground validator use hf_[A-Za-z0-9]{34}, which is code, not documentation, and tools split on the alphabet (#654).
Issuance
not attempted.
Contract in core
detector-families.md (row huggingface:api-token); evidence #654 record.

In this benchmark

Fixture rows on the current run. Counts are for redact-secret in published · redact-secret 0.1.0-beta.14 mode.
Fixtures
26
Left readable
0
Redacted too much
0
False alarms
0

26 fixtures: 11 expect a redaction, 15 must stay quiet. See every row

redact-secret fixture counts by evidence level
Evidence levelFixturesLeft readableToo muchFalse alarms
T1Provider-documented11000
T2Tool-corroborated13000
T3Project policy2000

Every scanner on the same fixtures

In run order. Counts are what each scanner recorded on this family's fixtures, whichever rules it has; a scanner with no rule for the family has nothing to report on it.

Counts per scanner on this family's fixtures
ScannerFixturesLeft readableToo muchFalse alarms
flare-redactRuntime library · 1.6.1 · Published npm package · secrets-only (pii, generic_assignment disabled) · JavaScript engine1 rule targets it26003
gitleaksRepository scanner · 8.30.1 · Directory scan · default rules1 rule targets it26500
redact-secretProduct measured here · 0.1.0-beta.14 · Published npm package · default detectors1 detector mapped26000
trufflehogRepository scanner · 3.97.4 · Filesystem scan · verification disabled1 rule targets it26001

Benchmark dossier questions

Things the sources do not settle. They are listed so nobody reads them as settled.
Open caveat
T1 is a maintainer ruling on an SDK-reference type annotation (prefix) and an OpenAPI example (length 34); the alphabet is not provider-stated and api_org_ has no current source.

Looks like it, but isn't

Values the dossier records as resembling this credential without being one.
Collisions
the api_org_ variant has no current provider-domain source (a 2021 archived page shows a placeholder; the current SDK rejects org tokens at login), so it stays outside the T1 contract.

Scanner rules for this family

Mapped by hand (reviewed 2026-09-30) from each scanner's pinned rule file, never from what a scanner found on the fixtures.
Peer scanner rules that target this family
ScannerRuleWhat the rule matches
flare-redact · rules 1.6.1huggingface_tokenhf_ + 30-45 characters
gitleaks · rules 8.30.1huggingface-access-tokenhf_ + 34 letters
trufflehog · rules 3.97.4huggingfacehf_ + 34 alphanumerics

No rule maps to this family in openredaction.

26 of 26 rows

Fixtures in this family

26 rows, redact-secret's outcome on each. Rows that need a look come first (0), then the rest in corpus order. Choose "Every scanner" to see each scanner's outcome for the same rows.
Fixtures in API token
FixtureKind and evidenceredact-secret
huggingface-token-dash-identifier-embeddinghuggingface · benign-lookalikeMust not flagT2 · Tool-corroboratedQuiet
huggingface-token-hf-auth-loginhuggingface · documented-format-literalMust redactT1 · Provider-documentedRedacted
huggingface-token-inference-bearer-headerhuggingface · documented-format-literalMust redactT1 · Provider-documentedRedacted
huggingface-token-shape-1-barehuggingface · documented-format-literalMust redactT1 · Provider-documentedRedacted
huggingface-token-shape-1-quotedhuggingface · documented-format-literalMust redactT1 · Provider-documentedRedacted
huggingface-token-shape-1-unicode-crlfhuggingface · documented-format-literalMust redactT1 · Provider-documentedRedacted
huggingface-token-user-plain-twinhuggingface · wrong-lengthMust not flagT2 · Tool-corroborated · twinQuiet
huggingface-token-user-unicode-crlf-twinhuggingface · wrong-lengthMust not flagT2 · Tool-corroborated · twinQuiet
huggingface-token-actions-sync-to-hubhuggingface · documented-format-literalMust redactT1 · Provider-documentedRedacted
huggingface-token-hf-token-envhuggingface · documented-format-literalMust redactT1 · Provider-documentedRedacted
huggingface-token-inference-clienthuggingface · documented-format-literalMust redactT1 · Provider-documentedRedacted
huggingface-token-leading-identifier-embeddinghuggingface · benign-lookalikeMust not flagT2 · Tool-corroboratedQuiet
huggingface-token-maskhuggingface · benign-lookalikeMust not flagT3 · Project policyQuiet
huggingface-token-model-repo-and-revision-public-idhuggingface · public-identifierMust not flagT2 · Tool-corroboratedQuiet
huggingface-token-prefix-onlyhuggingface · benign-lookalikeMust not flagT2 · Tool-corroboratedQuiet
huggingface-token-referencehuggingface · benign-lookalikeMust not flagT3 · Project policyQuiet
huggingface-token-shape-1-prefix-bare-twinhuggingface · prefix-near-missMust not flagT2 · Tool-corroborated · twinQuiet
huggingface-token-shape-1-prefix-quoted-twinhuggingface · prefix-near-missMust not flagT2 · Tool-corroborated · twinQuiet
huggingface-token-shape-1-prefix-unicode-crlf-twinhuggingface · prefix-near-missMust not flagT2 · Tool-corroborated · twinQuiet
huggingface-token-short-bodyhuggingface · benign-lookalikeMust not flagT2 · Tool-corroboratedQuiet
huggingface-token-stored-tokens-inihuggingface · documented-format-literalMust redactT1 · Provider-documentedRedacted
huggingface-token-trailing-identifier-embeddinghuggingface · benign-lookalikeMust not flagT2 · Tool-corroboratedQuiet
huggingface-token-user-plainhuggingface · documented-format-literalMust redactT1 · Provider-documentedRedacted
huggingface-token-user-prefix-plain-twinhuggingface · prefix-near-missMust not flagT2 · Tool-corroborated · twinQuiet
huggingface-token-user-prefix-unicode-crlf-twinhuggingface · prefix-near-missMust not flagT2 · Tool-corroborated · twinQuiet
huggingface-token-user-unicode-crlfhuggingface · documented-format-literalMust redactT1 · Provider-documentedRedacted

Sources

Researched 2026-09-23.

Documentation and code

Research log