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
Is your feature request related to a problem? Please describe.
Gitleaks itself has an option to pass in log-opts to it's commands. This GH action is missing this configuration option
When running detect on a git repository, gitleaks will parse the output of a git log -p command (you can see how this executed [here](https://github.com/zricethezav/gitleaks/blob/7240e16769b92d2a1b137c17d6bf9d55a8562899/git/git.go#L17-L25)).
[git log -p generates patches](https://git-scm.com/docs/git-log#_generating_patch_text_with_p) which gitleaks will use to detect secrets.
You can configure what commits git log will range over by using the --log-opts flag. --log-opts accepts any option for git log -p.
For example, if you wanted to run gitleaks on a range of commits you could use the following command: gitleaks detect --source . --log-opts="--all commitA..commitB".
See the git log [documentation](https://git-scm.com/docs/git-log) for more information.
Describe the solution you'd like
Being able to pass in log_opts or log-opts in the action configuration like this:
################# Run Gitleaks #################
- name: Run Gitleaksid: gitleaksuses: DariuszPorowski/github-action-gitleaks@v2with:
log_opts: "my-branch --no-merges -p"
Describe alternatives you've considered
Currently one should be able to bypass this limitation by adding the log opts to the baseline_path like this: baseline_path: "${{ github.workspace }}/.gitleaks-baseline.json --log-opts='my-branch --no-merges -p'".
While this may work it's pretty ugly and only works in the main branch as this action already passes the log-opts when running inside a PR.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Gitleaks itself has an option to pass in
log-opts
to it's commands. This GH action is missing this configuration optionQuoted from https://github.com/gitleaks/gitleaks/blob/master/README.md#detect:
Describe the solution you'd like
Being able to pass in
log_opts
orlog-opts
in the action configuration like this:Describe alternatives you've considered
Currently one should be able to bypass this limitation by adding the log opts to the baseline_path like this:
baseline_path: "${{ github.workspace }}/.gitleaks-baseline.json --log-opts='my-branch --no-merges -p'"
.While this may work it's pretty ugly and only works in the main branch as this action already passes the log-opts when running inside a PR.
The text was updated successfully, but these errors were encountered: