-
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 flowdock scanner #407
Added flowdock scanner #407
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.
couple suggestions otherwise lgtm 👍
pkg/detectors/flowdock/flowdock.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{"flowdock"}) + `\b([0-9a-z]{32})\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: this regex can be made a bit stricter \b([0-9a-f]{32})\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.
Some extra context: it's hex encoding that uses the a-f characters rather than a-z
pkg/detectors/flowdock/flowdock.go
Outdated
} | ||
|
||
if verify { | ||
req, err := http.NewRequestWithContext(ctx, "GET", "https://api.flowdock.com/flows", nil) |
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.
nit: Maybe use https://api.flowdock.com/flows?users=false
in their documentation they state:
A boolean value (1/0) that controls whether a list of users should be included with each flow.
Based on that wording (1 before 0) that indicates to me the default behavior is to include users within the response if that is the case we should probably pass in users=false
to return the response object size. If that is not the case feel free to ignore this 😄
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.
Sure, I just pushed the changes. Thanks @ahrav!
* added new protos * added new detectors * added flowdock scanner * added params
No description provided.