fix(github): evict a cached App JWT on rejection to stop fleet-wide token-minting poisoning - #2491
Conversation
…oken-minting poisoning Fixes JSONbored#2453 Co-authored-by: Cursor <cursoragent@cursor.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2491 +/- ##
==========================================
+ Coverage 95.93% 95.95% +0.02%
==========================================
Files 225 226 +1
Lines 25336 25432 +96
Branches 9217 9245 +28
==========================================
+ Hits 24306 24404 +98
Misses 417 417
+ Partials 613 611 -2
🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-02 06:48:29 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 8 non-blocking
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
JSONbored
left a comment
There was a problem hiding this comment.
Maintainer-only issue, and also, test gaps:
the main weakness is that the regression test proves retry behavior but does not prove the retried request used a newly signed JWT rather than the same cached credential.
Closing.
Summary
withInstallationTokenRetrypattern for installation tokens.Fixes #2453
Test plan
REGRESSION (#2453): evicts a rejected App JWT and retries the mint once instead of failing outrightREGRESSION (#2453): does not infinite-loop when the retried App JWT is ALSO rejected