Skip to content

Commit 3788326

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add bulk triage endpoints for security monitoring signals (#3772)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent e404e61 commit 3788326

21 files changed

+1248
-41
lines changed

.generator/schemas/v1/openapi.yaml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4579,7 +4579,6 @@ components:
45794579
- sca_fargate_usage
45804580
- sds_scanned_bytes_usage
45814581
- serverless_apps_usage
4582-
- serverless_apps_apm_usage
45834582
- siem_analyzed_logs_add_on_usage
45844583
- siem_ingested_bytes_usage
45854584
- snmp_usage
@@ -4667,7 +4666,6 @@ components:
46674666
- SCA_FARGATE_USAGE
46684667
- SDS_SCANNED_BYTES_USAGE
46694668
- SERVERLESS_APPS_USAGE
4670-
- SERVERLESS_APPS_APM_USAGE
46714669
- SIEM_ANALYZED_LOGS_ADD_ON_USAGE
46724670
- SIEM_INGESTED_BYTES_USAGE
46734671
- SNMP_USAGE
@@ -9158,8 +9156,6 @@ components:
91589156
- published_app_percentage
91599157
- serverless_apps_usage
91609158
- serverless_apps_percentage
9161-
- serverless_apps_apm_usage
9162-
- serverless_apps_apm_percentage
91639159
- snmp_usage
91649160
- snmp_percentage
91659161
- universal_service_monitoring_usage
@@ -9325,8 +9321,6 @@ components:
93259321
- PUBLISHED_APP_PERCENTAGE
93269322
- SERVERLESS_APPS_USAGE
93279323
- SERVERLESS_APPS_PERCENTAGE
9328-
- SERVERLESS_APPS_APM_USAGE
9329-
- SERVERLESS_APPS_APM_PERCENTAGE
93309324
- SNMP_USAGE
93319325
- SNMP_PERCENTAGE
93329326
- UNIVERSAL_SERVICE_MONITORING_USAGE
@@ -9984,14 +9978,6 @@ components:
99849978
description: The total Sensitive Data Scanner usage by tag(s).
99859979
format: double
99869980
type: number
9987-
serverless_apps_apm_percentage:
9988-
description: The percentage of Serverless Apps APM usage by tag(s).
9989-
format: double
9990-
type: number
9991-
serverless_apps_apm_usage:
9992-
description: The total Serverless Apps APM usage by tag(s).
9993-
format: double
9994-
type: number
99959981
serverless_apps_percentage:
99969982
description: The percentage of Serverless Apps usage by tag(s).
99979983
format: double

.generator/schemas/v2/openapi.yaml

Lines changed: 231 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58530,6 +58530,155 @@ components:
5853058530
description: Version of the updated signal. If server side version is higher, update will be rejected.
5853158531
format: int64
5853258532
type: integer
58533+
SecurityMonitoringSignalsBulkAssigneeUpdateAttributes:
58534+
description: Attributes describing the new assignees for a bulk signal update.
58535+
properties:
58536+
assignee:
58537+
description: UUID of the user to assign to the signal. Use an empty string to unassign.
58538+
example: 773b045d-ccf8-4808-bd3b-955ef6a8c940
58539+
type: string
58540+
version:
58541+
$ref: "#/components/schemas/SecurityMonitoringSignalVersion"
58542+
required:
58543+
- assignee
58544+
type: object
58545+
SecurityMonitoringSignalsBulkAssigneeUpdateData:
58546+
description: Data for updating the assignees for multiple security signals.
58547+
properties:
58548+
attributes:
58549+
$ref: "#/components/schemas/SecurityMonitoringSignalsBulkAssigneeUpdateAttributes"
58550+
id:
58551+
description: The unique ID of the security signal.
58552+
example: AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA
58553+
type: string
58554+
type:
58555+
$ref: "#/components/schemas/SecurityMonitoringSignalType"
58556+
required:
58557+
- id
58558+
- attributes
58559+
type: object
58560+
SecurityMonitoringSignalsBulkAssigneeUpdateRequest:
58561+
description: Request body for updating the assignee of multiple security signals.
58562+
properties:
58563+
data:
58564+
description: An array of signal assignee updates.
58565+
items:
58566+
$ref: "#/components/schemas/SecurityMonitoringSignalsBulkAssigneeUpdateData"
58567+
maxItems: 199
58568+
type: array
58569+
required:
58570+
- data
58571+
type: object
58572+
SecurityMonitoringSignalsBulkStateUpdateData:
58573+
description: Data for updating the state for multiple security signals.
58574+
properties:
58575+
attributes:
58576+
$ref: "#/components/schemas/SecurityMonitoringSignalStateUpdateAttributes"
58577+
id:
58578+
description: The unique ID of the security signal.
58579+
example: AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA
58580+
type: string
58581+
type:
58582+
$ref: "#/components/schemas/SecurityMonitoringSignalType"
58583+
required:
58584+
- id
58585+
- attributes
58586+
type: object
58587+
SecurityMonitoringSignalsBulkStateUpdateRequest:
58588+
description: Request body for updating the triage states of multiple security signals.
58589+
properties:
58590+
data:
58591+
description: An array of signal state updates.
58592+
items:
58593+
$ref: "#/components/schemas/SecurityMonitoringSignalsBulkStateUpdateData"
58594+
maxItems: 199
58595+
type: array
58596+
required:
58597+
- data
58598+
type: object
58599+
SecurityMonitoringSignalsBulkTriageEvent:
58600+
description: A single signal event entry in a bulk triage update response.
58601+
properties:
58602+
event:
58603+
$ref: "#/components/schemas/SecurityMonitoringSignalsBulkTriageEventAttributes"
58604+
id:
58605+
description: The unique ID of the security signal.
58606+
example: AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA
58607+
type: string
58608+
required:
58609+
- id
58610+
- event
58611+
type: object
58612+
SecurityMonitoringSignalsBulkTriageEventAttributes:
58613+
description: Triage attributes of a security signal returned in a bulk update response.
58614+
properties:
58615+
archive_comment:
58616+
$ref: "#/components/schemas/SecurityMonitoringSignalArchiveComment"
58617+
archive_comment_timestamp:
58618+
description: Timestamp of the last edit to the archive comment.
58619+
format: int64
58620+
type: integer
58621+
archive_comment_user:
58622+
$ref: "#/components/schemas/SecurityMonitoringTriageUser"
58623+
archive_reason:
58624+
$ref: "#/components/schemas/SecurityMonitoringSignalArchiveReason"
58625+
assignee:
58626+
$ref: "#/components/schemas/SecurityMonitoringTriageUser"
58627+
id:
58628+
description: The unique ID of the security signal.
58629+
example: AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA
58630+
type: string
58631+
incident_ids:
58632+
$ref: "#/components/schemas/SecurityMonitoringSignalIncidentIds"
58633+
state:
58634+
$ref: "#/components/schemas/SecurityMonitoringSignalState"
58635+
state_update_timestamp:
58636+
description: Timestamp of the last state update.
58637+
format: int64
58638+
type: integer
58639+
state_update_user:
58640+
$ref: "#/components/schemas/SecurityMonitoringTriageUser"
58641+
required:
58642+
- id
58643+
- state
58644+
- assignee
58645+
- incident_ids
58646+
type: object
58647+
SecurityMonitoringSignalsBulkTriageUpdateResponse:
58648+
description: Response for a bulk triage update of security signals.
58649+
properties:
58650+
result:
58651+
$ref: "#/components/schemas/SecurityMonitoringSignalsBulkTriageUpdateResult"
58652+
status:
58653+
description: The status of the bulk operation.
58654+
example: done
58655+
type: string
58656+
type:
58657+
description: The type of the response.
58658+
example: status
58659+
type: string
58660+
required:
58661+
- type
58662+
- status
58663+
- result
58664+
type: object
58665+
SecurityMonitoringSignalsBulkTriageUpdateResult:
58666+
description: The result payload of a bulk signal triage update.
58667+
properties:
58668+
count:
58669+
description: The number of signals updated.
58670+
example: 2
58671+
format: int64
58672+
type: integer
58673+
events:
58674+
description: The list of updated signals.
58675+
items:
58676+
$ref: "#/components/schemas/SecurityMonitoringSignalsBulkTriageEvent"
58677+
type: array
58678+
required:
58679+
- count
58680+
- events
58681+
type: object
5853358682
SecurityMonitoringSignalsListResponse:
5853458683
description: "The response object with all security signals matching the request\nand pagination information."
5853558684
properties:
@@ -103421,6 +103570,88 @@ paths:
103421103570
operator: OR
103422103571
permissions:
103423103572
- security_monitoring_signals_read
103573+
/api/v2/security_monitoring/signals/bulk/assignee:
103574+
patch:
103575+
description: |-
103576+
Change the triage assignees of multiple security signals at once.
103577+
The maximum number of signals that can be updated in a single request is 199.
103578+
operationId: BulkEditSecurityMonitoringSignalsAssignee
103579+
requestBody:
103580+
content:
103581+
application/json:
103582+
schema:
103583+
$ref: "#/components/schemas/SecurityMonitoringSignalsBulkAssigneeUpdateRequest"
103584+
description: Attributes describing the signal assignee updates.
103585+
required: true
103586+
responses:
103587+
"200":
103588+
content:
103589+
application/json:
103590+
schema:
103591+
$ref: "#/components/schemas/SecurityMonitoringSignalsBulkTriageUpdateResponse"
103592+
description: OK
103593+
"400":
103594+
content:
103595+
application/json:
103596+
schema:
103597+
$ref: "#/components/schemas/JSONAPIErrorResponse"
103598+
description: Bad Request
103599+
"403":
103600+
content:
103601+
application/json:
103602+
schema:
103603+
$ref: "#/components/schemas/JSONAPIErrorResponse"
103604+
description: Forbidden
103605+
"429":
103606+
$ref: "#/components/responses/TooManyRequestsResponse"
103607+
summary: Bulk update triage assignee of security signals
103608+
tags: ["Security Monitoring"]
103609+
x-codegen-request-body-name: body
103610+
"x-permission":
103611+
operator: OR
103612+
permissions:
103613+
- security_monitoring_signals_write
103614+
/api/v2/security_monitoring/signals/bulk/state:
103615+
patch:
103616+
description: |-
103617+
Change the triage states of multiple security signals at once.
103618+
The maximum number of signals that can be updated in a single request is 199.
103619+
operationId: BulkEditSecurityMonitoringSignalsState
103620+
requestBody:
103621+
content:
103622+
application/json:
103623+
schema:
103624+
$ref: "#/components/schemas/SecurityMonitoringSignalsBulkStateUpdateRequest"
103625+
description: Attributes describing the signal state updates.
103626+
required: true
103627+
responses:
103628+
"200":
103629+
content:
103630+
application/json:
103631+
schema:
103632+
$ref: "#/components/schemas/SecurityMonitoringSignalsBulkTriageUpdateResponse"
103633+
description: OK
103634+
"400":
103635+
content:
103636+
application/json:
103637+
schema:
103638+
$ref: "#/components/schemas/JSONAPIErrorResponse"
103639+
description: Bad Request
103640+
"403":
103641+
content:
103642+
application/json:
103643+
schema:
103644+
$ref: "#/components/schemas/JSONAPIErrorResponse"
103645+
description: Forbidden
103646+
"429":
103647+
$ref: "#/components/responses/TooManyRequestsResponse"
103648+
summary: Bulk update triage state of security signals
103649+
tags: ["Security Monitoring"]
103650+
x-codegen-request-body-name: body
103651+
"x-permission":
103652+
operator: OR
103653+
permissions:
103654+
- security_monitoring_signals_write
103424103655
/api/v2/security_monitoring/signals/search:
103425103656
post:
103426103657
description: |-

features/v2/security_monitoring.feature

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,36 @@ Feature: Security Monitoring
121121
When the request is sent
122122
Then the response status is 200 OK
123123

124+
@skip @team:DataDog/k9-cloud-security-platform
125+
Scenario: Bulk update triage assignee of security signals returns "Bad Request" response
126+
Given operation "BulkEditSecurityMonitoringSignalsAssignee" enabled
127+
And new "BulkEditSecurityMonitoringSignalsAssignee" request
128+
And body with value {"data": [{"attributes": {}, "id": "AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA", "type": "signal"}]}
129+
When the request is sent
130+
Then the response status is 400 Bad Request
131+
132+
@generated @skip @team:DataDog/k9-cloud-security-platform
133+
Scenario: Bulk update triage assignee of security signals returns "OK" response
134+
Given new "BulkEditSecurityMonitoringSignalsAssignee" request
135+
And body with value {"data": [{"attributes": {"assignee": "773b045d-ccf8-4808-bd3b-955ef6a8c940"}, "id": "AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA", "type": "signal"}]}
136+
When the request is sent
137+
Then the response status is 200 OK
138+
139+
@skip @team:DataDog/k9-cloud-security-platform
140+
Scenario: Bulk update triage state of security signals returns "Bad Request" response
141+
Given operation "BulkEditSecurityMonitoringSignalsState" enabled
142+
And new "BulkEditSecurityMonitoringSignalsState" request
143+
And body with value {"data": [{"attributes": {}, "id": "AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA", "type": "signal"}]}
144+
When the request is sent
145+
Then the response status is 400 Bad Request
146+
147+
@generated @skip @team:DataDog/k9-cloud-security-platform
148+
Scenario: Bulk update triage state of security signals returns "OK" response
149+
Given new "BulkEditSecurityMonitoringSignalsState" request
150+
And body with value {"data": [{"attributes": {"archive_reason": "none", "state": "open"}, "id": "AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA", "type": "signal"}]}
151+
When the request is sent
152+
Then the response status is 200 OK
153+
124154
@team:DataDog/k9-cloud-security-platform
125155
Scenario: Cancel a historical job returns "Bad Request" response
126156
Given operation "CancelThreatHuntingJob" enabled

features/v2/undo.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5229,6 +5229,18 @@
52295229
"type": "safe"
52305230
}
52315231
},
5232+
"BulkEditSecurityMonitoringSignalsAssignee": {
5233+
"tag": "Security Monitoring",
5234+
"undo": {
5235+
"type": "idempotent"
5236+
}
5237+
},
5238+
"BulkEditSecurityMonitoringSignalsState": {
5239+
"tag": "Security Monitoring",
5240+
"undo": {
5241+
"type": "idempotent"
5242+
}
5243+
},
52325244
"SearchSecurityMonitoringSignals": {
52335245
"tag": "Security Monitoring",
52345246
"undo": {

private/bdd_runner/src/support/scenarios_model_mapping.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4954,6 +4954,20 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = {
49544954
},
49554955
operationResponseType: "SecurityMonitoringSignalsListResponse",
49564956
},
4957+
"SecurityMonitoringApi.V2.BulkEditSecurityMonitoringSignalsAssignee": {
4958+
body: {
4959+
type: "SecurityMonitoringSignalsBulkAssigneeUpdateRequest",
4960+
format: "",
4961+
},
4962+
operationResponseType: "SecurityMonitoringSignalsBulkTriageUpdateResponse",
4963+
},
4964+
"SecurityMonitoringApi.V2.BulkEditSecurityMonitoringSignalsState": {
4965+
body: {
4966+
type: "SecurityMonitoringSignalsBulkStateUpdateRequest",
4967+
format: "",
4968+
},
4969+
operationResponseType: "SecurityMonitoringSignalsBulkTriageUpdateResponse",
4970+
},
49574971
"SecurityMonitoringApi.V2.SearchSecurityMonitoringSignals": {
49584972
body: {
49594973
type: "SecurityMonitoringSignalListRequest",

0 commit comments

Comments
 (0)