detect-secrets icon indicating copy to clipboard operation
detect-secrets copied to clipboard

Make quotes required in keyword detector golang regexes

Open KevinHock opened this issue 5 years ago • 2 comments

Two liner to fix, changing
https://github.com/Yelp/detect-secrets/blob/cd8b3999e141ed4faec75e5db087df0db2339f58/detect_secrets/plugins/keyword.py#L229-L230 to be FOLLOWED_BY_COLON_QUOTES_REQUIRED_REGEX: 5, FOLLOWED_BY_EQUAL_SIGNS_QUOTES_REQUIRED_REGEX: 4,

I think

From https://blog.golang.org/strings I think this is fine

Probably .kt files too.

KevinHock avatar Aug 07 '20 00:08 KevinHock

cc @baboateng I think will be fine and not result in false-negatives, but wanted to give you a heads-up.

KevinHock avatar Aug 07 '20 00:08 KevinHock

Note-to-self: Add api to the fp's list, too.

And e.g. = 5;

anything 4 chars or less

KevinHock avatar Aug 24 '20 19:08 KevinHock