-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Enabled and Enhanced Artifactory Detector #4207
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
Enabled and Enhanced Artifactory Detector #4207
Conversation
badce59
to
3fd026a
Compare
2062eac
to
0dcc0e3
Compare
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.
Awesome! Thanks for the updates
@@ -26,14 +29,20 @@ var ( | |||
defaultClient = detectors.DetectorHttpClientWithNoLocalAddresses | |||
|
|||
// Make sure that your group is surrounded in boundary characters such as below to reduce false positives. | |||
keyPat = regexp.MustCompile(`\b([a-zA-Z0-9]{73}|\b[a-zA-Z0-9]{64})`) | |||
URLPat = regexp.MustCompile(`\b([A-Za-z0-9](?:[A-Za-z0-9\-]{0,61}[A-Za-z0-9])\.jfrog\.io)`) | |||
keyPat = regexp.MustCompile(`\b([a-zA-Z0-9]{64,73})\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.
Hi @kashifkhan0771,
Do correct me on this, old regex would have either matched 73
or 64
chars and the new one matches every thing in between.
have you confirmed that they keys size is now random and lies within this range? if not will it not lead to false positives?
Description:
This PR enables Artifactory detector and enhances it
oss-236
Checklist:
make test-community
)?make lint
this requires golangci-lint)?