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

Restrict Golang Keyword Detection #675

Merged
merged 2 commits into from
Apr 11, 2023
Merged

Conversation

jpdakran
Copy link
Member

@jpdakran jpdakran commented Mar 27, 2023

  • Please check if the PR fulfills these requirements
  • Tests for the changes have been added
  • Docs have been added / updated
  • All CI checks are green
  • What kind of change does this PR introduce?
    Bug Fix

  • What is the current behavior?
    Issue was brought up that there are false positives for the goland keyword detector. This is verified since the regex that should be tracked - FOLLOWED_BY_COLON_EQUAL_SIGNS_REGEX - tracks :=? assignment. Where the equal sign is optional. Therefore we detect key: secret.

  • What is the new behavior (if this is a feature change)?
    The equal sign cannot be optional in golang. The := operator is used for assignment and declaration. This is what we are trying to track - not the possibility of :.

  • Does this PR introduce a breaking change?

No

  • Other information:

…er is optional. Specific for assignment and declaration in golang
@jpdakran jpdakran linked an issue Mar 27, 2023 that may be closed by this pull request
@jpdakran jpdakran merged commit 44095a0 into master Apr 11, 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.

Golang false positive
2 participants