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

fix(detect): avoid panic with verbose flag #1143

Merged
merged 4 commits into from
Apr 19, 2023

Conversation

rgmz
Copy link
Contributor

@rgmz rgmz commented Apr 12, 2023

Description:

This should fix the panic from #1141 by skipping formatting of f.Line and f.Secret for file matches, which have an empty value anyways.

It does not fix the underlying behaviour of panics being intermittently swallowed by semgroup.

d.addFinding(finding)

Checklist:

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

@rgmz

This comment was marked as resolved.

@zricethezav zricethezav self-assigned this Apr 19, 2023
@zricethezav
Copy link
Collaborator

Thanks so much @rgmz, I tested this locally and I'm seeing no change in behavior. @agmond this should fix #1145

@zricethezav zricethezav merged commit bd8b145 into gitleaks:master Apr 19, 2023
1 check passed
@rgmz rgmz deleted the fix/detect-verbose-panic branch April 24, 2023 13:40
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.

None yet

2 participants