Skip to content

Commit 6f38c7c

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add support for vulnerability management - GetSBOMsList new endpoint and update existing ones (#2490)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent f10d690 commit 6f38c7c

File tree

24 files changed

+1321
-0
lines changed

24 files changed

+1321
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 301 additions & 0 deletions
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2025-07-10T10:13:27.247Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"log": {
3+
"_recordingName": "Security Monitoring/List assets SBOMs returns \"Not found: There is no request associated with the provided token.\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "5eb3b8f53dd3195ce37e46f12fa2d7a1",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 0,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
}
23+
],
24+
"headersSize": 553,
25+
"httpVersion": "HTTP/1.1",
26+
"method": "GET",
27+
"queryString": [
28+
{
29+
"name": "page",
30+
"value": {
31+
"number": "1",
32+
"token": "unknown"
33+
}
34+
}
35+
],
36+
"url": "https://api.datadoghq.com/api/v2/security/sboms?page%5Btoken%5D=unknown&page%5Bnumber%5D=1"
37+
},
38+
"response": {
39+
"bodySize": 65,
40+
"content": {
41+
"mimeType": "application/vnd.api+json",
42+
"size": 65,
43+
"text": "{\"errors\":[{\"status\":\"404\",\"title\":\"Unexpected internal error\"}]}"
44+
},
45+
"cookies": [],
46+
"headers": [
47+
{
48+
"name": "content-type",
49+
"value": "application/vnd.api+json"
50+
}
51+
],
52+
"headersSize": 660,
53+
"httpVersion": "HTTP/1.1",
54+
"redirectURL": "",
55+
"status": 404,
56+
"statusText": "Not Found"
57+
},
58+
"startedDateTime": "2025-07-10T10:13:27.251Z",
59+
"time": 519
60+
}
61+
],
62+
"pages": [],
63+
"version": "1.2"
64+
}
65+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2025-07-10T10:11:37.540Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"log": {
3+
"_recordingName": "Security Monitoring/List assets SBOMs returns \"OK\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "67c98f919484e27e305e0345c9286a17",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 0,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
}
23+
],
24+
"headersSize": 573,
25+
"httpVersion": "HTTP/1.1",
26+
"method": "GET",
27+
"queryString": [
28+
{
29+
"name": "filter",
30+
"value": {
31+
"asset_type": "Service",
32+
"package_name": "pandas"
33+
}
34+
}
35+
],
36+
"url": "https://api.datadoghq.com/api/v2/security/sboms?filter%5Bpackage_name%5D=pandas&filter%5Basset_type%5D=Service"
37+
},
38+
"response": {
39+
"bodySize": 11,
40+
"content": {
41+
"mimeType": "application/vnd.api+json",
42+
"size": 11,
43+
"text": "{\"data\":[]}"
44+
},
45+
"cookies": [],
46+
"headers": [
47+
{
48+
"name": "content-type",
49+
"value": "application/vnd.api+json"
50+
}
51+
],
52+
"headersSize": 660,
53+
"httpVersion": "HTTP/1.1",
54+
"redirectURL": "",
55+
"status": 200,
56+
"statusText": "OK"
57+
},
58+
"startedDateTime": "2025-07-10T10:11:37.544Z",
59+
"time": 630
60+
}
61+
],
62+
"pages": [],
63+
"version": "1.2"
64+
}
65+
}

features/v2/security_monitoring.feature

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -818,6 +818,38 @@ Feature: Security Monitoring
818818
When the request is sent
819819
Then the response status is 200 The list of notification rules.
820820

821+
@generated @skip @team:DataDog/asm-vm
822+
Scenario: List assets SBOMs returns "Bad request: The server cannot process the request due to invalid syntax in the request." response
823+
Given operation "ListAssetsSBOMs" enabled
824+
And new "ListAssetsSBOMs" request
825+
When the request is sent
826+
Then the response status is 400 Bad request: The server cannot process the request due to invalid syntax in the request.
827+
828+
@team:DataDog/asm-vm
829+
Scenario: List assets SBOMs returns "Not found: There is no request associated with the provided token." response
830+
Given operation "ListAssetsSBOMs" enabled
831+
And new "ListAssetsSBOMs" request
832+
And request contains "page[token]" parameter with value "unknown"
833+
And request contains "page[number]" parameter with value 1
834+
When the request is sent
835+
Then the response status is 404 Not found: There is no request associated with the provided token.
836+
837+
@generated @skip @team:DataDog/asm-vm
838+
Scenario: List assets SBOMs returns "Not found: asset not found" response
839+
Given operation "ListAssetsSBOMs" enabled
840+
And new "ListAssetsSBOMs" request
841+
When the request is sent
842+
Then the response status is 404 Not found: asset not found
843+
844+
@team:DataDog/asm-vm
845+
Scenario: List assets SBOMs returns "OK" response
846+
Given operation "ListAssetsSBOMs" enabled
847+
And new "ListAssetsSBOMs" request
848+
And request contains "filter[package_name]" parameter with value "pandas"
849+
And request contains "filter[asset_type]" parameter with value "Service"
850+
When the request is sent
851+
Then the response status is 200 OK
852+
821853
@generated @skip @team:DataDog/cloud-security-posture-management
822854
Scenario: List findings returns "Bad Request: The server cannot process the request due to invalid syntax in the request." response
823855
Given operation "ListFindings" enabled

features/v2/undo.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2730,6 +2730,12 @@
27302730
"type": "safe"
27312731
}
27322732
},
2733+
"ListAssetsSBOMs": {
2734+
"tag": "Security Monitoring",
2735+
"undo": {
2736+
"type": "safe"
2737+
}
2738+
},
27332739
"GetSBOM": {
27342740
"tag": "Security Monitoring",
27352741
"undo": {

private/bdd_runner/src/support/scenarios_model_mapping.ts

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3511,6 +3511,10 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = {
35113511
type: "string",
35123512
format: "",
35133513
},
3514+
filterTeams: {
3515+
type: "string",
3516+
format: "",
3517+
},
35143518
filterArch: {
35153519
type: "string",
35163520
format: "",
@@ -3525,6 +3529,41 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = {
35253529
},
35263530
operationResponseType: "ListVulnerableAssetsResponse",
35273531
},
3532+
"SecurityMonitoringApi.V2.ListAssetsSBOMs": {
3533+
pageToken: {
3534+
type: "string",
3535+
format: "",
3536+
},
3537+
pageNumber: {
3538+
type: "number",
3539+
format: "int64",
3540+
},
3541+
filterAssetType: {
3542+
type: "AssetType",
3543+
format: "",
3544+
},
3545+
filterAssetName: {
3546+
type: "string",
3547+
format: "",
3548+
},
3549+
filterPackageName: {
3550+
type: "string",
3551+
format: "",
3552+
},
3553+
filterPackageVersion: {
3554+
type: "string",
3555+
format: "",
3556+
},
3557+
filterLicenseName: {
3558+
type: "string",
3559+
format: "",
3560+
},
3561+
filterLicenseType: {
3562+
type: "SBOMComponentLicenseType",
3563+
format: "",
3564+
},
3565+
operationResponseType: "ListAssetsSBOMsResponse",
3566+
},
35283567
"SecurityMonitoringApi.V2.GetSBOM": {
35293568
assetType: {
35303569
type: "AssetType",
@@ -3680,6 +3719,10 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = {
36803719
type: "string",
36813720
format: "",
36823721
},
3722+
filterOrigin: {
3723+
type: "string",
3724+
format: "",
3725+
},
36833726
filterAssetName: {
36843727
type: "string",
36853728
format: "",
@@ -3724,6 +3767,10 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = {
37243767
type: "string",
37253768
format: "",
37263769
},
3770+
filterAssetTeams: {
3771+
type: "string",
3772+
format: "",
3773+
},
37273774
filterAssetArch: {
37283775
type: "string",
37293776
format: "",

0 commit comments

Comments
 (0)