fix(proxy): restore pusher email from the token cache - #1713
Open
sankalpsthakur wants to merge 1 commit into
Open
fix(proxy): restore pusher email from the token cache#1713sankalpsthakur wants to merge 1 commit into
sankalpsthakur wants to merge 1 commit into
Conversation
✅ Deploy Preview for endearing-brigadeiros-63f9d0 canceled.
|
sankalpsthakur
force-pushed
the
fix/1400-token-cache-email
branch
from
September 3, 2026 22:27
8f35edf to
f6f62eb
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1713 +/- ##
=======================================
Coverage 86.05% 86.06%
=======================================
Files 101 101
Lines 5571 5574 +3
Branches 995 997 +2
=======================================
+ Hits 4794 4797 +3
Misses 526 526
Partials 251 251 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
checkUserPushPermission keys on action.userEmail. The token cache only stored the username, so a cache hit left the last committer's email in place and the permission check ran against the wrong user. Store email with the cached identity, and run resolveUserFromToken on tag pushes as well as branch pushes. Related to finos#1400 (cache-hit and tag-chain slices; GHES / unmatched gitAccount paths are unchanged). Signed-off-by: Sankalp Thakur <sankalphimself@gmail.com>
sankalpsthakur
force-pushed
the
fix/1400-token-cache-email
branch
from
September 4, 2026 00:58
f6f62eb to
23be2ce
Compare
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.
Summary
checkUserPushPermissionlooks up the pusher byaction.userEmail. After #1604,resolveUserFromTokenmaps a GitHub PAT to a GitProxy user on a cold cache, but the token cache only stored the username. On a cache hit the username was overwritten and the last-commit committer email fromparsePushwas left in place, so the permission check ran against the wrong user (the remaining path on #1400 that @jescalada reproduced). Tag pushes never ranresolveUserFromTokenat all.{ username, email }and restore both on hitresolveUserFromTokenfirst on the tag-push chain, same as branch pushesDoes not close #1400: GHES / non-github.com providers and unmatched
gitAccountare unchanged.Validation
npx vitest run test/processors/resolveUserFromToken.test.ts test/chain.test.ts test/testCheckUserPushPermission.test.tsRelated to #1400
AI/LLM disclosure