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

Asymmetric Private Key secret rule triggers on empty secret #2427

Closed
paul-gould opened this issue Jun 30, 2022 · 2 comments · Fixed by #2434
Closed

Asymmetric Private Key secret rule triggers on empty secret #2427

paul-gould opened this issue Jun 30, 2022 · 2 comments · Fixed by #2434
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@paul-gould
Copy link

Description

Since 0.29.2, the asymmetric private key rule is triggering on python3.9/site-packages/googleapiclient/discovery_cache/documents/appengine.v1.json. This is a schema definition and contains the text

Must include the header and footer. Example: -----BEGIN RSA PRIVATE KEY----- -----END RSA PRIVATE KEY-----

This is using the GitHub trivy-action, which looks to have been updated to use trivy v 0.29.2 last night.

What did you expect to happen?

Detection not triggered as the keyblock only contains whitespace.

What happened instead?

Detection triggered.

Additional details (base image name, container registry info...):

Culprit looks to be the change made in aquasecurity/fanal@e8bca31. Adding the extra - now means that the regex will match a whitespace-only keyblock, which didn't happen previously. However, I think the regex needs to be updated so that a keyblock that contains only whitespace is not a match.

@paul-gould paul-gould added the kind/bug Categorizes issue or PR as related to a bug. label Jun 30, 2022
@DmitriyLewen
Copy link
Contributor

Hello @paul-gould
Thank a lot for your report!

I will check this case and write to you

Regards, Dmitriy

@DmitriyLewen
Copy link
Contributor

Hello @paul-gould

Thanks for your report!
We fixed your bug.

Fix will be contain in next release.
You can skip this file.

Best Regards, Dmitriy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants