Find, verify, and analyze leaked credentials
Go credentialsdevsecopsdynamic-analysisprecommitscanningsecretsecret-managementsecretssecuritysecurity-toolstrufflehogverification
Use custom fp logic for private keys (#2793)
ahrav27eae925deee
diff --git a/pkg/detectors/privatekey/privatekey.go b/pkg/detectors/privatekey/privatekey.goindex dcbb3271d..ab6eefa47 100644--- a/pkg/detectors/privatekey/privatekey.go+++ b/pkg/detectors/privatekey/privatekey.go@@ -25,6 +25,7 @@ type Scanner struct {// Ensure the Scanner satisfies the interface at compile time.var _ detectors.Detector = (*Scanner)(nil)+var _ detectors.CustomFalsePositiveChecker = (*Scanner)(nil)var (// TODO: add base64 encoded key support@@ -145,6 +146,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultreturn results, nil}+func (s Scanner) IsFalsePositive(_ detectors.Result) bool { return false }+type result struct {CertificateURLs []stringGitHubUsername string