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
Describe the bug
When triggered by pull_request, both the GITHUB_REF_NAME and GITHUB_SHA default variables will reference the last merge commit of the pull request merge branch rather than the actual last commit to the head branch (see documentation). This causes pull request runs to scan 0 commits most of the time (see screenshots).
To Reproduce
Steps to reproduce the behavior:
Create a branch in a repo with this workflow set up
Create any number of regular commits in the repo
Create a pull request
Compare the last commit hash to the head commit hash used and check the number of commits scanned
Expected behavior
Gitleaks should be scanning from the last commit of the head branch
Screenshots
Workflow run
SHA of last commit on head branch that triggered the above workflow
Additional context
According to the documentation linked above, we should be able to get what we need from github.event.pull_request.head.sha, but it will probably need to be passed into the script somehow.
The text was updated successfully, but these errors were encountered:
Describe the bug
When triggered by
pull_request
, both theGITHUB_REF_NAME
andGITHUB_SHA
default variables will reference the last merge commit of the pull request merge branch rather than the actual last commit to the head branch (see documentation). This causes pull request runs to scan 0 commits most of the time (see screenshots).To Reproduce
Steps to reproduce the behavior:
Expected behavior
Gitleaks should be scanning from the last commit of the head branch
Screenshots
Workflow run
SHA of last commit on head branch that triggered the above workflow
Additional context
According to the documentation linked above, we should be able to get what we need from
github.event.pull_request.head.sha
, but it will probably need to be passed into the script somehow.The text was updated successfully, but these errors were encountered: