Skip to content

Commit

Permalink
Use custom fp logic for private keys (#2793)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahrav committed May 6, 2024
1 parent b24b115 commit 27eae92
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/detectors/privatekey/privatekey.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -145,6 +146,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
return results, nil
}

func (s Scanner) IsFalsePositive(_ detectors.Result) bool { return false }

type result struct {
CertificateURLs []string
GitHubUsername string
Expand Down

0 comments on commit 27eae92

Please sign in to comment.