Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add warning for quoted --log-opts values #1160

Merged
merged 1 commit into from
Jun 14, 2023

Conversation

rgmz
Copy link
Contributor

@rgmz rgmz commented Apr 24, 2023

Description:

This is a proposed 'fix' for the bizarre behaviour described in #1153.

$ ./gitleaks detect --log-level debug --log-opts="--full-history --all -- ':(exclude)cypress/**/*' \"foo\"" --source .


    ○
    │╲
    │ ○
    ○ ░
    ░    gitleaks

10:24AM DBG no gitleaks config found in path .gitleaks.toml, using default gitleaks config
10:24AM DBG found .gitleaksignore file
10:24AM WRN the following `--log-opts` values may not work as expected: [':(exclude)cypress/**/*' "foo"]
        see https://github.com/gitleaks/gitleaks/issues/1153 for more information
10:24AM DBG executing: /usr/bin/git -C . log -p -U0 --full-history --all -- ':(exclude)cypress/**/*' "foo"
10:24AM INF 0 commits scanned.
10:24AM DBG Note: this number might be smaller than expected due to commits with no additions
10:24AM INF scan completed in 57.3ms
10:24AM INF no leaks found

Checklist:

  • Does your PR pass tests?
  • Have you written new tests for your changes?
  • Have you lint your code locally prior to submission?

References

This fixes #1153.

@zricethezav
Copy link
Collaborator

@rgmz great change, thanks!

@zricethezav zricethezav merged commit 7f53b03 into gitleaks:master Jun 14, 2023
@rgmz rgmz deleted the feat/warn-logopts-quotes branch June 14, 2023 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gitleaks scans 0 commits if log-opts includes a pathspec
2 participants