Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

GitHub Engineering 3 min read Deep dive mediumAdept

Behind GitHub’s new authentication token formats

GitHub's new token formats add a three-letter identifiable prefix (ghp, gho, ghu, ghs, ghr) with an underscore separator, a CRC32 checksum encoded in Base62 in the last six characters, and a Base62 random portion. The prefix alone is expected to cut secret-scanning false positives to about 0.5%. The checksum lets fake tokens be rejected offline without a database lookup. OAuth token entropy rises from 160 to 178 bits at the same 40-character length, and the underscore is chosen because it is not a Base64 character and double-click selects the whole token.

Assumes: API authentication tokenschecksums

Related posts

  • Finding leaked passwords with AI: How we built Copilot secret scanning

    GitHub Engineering mediumAdept

    GitHub replaced regex-based detection of generic passwords with an LLM prompt that judges candidate secrets from their file context. The first GPT-3.5-Turbo few-shot prompt broke on unusual file types in customer repos. GitHub responded by expanding offline evals with customer reports and GPT-4-generated cases, adding GPT-4 as a confirming scanner, and adopting Microsoft's MetaReflection hybrid chain-of-thought/few-shot prompt. To scale full-history scans, they excluded low-value files and built a workload-aware rate limiter in which workloads borrow unused LLM capacity from each other. Mirror testing on preview repos showed up to a 94% drop in false positives with little recall loss.

  • Common annotated security keys

    Engineering@Microsoft easyNovice

    Microsoft's Common Annotated Security Standard (CASK) extends GitHub's identifiable-token approach of fixed signatures plus checksums, so leaked secrets can be detected with near-zero false positives. Every CASK key carries a shared `JQQJ` signature, which lets one scanner rule find any conforming key, plus a provider signature such as `AZDO` for Azure DevOps. Keys use only Base62 characters, carry about 310 bits of entropy across 52 random characters, and embed a month/year creation timestamp to support rotation policies. The format also reserves test keys and platform-specific metadata bits, and Microsoft plans to open-source the spec for other providers to adopt.

  • Your alt text passes automated checks. That doesn’t mean it’s any good.

    GitHub Engineering mediumAdept

    GitHub's alt text plugin for its Accessibility Scanner splits checks into five deterministic, on-by-default rules and one opt-in model-backed rule. The deterministic rules flag missing, filename, placeholder, single-generic-word and repeated alt text using exact-match closed sets, accepting misses to avoid false positives. Repeated-alt detection uses on-screen bounding-box gaps rather than DOM order. The opt-in rule sends the image and page context to a vision model through GitHub Models, with an ordered decision procedure, anti-nitpick rules and reasoning-before-verdict structured output to stop it critiquing good alt text. URL redaction, off-by-default cost and privacy controls, and known gaps such as computed accessible names, SVGs and authenticated images are covered.

  • Automatically Rotating GitHub Tokens (So You Don’t Have To)

    Shopify Engineering mediumAdept

    Shopify replaced long-lived GitHub personal access tokens with short-lived GitHub App installation tokens that are rotated automatically by scheduled GitHub Actions workflows and written into repository secrets. Developers can reference those secrets exactly as they did PATs. The design avoids breakage from developer churn and misattribution of actions, and shrinks the blast radius of leaked tokens. Lessons learned: billable minutes are rounded per job, so parallel jobs were consolidated into one sequential job. The cron `schedule` trigger is best-effort, so it moved to explicit minute-of-hour runs every 15 minutes to stay within the one-hour token expiry. Onboarding evolved into a plop.js wizard with use-case-based permission selection, and a step-by-step recipe for building the rotator closes out the write-up.

  • Security Disclosure Recommendation: Check for Anomalous GitHub Access

    Railway mediumAdept

    Railway users who connect GitHub, following the October 21, 2026 security disclosure, should audit their GitHub accounts for persistence an attacker may have left behind, then confirm no unexpected commits reached their deployments. On personal accounts, filter the 90-day security log for authentication and access events and review OAuth apps, GitHub Apps, SSH/GPG keys and personal access tokens, regenerating all tokens. Organization owners should export the 180-day audit log before revoking anything, then check third-party access and each repository's deploy keys, secrets, webhooks and collaborators, since these can outlive a password reset.

The quest for software engineering knowledge.

Look:
Layout: