Skip to content

Commit 4cd055f

Browse files
authored
Add analysis info for GCP creds (#3727)
* Add user info for gcp credential * Use principal and include Type
1 parent 00d4619 commit 4cd055f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/detectors/gcp/gcp.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,13 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
113113
"rotation_guide": "https://howtorotate.com/docs/tutorials/gcp/",
114114
"project": creds.ProjectID,
115115
},
116+
AnalysisInfo: map[string]string{
117+
"principal": creds.ClientEmail,
118+
},
119+
}
120+
121+
if creds.Type != "" {
122+
result.AnalysisInfo["type"] = creds.Type
116123
}
117124

118125
if verify {

0 commit comments

Comments
 (0)