Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pkg/detectors/privatekey/privatekey.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
ExtraData: make(map[string]string),
}

// set not normalized match as primary secret value so it is used to calculate line of code
s1.SetPrimarySecretValue(match)

var passphrase string
parsedKey, err := ssh.ParseRawPrivateKey([]byte(token))
if err != nil && strings.Contains(err.Error(), "private key is passphrase protected") {
Expand Down