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

[detector] feat: added rootly detector #3414

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

sahil9001
Copy link
Contributor

@sahil9001 sahil9001 commented Oct 15, 2024

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.

Screenshot 2024-10-16 at 8 33 32 PM

Detector Unit Tests:
image

Checklist:

  • Tests passing (make test-community)?
  • Lint passing (make lint this requires golangci-lint)?

@sahil9001 sahil9001 requested a review from a team as a code owner October 15, 2024 18:09
// 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"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return []string{"rootly"}
return []string{"rootly_"}

Comment on lines +40 to +43
if len(match) != 1 {
continue
}
resMatch := strings.TrimSpace(match[0])
Copy link
Contributor

@rgmz rgmz Oct 15, 2024

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

Copy link
Contributor Author

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.

Copy link
Contributor Author

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-10-16 at 12 25 23 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants