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

Refactor: analyzer.go enhancements #6052

Merged

Conversation

ohaval
Copy link
Contributor

@ohaval ohaval commented Dec 14, 2022

Hey kics team,

When working a bit with the analyzer.go file, I found some logical flows and tiny code improvements.
I wasn't sure if to open an issue for that, so I am just opening this small PR. Please let me know if there is something you need me to do.

In short:

  • Fixed a weird check for an ansible vault using regex, and returning nothing if found (which is the opposite of what we would have been thinking should happen).
  • A missing double quotes in a regex pattern.
  • Changed regex expressions to use a backtick instead of " to avoid the double escape of the \ character.
  • Removed a check at the start of each regex expression of \\s* as when using regex.Match, as it doesn't search only at the start of the searched string. Reference
  • Small typo

Copy link
Collaborator

@cxMiguelSilva cxMiguelSilva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ohaval,
Thank you so much for your amazing contribution!! 🚀
The proposed changes LGTM

@cx-joao-reigota cx-joao-reigota merged commit 01a079c into Checkmarx:master Jan 3, 2023
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.

3 participants