docs(security): document the public token revocation endpoint - #70
Draft
posthog[bot] wants to merge 1 commit into
Draft
docs(security): document the public token revocation endpoint#70posthog[bot] wants to merge 1 commit into
posthog[bot] wants to merge 1 commit into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
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_reportfired only 3 times in 60 days — the capability works but is effectively undiscovered, so exposed credentials stay live longer than needed.Changes
SECURITY.mdwith both region URLs (US and EU) and acurlexample."found": falseresult 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.mdlives inPostHog/.github. The other two need separate PRs inPostHog/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 mandatoryExpires:field (RFC 9116 non-compliance trips scanners and enterprise reviews).Worth flagging in review
SECURITY.mdandsecurity.txtboth usesecurity-reports@posthog.com, while the PGP key and our reply usesecurity@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.