Skip to content
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

updated gcpapplicationdefaultcredentials detector results with RawV2 #3499

Conversation

kashifkhan0771
Copy link
Contributor

@kashifkhan0771 kashifkhan0771 commented Oct 24, 2024

Description:

Added refresh token in RawV2 for gcpapplicationdefaultcredentials detector.

JIRA Ticket:

https://trufflesecurity.atlassian.net/jira/servicedesk/projects/CSM/queues/custom/43/CSM-706

Checklist:

  • Tests passing (make test-community)?
  • Lint passing (make lint this requires golangci-lint)?

Copy link
Contributor

@abmussani abmussani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kashifkhan0771 you might need to take a look at integration test as well.

@@ -79,6 +79,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_GCPApplicationDefaultCredentials,
Raw: []byte(detectedClientID),
RawV2: []byte(detectedClientID + creds.RefreshToken),
Redacted: creds.RefreshToken,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should redacted field posses censored version of RefreshToken? @zricethezav I noted there is mix strategy, Some detectors are censoring, some not. Is there any particular documentation about it ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we censor it or not @zricethezav @abmussani ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, it should be, similar to what is done in OpenAI.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done @abmussani

@kashifkhan0771 kashifkhan0771 force-pushed the update/gcpapplicationdefaultcreds-detector branch from d5dd85e to 8088855 Compare October 28, 2024 05:45
@zricethezav zricethezav merged commit 6a367ab into trufflesecurity:main Oct 28, 2024
13 checks passed
@kashifkhan0771 kashifkhan0771 deleted the update/gcpapplicationdefaultcreds-detector branch October 28, 2024 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants