Skip to content

Commit

Permalink
censored the refresh token in result
Browse files Browse the repository at this point in the history
  • Loading branch information
kashifkhan0771 committed Oct 28, 2024
1 parent c2ff0f2 commit 8088855
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
DetectorType: detectorspb.DetectorType_GCPApplicationDefaultCredentials,
Raw: []byte(detectedClientID),
RawV2: []byte(detectedClientID + creds.RefreshToken),
Redacted: creds.RefreshToken,
Redacted: creds.RefreshToken[:3] + "..." + creds.RefreshToken[min(len(creds.RefreshToken)-1, 47):], // censor the refresh token
}

if verify {
Expand Down

0 comments on commit 8088855

Please sign in to comment.