feat: mask authHeader with core.setSecret in git_auth_helpers - #50728
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
feat: mask authHeader using core.setSecret in git_auth_helpers
feat: mask authHeader with core.setSecret in git_auth_helpers
Aug 6, 2026
Copilot created this pull request from a session on behalf of
pelikhan
August 6, 2026 01:02
View session
pelikhan
marked this pull request as ready for review
August 6, 2026 01:03
Contributor
There was a problem hiding this comment.
Pull request overview
Adds runner-side masking for the derived Git authorization value, completing the defense-in-depth protection from #50636.
Changes:
- Registers the base64 token with
core.setSecret. - Adds unit coverage and updates integration mocks.
Show a summary per file
| File | Description |
|---|---|
actions/setup/js/git_auth_helpers.cjs |
Masks the derived credential value. |
actions/setup/js/git_auth_helpers.test.cjs |
Verifies secret registration. |
actions/setup/js/git_auth_helpers.integration.test.cjs |
Adds the required setSecret mock. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Balanced
Contributor
|
🎉 This pull request is included in a new release. Release: |
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.
overridePersistedExtraheadercomputes a base64-encodedAuthorization: basicheader but never registers it with the runner's secret masking. While the primary protection is{ silent: true }on all credential-bearingexeccalls (merged in #50636), the derived base64 value remains unmasked in runner logs if it surfaces through any other path.Changes
git_auth_helpers.cjs— callcore.setSecret(tokenBase64)immediately after computing the base64 value:git_auth_helpers.test.cjs— add assertion thatsetSecretis called with the expected base64 valuegit_auth_helpers.integration.test.cjs— addsetSecret: vi.fn()to the mockcoreobject