Skip to content

Commit

Permalink
Tell gitleaks to scan only commits in the current PR
Browse files Browse the repository at this point in the history
  • Loading branch information
atodorov committed Nov 20, 2024
1 parent 18154ec commit ea30bcb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ jobs:
# All available variables are described at https://megalinter.io/latest/configuration/
# and configured in .mega-linter.yml
VALIDATE_ALL_CODEBASE: true
# tells gitleaks to scan only commits in the current PR without setting VALIDATE_ALL_CODEBASE==false
# which has other side effects. See https://github.com/oxsecurity/megalinter/issues/2487 and
# https://megalinter.io/8.2.0/descriptors/repository_gitleaks/
REPOSITORY_GITLEAKS_ARGUMENTS: --log-opts '--no-merges --first-parent ${{ github.event.pull_request.base.sha }}^..${{ github.event.pull_request.head.sha }}'
JSON_JSONLINT_FILTER_REGEX_EXCLUDE: (chainspecs/dryRun*)
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down

0 comments on commit ea30bcb

Please sign in to comment.