GitHub App tokens are now 520 characters - check your redaction rules
A regex written for the old 40 character format may log the whole new token.
Published here · 2 sources · Resume reading
If your app creates GitHub App installation tokens, a redaction rule written for the old format may be writing the whole new token to your logs.
GitHub's changelog (Oct 2, 2026): new installation tokens still start with ghs_ but are now about 520 characters long instead of 40. Tokens still expire after one hour, so old 40 character tokens are already gone, unless your app sends X-GitHub-Stateless-S2S-Token: disabled, which GitHub stops honoring on Nov 30, 2026.
The fix block
- Find every rule, check and fixture that knows the prefix:
rg -n 'ghs_' .- Widen what it finds. A pattern that does not guess the new character set:
ghs_[^\s"']+-
Token columns, secret stores and env vars: no small fixed limit (TEXT is safest).
-
Proxies, gateways and middleware: make sure they do not cut or reject long Authorization headers.
-
Remove the
X-GitHub-Stateless-S2S-Tokenheader from production code before Nov 30, 2026.
Example
Python 3.9.6, a fake 520 character token shaped ghs_<app id>_<JWT>, app id 000000: the legacy pattern ghs_[A-Za-z0-9]{36} matched nothing, so the whole token stayed in the log line. A ghs_\w{36} rule was worse: it blanked the first 40 characters and left 480 in the log. ghs_[^\s"']+ replaced the whole token.
GitHub does not publish the new character set; the fake token shape is an assumption. Secret scanners with a 36 character rule may miss these tokens too. This is about GitHub App installation tokens (ghs_); the changelog does not mention personal access tokens or Actions' GITHUB_TOKEN.
Send this to the teammate whose log redaction regex was written for 40 character GitHub tokens.
Keep this guide
Questions about this guide
When do old 40 character tokens expire?
Installation tokens expire after one hour, so old 40 character tokens are already gone unless your app sends X-GitHub-Stateless-S2S-Token: disabled. GitHub stops honoring that header on Nov 30, 2026.
What prefix should my redaction rule match?
Tokens still start with ghs_ but the length changed. Match the prefix and avoid assumptions about the character set.