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

engines/jvm:fix - false positives on base64 encode/decode #974

Merged
merged 1 commit into from
Feb 9, 2022

Conversation

matheusalcantarazup
Copy link
Contributor

@matheusalcantarazup matheusalcantarazup commented Feb 7, 2022

Previously the rules of encode/decode Base64 was reporting any string
that had the value encode/decode which was generating a lot of false
positive. This commit improve the regex of these rules to catch only
the method call that match encode or decode on name.

The type of rule HS-JVM-24 was changed from AndMatch to OrMatch to
follow the same behaviour of HS-JVM-28.

Fixes #816

Signed-off-by: Matheus Alcantara matheus.alcantara@zup.com.br

- What I did

- How to verify it

- Description for the changelog

internal/services/engines/jvm/rules.go Outdated Show resolved Hide resolved
internal/services/engines/jvm/rules.go Outdated Show resolved Hide resolved
Previously the rules of encode/decode Base64 was reporting any string
that had the value encode/decode which was generating a lot of false
positive. This commit improve the regex of these rules to catch only
the method call that match encode or decode on name.

The type of rule HS-JVM-24 was changed from AndMatch to OrMatch to
follow the same behaviour of HS-JVM-28.

Fixes #816

Signed-off-by: Matheus Alcantara <matheus.alcantara@zup.com.br>
@wiliansilvazup wiliansilvazup merged commit c4184c5 into main Feb 9, 2022
@wiliansilvazup wiliansilvazup deleted the fix-rule-jvm-38 branch February 9, 2022 15:55
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.

False positive when dealing with basic authentication's and Base64 encoding
4 participants