Skip to content

docs(security): document the public token revocation endpoint - #70

Draft
posthog[bot] wants to merge 1 commit into
mainfrom
posthog-self-driving/docssecurity-surface-the-public-leaked-95669e
Draft

docs(security): document the public token revocation endpoint#70
posthog[bot] wants to merge 1 commit into
mainfrom
posthog-self-driving/docssecurity-surface-the-public-leaked-95669e

Conversation

@posthog

@posthog posthog Bot commented Aug 21, 2026

Copy link
Copy Markdown

Problem

  • A customer security team with potentially exposed tokens was routed to PGP email, because our live self-service revocation endpoint is documented nowhere they would look.
  • PublicLeakedKeyReport (POST /api/revoke_leaked_key) has been live since 2026-08-12: an unauthenticated, rate-limited endpoint that revokes a leaked token on the spot and emails the owner. It covers personal API keys, project secret API keys, and OAuth access and refresh tokens.
  • public_leaked_key_report fired only 3 times in 60 days — the capability works but is effectively undiscovered, so exposed credentials stay live longer than needed.

Changes

  • Add a Revoking a Leaked API Key or Token section to SECURITY.md with both region URLs (US and EU) and a curl example.
  • Note that a "found": false result is region-local and does not mean the token is safe everywhere.

Out of scope for this repo

The linked report names three surfaces. Only SECURITY.md lives in PostHog/.github. The other two need separate PRs in PostHog/posthog.com:

  • contents/docs/api/index.mdx — document the endpoint next to the GitHub Secret Scanning partnership section.
  • static/.well-known/security.txt — link the endpoint and add the mandatory Expires: field (RFC 9116 non-compliance trips scanners and enterprise reviews).

Worth flagging in review

  • SECURITY.md and security.txt both use security-reports@posthog.com, while the PGP key and our reply use security@posthog.com. One of these is wrong. Left unchanged here because the canonical address is a policy decision, not a doc fix.

Created with PostHog Desktop from this inbox report.

Point exposed customers at the live self-service key-revocation API. The
endpoint (POST /api/revoke_leaked_key) rotates a leaked token and emails the
owner, but nothing linked it, so a security team was routed to PGP email
instead.

Generated-By: PostHog Desktop
Task-Id: deccba38-b983-44c0-a9ef-521c932c7fa9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants