Skip to content

Commit

Permalink
[analyze] Add description and user to openai metadata (#3111)
Browse files Browse the repository at this point in the history
Also rename the type from "org" to "organization" to match github.
  • Loading branch information
mcastorina authored Jul 26, 2024
1 parent c048487 commit 14e7a82
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions pkg/analyzer/analyzers/openai/openai.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,14 @@ func secretInfoToAnalyzerResult(info *AnalyzerJSON) *analyzers.AnalyzerResult {
resource := analyzers.Resource{
Name: org.Title,
FullyQualifiedName: org.ID,
Type: "org",
Type: "organization",
Metadata: map[string]any{
"description": org.Description,
"user": org.User,
},
}
// Copy each permission into this resource.
for _, perm := range perms {
binding := analyzers.Binding{
Resource: resource,
Permission: perm,
}
result.Bindings = append(result.Bindings, binding)
}
result.Bindings = append(result.Bindings, analyzers.BindAllPermissions(resource, perms...)...)
}

return &result
Expand Down

0 comments on commit 14e7a82

Please sign in to comment.