-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Added aha scanner #402
Added aha scanner #402
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small suggestion otherwise lgtm.
pkg/detectors/aha/aha.go
Outdated
client = common.SaneHttpClient() | ||
|
||
//Make sure that your group is surrounded in boundry characters such as below to reduce false positives | ||
keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"aha"}) + `\b([0-9a-zA-Z]{64})\b`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: You can tighten up this regex pattern by using \b([0-9a-f]{64})\b
Aha's API keys are encoded so they only use a-f0-9.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just modified the regex as suggested. Thanks @ahrav!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some extra context: it's hex encoding that uses the a-f characters rather than a-z
* added new protos * added new detectors * added aha scanner * enhanced regex
No description provided.