redact-secret · Report
Personal API key (phx_)
phx_ + 42–49 of [0-9A-Za-z] (base57 since 2026-03-30, base62 before); the phc_ project token is public and never claimed.
Research record
3 events in the review history: 2 observed, 1 reviewed. Latest: observed on 2026-09-28 by automation, project maintainer. Project-maintained review is not independent validation. The family record at this release.
Format
What it looks like
- Descriptive pattern
^phx_[0-9A-Za-z]{42,49}$
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-28PERSONAL_API_KEY_PREFIX = "phx_" and generate_random_token_personal() at 658715d (re-checked 2026-09-28); docs name phx_: the docs document the phx_ personal API key; provider code and unit tests (ruling R1) fix the base57/base62 alphabet and the algorithm from which the 42–49 band is derived
- PostHog/posthog @ 658715dd3b434e0a5ada471981d4053b70e72034: posthog/models/utils.pyprovider-documentation · last read 2026-09-28 · latest outcome read · supports the docs document the phx_ personal API key; provider code and unit tests (ruling R1) fix the base57/base62 alphabet and the algorithm from which the 42–49 band is derived
Unresolved ·
tool-corroboration· current · observed 2026-09-28Pinned scanner rules are consistent with the contract grammar (1 artifact: trufflehog 3.97.4).
- trufflesecurity/trufflehog @ v3.97.4: pkg/detectors/posthog/posthog.goscanner-rule-source · last read 2026-09-28 · latest outcome read · supports trufflehog 3.97.4: PostHog: \b(phx_[a-zA-Z0-9_]{43,48})\b (no phs_; misses 42- and 49-byte bodies; admits _)
Provider documented ·
field-prefix· current · observed 2026-09-28prefix: phx_
- PostHog/posthog @ 658715dd3b434e0a5ada471981d4053b70e72034: posthog/models/utils.pyprovider-documentation · last read 2026-09-28 · latest outcome read · supports prefix: phx_
- posthog.com/docs/api/personal-api-keysprovider-documentation · last read 2026-09-28 · latest outcome read · supports personal API key
Provider documented ·
field-alphabet· current · observed 2026-09-28alphabet: base57 [2-9A-HJ-NP-Za-km-z] since 2026-03-30; base62 [0-9A-Za-z] in the earlier prefixed eras; the contract is the union [0-9A-Za-z]
- PostHog/posthog @ d610b45e4c72: posthog/models/utils.pyprovider-sdk-source · last read 2026-09-28 · latest outcome read · supports base62
- PostHog/posthog @ 658715dd3b434e0a5ada471981d4053b70e72034: posthog/models/utils.pyprovider-documentation · last read 2026-09-28 · latest outcome read · supports BASE57 = base62 minus 0 1 O I l; test_uses_base57_alphabet
- github.com/redact-secret/redact-secret/issues/860issue-or-discussion · last read 2026-09-29 · latest outcome read · supports R1 · #issuecomment-5852413851
Provider documented ·
field-body· current · observed 2026-09-28body: 42–49 bytes: base57 era 48 or 49; 35-byte base62 era at most 48 (47 ≈ 88.6%); 32-byte base62 era at most 43 (42 ≈ 1.6%) (Per-length shares derived from the T1 algorithm. Shorter bodies (below 0.03% of any era) are an accepted false negative and are asserted by no fixture; 41 and 50 back length twins.)
- PostHog/posthog @ 1.43.0: posthog/models/utils.pyprovider-sdk-source · last read 2026-09-28 · latest outcome read · supports body: 42–49 bytes: base57 era 48 or 49; 35-byte base62 era at most 48 (47 ≈ 88.6%); 32-byte base62 era at most 43 (42 ≈ 1.6%)
- PostHog/posthog @ d610b45e4c72: posthog/models/utils.pyprovider-sdk-source · last read 2026-09-28 · latest outcome read · supports body: 42–49 bytes: base57 era 48 or 49; 35-byte base62 era at most 48 (47 ≈ 88.6%); 32-byte base62 era at most 43 (42 ≈ 1.6%)
- PostHog/posthog @ 658715dd3b434e0a5ada471981d4053b70e72034: posthog/models/utils.pyprovider-documentation · last read 2026-09-28 · latest outcome read · supports generate_random_token(35), forced top bit; test_exact_length
- github.com/PostHog/posthog/pull/52495provider-sdk-source · last read 2026-09-28 · latest outcome read · supports base57 since 2026-03-30
Provider documented ·
field-separators· current · observed 2026-09-28separators: none inside the body; no checksum
- PostHog/posthog @ 658715dd3b434e0a5ada471981d4053b70e72034: posthog/models/utils.pyprovider-documentation · last read 2026-09-28 · latest outcome read · supports separators: none inside the body; no checksum
Unresolved ·
field-boundary· current · observed 2026-09-28boundary: a key glued to an identifier on either side ([A-Za-z0-9_-]) is not claimed; a 50+ run is rejected, never truncated
- redact-secret/redact-secret @ 270faf84dc12f6a4a4cf61fe3ffab7aadc4f7262: docs/audits/evidence/860/posthog.mdprovider-documentation · last read 2026-09-28 · latest outcome read · supports implementation notes
Provider documented ·
field-project-token· current · observed 2026-09-28project-token: phc_ is the project token, public by design ("ok to be public"); never claimed (Benign controls outside credential-named assignments only: under a credential-named key generic detection redacts it today, which is generic-token's verdict, not this family's.)
- redact-secret/redact-secret @ 270faf84dc12f6a4a4cf61fe3ffab7aadc4f7262: docs/audits/evidence/860/posthog.mdprovider-documentation · last read 2026-09-28 · latest outcome read · supports decision: phc_ stays benign
- posthog.com/docs/apiprovider-documentation · last read 2026-09-28 · latest outcome read · supports project-token: phc_ is the project token, public by design ("ok to be public"); never claimed
Unresolved ·
field-deferred-prefixes· current · observed 2026-09-28deferred-prefixes: pha_/phr_ OAuth tokens and phh_ are outside this handoff (No fixture asserts either reading.)
- redact-secret/redact-secret @ 270faf84dc12f6a4a4cf61fe3ffab7aadc4f7262: docs/audits/evidence/860/posthog.mdprovider-documentation · last read 2026-09-28 · latest outcome read · supports deferred-prefixes: pha_/phr_ OAuth tokens and phh_ are outside this handoff
Tool corroborated ·
field-peer-lag· current · observed 2026-09-28peer-lag: trufflehog 3.97.4 reads phx_ + [a-zA-Z0-9_]{43,48}: it misses 49-byte base57 keys and 42-byte base62 keys and admits _; it has no phs_ alternative. gitleaks 8.30.1 has no PostHog rule (Corroboration only; never used to narrow or widen the contract.)
- gitleaks/gitleaks @ v8.30.1: config/gitleaks.tomlscanner-rule-source · last read 2026-10-04 · latest outcome read · supports no posthog rule
- trufflesecurity/trufflehog @ v3.97.4: pkg/detectors/posthog/posthog.goscanner-rule-source · last read 2026-09-28 · latest outcome read · supports peer-lag: trufflehog 3.97.4 reads phx_ + [a-zA-Z0-9_]{43,48}: it misses 49-byte base57 keys and 42-byte base62 keys and admits _; it has no phs_ alternative. gitleaks 8.30.1 has no PostHog rule
Unresolved ·
listed-references· current · observed 2026-09-28The legacy contract lists 12 references without stating which property each supports.
- PostHog/posthog @ 1.43.0: posthog/models/utils.pyprovider-sdk-source · last read 2026-09-28 · latest outcome read · supports Listed as a reference by the legacy contract
- PostHog/posthog @ d610b45e4c72: posthog/models/utils.pyprovider-sdk-source · last read 2026-09-28 · latest outcome read · supports Listed as a reference by the legacy contract
- PostHog/posthog @ 658715dd3b434e0a5ada471981d4053b70e72034: posthog/models/utils.pyprovider-documentation · last read 2026-09-28 · latest outcome read · supports Listed as a reference by the legacy contract
- github.com/PostHog/posthog/pull/52495provider-sdk-source · last read 2026-09-28 · latest outcome read · supports Listed as a reference by the legacy contract
- redact-secret/redact-secret @ 270faf84dc12f6a4a4cf61fe3ffab7aadc4f7262: docs/audits/evidence/860/README.mdproject-research-note · last read 2026-09-28 · latest outcome read · supports Listed as a reference by the legacy contract
- github.com/redact-secret/redact-secret/issues/906issue-or-discussion · last read 2026-09-28 · latest outcome read · supports Listed as a reference by the legacy contract
- github.com/redact-secret/redact-secret/issues/860issue-or-discussion · last read 2026-09-29 · latest outcome read · supports Listed as a reference by the legacy contract · #issuecomment-5852413851
- github.com/redact-secret/redact-secret/issues/860issue-or-discussion · last read 2026-09-29 · latest outcome read · supports Listed as a reference by the legacy contract
- github.com/redact-secret/redact-secret-benchmarks/issues/434issue-or-discussion · last read 2026-09-28 · latest outcome read · supports Listed as a reference by the legacy contract
- redact-secret/redact-secret @ 270faf84dc12f6a4a4cf61fe3ffab7aadc4f7262: docs/audits/evidence/860/posthog.mdprovider-documentation · last read 2026-09-28 · latest outcome read · supports Listed as a reference by the legacy contract
- posthog.com/docs/apiprovider-documentation · last read 2026-09-28 · latest outcome read · supports Listed as a reference by the legacy contract
- posthog.com/docs/api/personal-api-keysprovider-documentation · last read 2026-09-28 · latest outcome read · supports Listed as a reference by the legacy contract
Provider documented ·
dossier-research· current · observed 2026-09-28Legacy dossier research (verdict ready, tier T1) cited 3 sources; the dossier does not attribute sources to individual properties.
- PostHog/posthog @ 658715dd3b434e0a5ada471981d4053b70e72034: posthog/models/utils.pyprovider-documentation · last read 2026-09-28 · latest outcome read · supports Cited by the legacy dossier research for this family
- github.com/PostHog/posthog/pull/52495provider-sdk-source · last read 2026-09-28 · latest outcome read · supports Cited by the legacy dossier research for this family
- redact-secret/redact-secret @ 8b6a5fde52ecb4dfce13f09c7a947062d21483c7: docs/audits/evidence/860/posthog.mdproject-research-note · last read 2026-09-28 · latest outcome read · supports Final research evidence recorded by the legacy dossier
Provider documented ·
taxonomy-sources· current · observed 2026-09-28The legacy taxonomy lists 2 sources for this family. The taxonomy records no date; the dossier researchedAt is used as the observed-at date.
- redact-secret/redact-secret @ 270faf84dc12f6a4a4cf61fe3ffab7aadc4f7262: docs/audits/evidence/860/posthog.mdprovider-documentation · last read 2026-09-28 · latest outcome read · supports Listed as a source for this family in the legacy taxonomy
- posthog.com/docs/api/personal-api-keysprovider-documentation · last read 2026-09-28 · latest outcome read · supports Listed as a source for this family in the legacy taxonomy
Open questions
No open question is recorded for this revision.
Benchmark dossier notes
- Shape
phx_+ 42 to 49 alphanumerics, no separator or checksum.- Basis
- prefix T1 from docs and code (an SDK error string also states "prefixed with
phx_"); alphabet and algorithm T1 from code and unit tests. - Issuance
- not attempted; optional check of one key issued today (expect 48 or 49, none of
0 1 O I l). - Contract in core
- detector-families.md.
In this benchmark
- Fixtures
- 44
- Left readable
- 0
- Redacted too much
- 0
- False alarms
- 0
44 fixtures: 17 expect a redaction, 27 must stay quiet. See every row
| Evidence level | Fixtures | Left readable | Too much | False alarms |
|---|---|---|---|---|
| T1Provider-documented | 17 | 0 | 0 | 0 |
| T2Tool-corroborated | 19 | 0 | 0 | 0 |
| T3Project policy | 8 | 0 | 0 | 0 |
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.
| Scanner | Fixtures | Left readable | Too much | False alarms |
|---|---|---|---|---|
| flare-redactRuntime library · 1.6.1 · Published npm package · secrets-only (pii, generic_assignment disabled) · JavaScript engineNo rule maps to it | 44 | 14 | 3 | 0 |
| gitleaksRepository scanner · 8.30.1 · Directory scan · default rulesNo rule maps to it | 44 | 7 | 0 | 1 |
| redact-secretProduct measured here · 0.1.0-beta.14 · Published npm package · default detectors1 detector mapped | 44 | 0 | 0 | 0 |
| trufflehogRepository scanner · 3.97.4 · Filesystem scan · verification disabled1 rule targets it | 44 | 4 | 0 | 1 |
Looks like it, but isn't
- Collisions
- the era-1 unprefixed personal key (43 characters of urlsafe Base64) has no anchor.
phc_must stay unclaimed.
Scanner rules for this family
| Scanner | Rule | What the rule matches |
|---|---|---|
| trufflehog · rules 3.97.4 | posthog | phx_ + 43-48 characters |
No rule maps to this family in flare-redact, gitleaks, openredaction.
Fixtures in this family
| Fixture | Kind and evidence | redact-secret |
|---|---|---|
posthog-token-actions-envposthog · documented-format-literal | Must redactT1 · Provider-documented | Redacted |
posthog-token-bare-proseposthog · documented-format-literal | Must redactT1 · Provider-documented | Redacted |
posthog-token-bearer-headerposthog · documented-format-literal | Must redactT1 · Provider-documented | Redacted |
posthog-token-chat-pasteposthog · documented-format-literal | Must redactT1 · Provider-documented | Redacted |
posthog-token-compose-envposthog · documented-format-literal | Must redactT1 · Provider-documented | Redacted |
posthog-token-curl-projectsposthog · documented-format-literal | Must redactT1 · Provider-documented | Redacted |
posthog-token-dotenvposthog · documented-format-literal | Must redactT1 · Provider-documented | Redacted |
posthog-token-exportposthog · documented-format-literal | Must redactT1 · Provider-documented | Redacted |
posthog-token-json-api-keyposthog · documented-format-literal | Must redactT1 · Provider-documented | Redacted |
posthog-token-json-tokenposthog · documented-format-literal | Must redactT1 · Provider-documented | Redacted |
posthog-token-key-shape-bareposthog · documented-format-literal | Must redactT1 · Provider-documented | Redacted |
posthog-token-key-shape-quotedposthog · documented-format-literal | Must redactT1 · Provider-documented | Redacted |
posthog-token-key-shape-unicode-crlfposthog · documented-format-literal | Must redactT1 · Provider-documented | Redacted |
posthog-token-mcp-configposthog · documented-format-literal | Must redactT1 · Provider-documented | Redacted |
posthog-token-project-token-prefix-twinposthog · prefix-near-miss | Must not flagT2 · Tool-corroborated · twin | Quiet |
posthog-token-sdk-kwargposthog · documented-format-literal | Must redactT1 · Provider-documented | Redacted |
posthog-token-underscore-in-body-twinposthog · wrong-alphabet | Must not flagT2 · Tool-corroborated · twin | Quiet |
posthog-token-x-api-key-headerposthog · documented-format-literal | Must redactT1 · Provider-documented | Redacted |
posthog-token-yaml-configposthog · documented-format-literal | Must redactT1 · Provider-documented | Redacted |
posthog-token-actions-secret-referenceposthog · templated-reference | Must not flagT3 · Project policy | Quiet |
posthog-token-body-41-twinposthog · wrong-length | Must not flagT2 · Tool-corroborated · twin | Quiet |
posthog-token-body-50-twinposthog · wrong-length | Must not flagT2 · Tool-corroborated · twin | Quiet |
posthog-token-ellipsis-placeholderposthog · documentation-placeholder | Must not flagT3 · Project policy | Quiet |
posthog-token-env-reference-referenceposthog · templated-reference | Must not flagT3 · Project policy | Quiet |
posthog-token-event-uuid-encoded-valueposthog · benign-encoded-value | Must not flagT2 · Tool-corroborated | Quiet |
posthog-token-host-urls-public-idposthog · public-identifier | Must not flagT2 · Tool-corroborated | Quiet |
posthog-token-hyphen-in-body-twinposthog · wrong-alphabet | Must not flagT2 · Tool-corroborated · twin | Quiet |
posthog-token-hyphen-prefix-twinposthog · prefix-near-miss | Must not flagT2 · Tool-corroborated · twin | Quiet |
posthog-token-key-guidance-proseposthog · prose-mention | Must not flagT3 · Project policy | Quiet |
posthog-token-label-proseposthog · benign-lookalike | Must not flagT3 · Project policy | Quiet |
posthog-token-leading-glue-twinposthog · boundary-violation | Must not flagT2 · Tool-corroborated · twin | Quiet |
posthog-token-maskposthog · benign-lookalike | Must not flagT3 · Project policy | Quiet |
posthog-token-masked-placeholderposthog · documentation-placeholder | Must not flagT3 · Project policy | Quiet |
posthog-token-prefix-onlyposthog · benign-lookalike | Must not flagT2 · Tool-corroborated | Quiet |
posthog-token-project-token-bare-public-idposthog · public-identifier | Must not flagT2 · Tool-corroborated | Quiet |
posthog-token-project-token-html-public-idposthog · public-identifier | Must not flagT2 · Tool-corroborated | Quiet |
posthog-token-project-token-init-public-idposthog · public-identifier | Must not flagT2 · Tool-corroborated | Quiet |
posthog-token-referenceposthog · benign-lookalike | Must not flagT3 · Project policy | Quiet |
posthog-token-short-bodyposthog · benign-lookalike | Must not flagT2 · Tool-corroborated | Quiet |
posthog-token-short-prefix-twinposthog · prefix-near-miss | Must not flagT2 · Tool-corroborated · twin | Quiet |
posthog-token-trailing-glue-twinposthog · boundary-violation | Must not flagT2 · Tool-corroborated · twin | Quiet |
posthog-token-truncated-near-missposthog · format-near-miss | Must not flagT2 · Tool-corroborated | Quiet |
posthog-token-unknown-role-prefix-twinposthog · prefix-near-miss | Must not flagT2 · Tool-corroborated · twin | Quiet |
posthog-token-uppercase-prefix-twinposthog · prefix-near-miss | Must not flagT2 · Tool-corroborated · twin | Quiet |
Sources
Documentation and code
- posthog.com/docs/api/personal-api-keys
- github.com/redact-secret/redact-secret/blob/270faf84dc12f6a4a4cf61fe3ffab7aadc4f7262/docs/audits/evidence/860/posthog.md
- github.com/PostHog/posthog/blob/658715dd3b434e0a5ada471981d4053b70e72034/posthog/models/utils.py
- github.com/PostHog/posthog/pull/52495
Research log
- redact-secret/redact-secret#860Research issue
- redact-secret/redact-secret#906Research issue
- redact-secret/redact-secret-benchmarks#434Research issue
- Final evidence, pinned to a commit/redact-secret/redact-secret/blob/8b6a5fde52ecb4dfce13f09c7a947062d21483c7/docs/audits/evidence/860/posthog.md