-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[detector] feat: added rootly detector #3414
base: main
Are you sure you want to change the base?
Conversation
pkg/detectors/rootly/rootly.go
Outdated
// Keywords are used for efficiently pre-filtering chunks. | ||
// Use identifiers in the secret preferably, or the provider name. | ||
func (s Scanner) Keywords() []string { | ||
return []string{"rootly"} |
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.
return []string{"rootly"} | |
return []string{"rootly_"} |
if len(match) != 1 { | ||
continue | ||
} | ||
resMatch := strings.TrimSpace(match[0]) |
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.
Just curious, how did you generate this? This logic, present in some detectors, is old and doesn't conform to current best practices.
The "alchemy" detector seems to be the template that is good to follow.
https://github.com/trufflesecurity/trufflehog/blob/main/hack/docs/Adding_Detectors_external.md
https://github.com/trufflesecurity/trufflehog/blob/aa17b8eba486bbdf19bc77aedb3c56f9cb00e1ac/pkg/detectors/alchemy/alchemy.go
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 actually took the reference from alienvault
and tried to follow that, I will update 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.
@rgmz Can you check again?
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.
Description:
Explain the purpose of the PR.
Relates to #3396
I have verified the tests for rootly by trying it with original working API key and here are the results.
Detector Unit Tests:
Checklist:
make test-community
)?make lint
this requires golangci-lint)?