You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Stop reusing expired GitHub App tokens after a clock rollback #1157
A long-running loop-zero process can send an expired GitHub App installation token after the host clock is corrected backward. The process keeps using the expired credential while its cache still sees a token younger than 3,000 seconds.
In an offline replay at 79f92c97, the token was minted at wall time 10,000 seconds. After 3,620 seconds of real elapsed time and a 1,000-second backward wall-clock step, the clock read 12,620. The cache returned expired token reused=True true age=3620s wall age=2620s. Its negative-age guard does not trigger because the adjusted clock is still after mint time.
Measure the in-process cache age with a monotonic clock that counts suspend time, such as Linux CLOCK_BOOTTIME. Start age measurement before minting and keep the existing refresh margin before GitHub's one-hour expiry.
Acceptance criteria
A rollback that leaves wall time after mint time cannot extend reuse past the cache lifetime. A fake-clock test covers the replay above.
An ordinary cache hit still reuses a fresh token. A suspend long enough to cross the cache lifetime makes the next read mint a fresh token.
Merge-authority hold for #1209. The change governs reuse of GitHub App installation credentials. The proposed cache uses suspend-aware elapsed time and mints per call on hosts without that clock. The decisions owner can lift the hold after accepting the expiry behavior and the fallback minting cost.
Activity
eowca commentedon Nov 26, 2026
Merge-authority hold for #1209. The change governs reuse of GitHub App installation credentials. The proposed cache uses suspend-aware elapsed time and mints per call on hosts without that clock. The decisions owner can lift the hold after accepting the expiry behavior and the fallback minting cost.