-
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
Enhanced the easyinsight detector #3384
Enhanced the easyinsight detector #3384
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.
Some suggestions on improvement, which is applicable for any future detector changes.
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.
Thanks for taking this up. Here are few comments regarding the selection of keywords and improvements of resources utilization.
auth := fmt.Sprintf("%s:%s", resIdMatch, resMatch) | ||
sEnc := b64.StdEncoding.EncodeToString([]byte(auth)) | ||
|
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: Moving the verification code will improve the resources management (memory clean-up etc) and code readability.
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.
Looks good to me.
* main: (127 commits) Update SaladCloud description (trufflesecurity#3399) fix tests (trufflesecurity#3400) [chore] Update custom detector default description (trufflesecurity#3398) add description to salad (trufflesecurity#3397) Add detector for SaladCloud API Keys (trufflesecurity#3273) fix(deps): update module github.com/xanzy/go-gitlab to v0.111.0 (trufflesecurity#3393) Add SliceContainsString common util (trufflesecurity#3395) fix: pr template link to golangci-lint (trufflesecurity#3392) fix(deps): update golang.org/x/exp digest to f66d83c (trufflesecurity#3389) Separate detector tests into unit/integration (trufflesecurity#3274) Manually upgrade github dep (trufflesecurity#3387) Updated Fastly Personal Token Detector (trufflesecurity#3386) fix(deps): update module google.golang.org/api to v0.200.0 (trufflesecurity#3391) [Fix] Snowflake privatelink Support (trufflesecurity#3286) Enhanced the easyinsight detector (trufflesecurity#3384) Log skipped files on debug level (trufflesecurity#3383) build: update retracted bluemonday ver (trufflesecurity#3369) Fix git binary handling and add a smoke test (trufflesecurity#3379) fix(deps): update module google.golang.org/protobuf to v1.35.1 (trufflesecurity#3382) Added Cisco Meraki API Key detector (trufflesecurity#3367) ... # Conflicts: # pkg/engine/defaults.go # pkg/pb/detectorspb/detectors.pb.go # proto/detectors.proto
Description:
This PR enhance the following things in
easyinsight
detector.Pattern Test Cases:
Checklist:
make test-community
)?make lint
this requires golangci-lint)?