Repository navigation
Use readable placeholder tokens in the GitHub provider test - #45
Merged
Merged
Conversation
dotcom-token and ghes-token on GH_TOKEN and GH_ENTERPRISE_TOKEN read as literal credentials to secret scanners. Use test-secret-not-real-dotcom and test-secret-not-real-ghes; the test still tells the two apart.
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
src/internal/core/providers/vcs_test.gosetGH_TOKENandGH_ENTERPRISE_TOKENtodotcom-tokenandghes-token, which scanners read as literal credentials. They are nowtest-secret-not-real-dotcomandtest-secret-not-real-ghes; the test still tells the two apart.No config change:
check --writefound nothing to add, and.gitleaksignoreis unchanged.Verified locally:
secret_scan.py check --ref HEADexits 0. Gates:make fmt-check vet build-all, and the provider tests that cover this file pass. Tests that bind a local port cannot run in this sandbox.