Scanning commits limited to a merge request #1088
-
Hi all, My gitleaks command looks like this: When I run the gitleaks detect scan the number of commits scanned are mostly less than the Can anyone please help me if the output is expected or do I need to make some changes. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi maybe this could help:
They achieved what you want to do, but it only works on some platforms. git rev-list -n 1 refs/remotes/origin/<source_branch>
git rev-parse refs/remotes/origin/<target_branch> The questions is how to retrieve the target & sources branches during the execution of the pipeline. |
Beta Was this translation helpful? Give feedback.
-
I think the best way to scan only MR commits is to use gitleaks like this, scanning only commits that are in a branch, and not in the other one yet:
|
Beta Was this translation helpful? Give feedback.
Hi maybe this could help:
They achieved what you want to do, but it only works on some platforms.
It may be possible to do the same using some shell script.
As they say in the first link:
The questions is how to retrieve the target & sources branches during the execution of the pipeline.