Repository navigation
Release v1.4.3: scan from the trunk of the remote, also when it is master - #28
Merged
Merged
Conversation
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.
Refs #20
v1.4.2 made the secret scan in the pre-push hook real on a network share. That showed a second bug: on a repository whose trunk is
master, the scan read the whole history.What changed
Test-GitleaksBaseline.ps1scans<trunk>..HEAD. The trunk is the first oforigin/main,origin/masterandorigin/HEADthat exists. Before, onlyorigin/mainwas tried, and without it the scan read every commit of every branch. On a share every blob is read over the network, so the pre-push hook ran for a very long time. Before v1.4.2, git refused the checkout and the scan read nothing, so nobody saw it.How it was tested
masterscansorigin/master..HEAD; a remote with onlyorigin/HEADscansorigin/HEAD..HEAD; with bothmainandmaster,mainwins. All gate tests pass (34/34).masteras its trunk, in a local checkout set up the way the hook does it: "Scanning the commits in origin/master..HEAD", 1 commit scanned, no leaks, 5 seconds. The same push under v1.4.2 was still scanning the full history after several minutes.Release steps after the merge: tag
v1.4.3withRelease v1.4.3 for #20, publish the release.