Skip to content

Commit

Permalink
Add analysis info for GCP creds (trufflesecurity#3727)
Browse files Browse the repository at this point in the history
* Add user info for gcp credential

* Use principal and include Type
  • Loading branch information
bill-rich authored Dec 5, 2024
1 parent 00d4619 commit 4cd055f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/detectors/gcp/gcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,13 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
"rotation_guide": "https://howtorotate.com/docs/tutorials/gcp/",
"project": creds.ProjectID,
},
AnalysisInfo: map[string]string{
"principal": creds.ClientEmail,
},
}

if creds.Type != "" {
result.AnalysisInfo["type"] = creds.Type
}

if verify {
Expand Down

0 comments on commit 4cd055f

Please sign in to comment.