diff --git a/pkg/detectors/detectors.go b/pkg/detectors/detectors.go index ff7a5d1828a8..ee4f1d86b71d 100644 --- a/pkg/detectors/detectors.go +++ b/pkg/detectors/detectors.go @@ -82,6 +82,11 @@ type Result struct { // This field should only be populated if the verification process itself failed in a way that provides no // information about the verification status of the candidate secret, such as if the verification request timed out. verificationError error + + // AnalysisInfo should be set with information required for credential + // analysis to run. The keys of the map are analyzer specific and + // should match what is expected in the corresponding analyzer. + AnalysisInfo map[string]string } // SetVerificationError is the only way to set a verification error. Any sensitive values should be passed-in as secrets to be redacted. diff --git a/pkg/detectors/openai/openai.go b/pkg/detectors/openai/openai.go index 1b0e53ca3e7b..0b2b159126d6 100644 --- a/pkg/detectors/openai/openai.go +++ b/pkg/detectors/openai/openai.go @@ -62,6 +62,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result s1.Verified = verified s1.ExtraData = extraData s1.SetVerificationError(verificationErr) + s1.AnalysisInfo = map[string]string{"key": token} } results = append(results, s1)