File tree Expand file tree Collapse file tree 3 files changed +25
-0
lines changed
Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ func TestCoverageAllEndpoints(t *testing.T) {
4848 // skills
4949 _ , _ = client .GetSkillsCatalog (ctx , SkillCatalogOptions {})
5050 _ , _ = client .ListSkills (ctx , ListSkillsOptions {})
51+ _ , _ = client .GetSkillSecurityBreakdown (ctx , SkillSecurityBreakdownOptions {JobID : "job-1" })
5152 _ , _ = client .ListSkillVersions (ctx , "skill-id" )
5253 _ , _ = client .ListMySkills (ctx , ListMySkillsOptions {})
5354 _ , _ = client .GetMySkillsList (ctx , MySkillsListOptions {})
Original file line number Diff line number Diff line change @@ -79,6 +79,26 @@ func (c *RegistryBrokerClient) ListSkills(
7979 )
8080}
8181
82+ // GetSkillSecurityBreakdown returns scanner summary and findings for a skill release.
83+ func (c * RegistryBrokerClient ) GetSkillSecurityBreakdown (
84+ ctx context.Context ,
85+ options SkillSecurityBreakdownOptions ,
86+ ) (JSONObject , error ) {
87+ if err := ensureNonEmpty (options .JobID , "jobID" ); err != nil {
88+ return nil , err
89+ }
90+
91+ path := "/skills/" + percentPath (strings .TrimSpace (options .JobID )) + "/security-breakdown"
92+
93+ return c .requestJSON (
94+ ctx ,
95+ http .MethodGet ,
96+ path ,
97+ nil ,
98+ nil ,
99+ )
100+ }
101+
82102// ListSkillVersions performs the requested operation.
83103func (c * RegistryBrokerClient ) ListSkillVersions (
84104 ctx context.Context ,
Original file line number Diff line number Diff line change @@ -311,6 +311,10 @@ type ListSkillsOptions struct {
311311 AccountID string
312312}
313313
314+ type SkillSecurityBreakdownOptions struct {
315+ JobID string
316+ }
317+
314318type ListMySkillsOptions struct {
315319 Limit * int
316320}
You can’t perform that action at this time.
0 commit comments