You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I would like to report an issue where GitLeaks CI fails with the error Invalid revision range.
Reproduction steps:
Create a PR with a commit to a target branch that runs GitLeaks on PRs
Instantly, create a new commit on the source branch
Notice the GitLeaks CI check fails on the 1st commit with similar to below details:
[...]
7:30AM DBG executing: /usr/bin/git -C . log -p -U0 --no-merges --first-parent a833a[...]^..ea4e0[...]
7:30AM ERR [git] fatal: Invalid revision range a833a[...]^..ea4e0[...][27](https://github.com/xxxxx#step:5:28)
7:30AM DBG 0 commits scanned. Note: this number might be smaller than expected due to commits with no additions
7:30AM ERR git error encountered, see logs
7:30AM WRN partial scan completed in 60.2ms
7:30AM WRN no leaks found in partial scan
[...]
This issue seems like a race-condition to me where the GitLeaks initiated on the 1st commit but also got the details of the latest commit but git log does not have the details about the latest commit.
Root Cause:
I also did some analysis:
1st commit: a833a --> Initiated the GitLeaks CI --> Fails with Invalid revision range error
2nd commit: ea4e0 (note that this commit should be instantly after the 1st commit so that GitLeaks gets confused) --> Initiated the GitLeaks CI --> Pass (obv if no leak found)
Now notice, GitLeaks on the 1st commit has the Invalid revision range error, and looking in detail you will find out that it also has the commit address of the 2nd commit. How is that possible?
Hello,
I would like to report an issue where GitLeaks CI fails with the error
Invalid revision range
.Reproduction steps:
This issue seems like a race-condition to me where the GitLeaks initiated on the 1st commit but also got the details of the latest commit but
git log
does not have the details about the latest commit.Root Cause:
I also did some analysis:
1st commit: a833a --> Initiated the GitLeaks CI --> Fails with
Invalid revision range
error2nd commit: ea4e0 (note that this commit should be instantly after the 1st commit so that GitLeaks gets confused) --> Initiated the GitLeaks CI --> Pass (obv if no leak found)
Now notice, GitLeaks on the 1st commit has the
Invalid revision range
error, and looking in detail you will find out that it also has the commit address of the 2nd commit. How is that possible?cc/ @weineran @zricethezav
Thanks!
The text was updated successfully, but these errors were encountered: