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

Custom Secret Regex (invalid regex) throwing a panic message #4348

Closed
cxlucas opened this issue Oct 7, 2021 · 0 comments · Fixed by #4347
Closed

Custom Secret Regex (invalid regex) throwing a panic message #4348

cxlucas opened this issue Oct 7, 2021 · 0 comments · Fixed by #4347
Labels
bug Something isn't working

Comments

@cxlucas
Copy link
Contributor

cxlucas commented Oct 7, 2021

Expected Behavior

If the custom secret regex is invalid or bad formatted, the Kics should avoid running it and must display a default error message.

Actual Behavior

Kics is throwing a panic message in the CLI.

image

Steps to Reproduce the Problem

(Command line arguments and flags used)

  1. Download the custom regex rules and sample attached to this bug report.
  2. Open terminal.
  3. Go to the Kics folder.
  4. Scan a valid sample with "--secrets-regexes-path path-to-custom-regex-file.json", for example: kics scan -p samples\terraform-secret.tf --secrets-regexes-path samples/regex_rules_48_invalid_regex.json
  5. Kics will throw a panic message in the CLI.

Specifications

  • Version: 1.4.3
  • Platform: N/A
  • Subsystem: N/A

Attachments

samples.zip

@cxlucas cxlucas added the bug Something isn't working label Oct 7, 2021
@cxlucas cxlucas changed the title Custom Secret Regex (invalid) throwing a panic message Custom Secret Regex (invalid regex) throwing a panic message Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant