Skip to content

Commit 7ff4b29

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Fix consistency issues in security monitoring signal triage routes (#3773)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 8056854 commit 7ff4b29

File tree

4 files changed

+36
-46
lines changed

4 files changed

+36
-46
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 25 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -57909,6 +57909,7 @@ components:
5790957909
- none
5791057910
- false_positive
5791157911
- testing_or_maintenance
57912+
- remediated
5791257913
- investigated_case_opened
5791357914
- true_positive_benign
5791457915
- true_positive_malicious
@@ -57918,6 +57919,7 @@ components:
5791857919
- NONE
5791957920
- FALSE_POSITIVE
5792057921
- TESTING_OR_MAINTENANCE
57922+
- REMEDIATED
5792157923
- INVESTIGATED_CASE_OPENED
5792257924
- TRUE_POSITIVE_BENIGN
5792357925
- TRUE_POSITIVE_MALICIOUS
@@ -102447,6 +102449,8 @@ paths:
102447102449
schema:
102448102450
$ref: "#/components/schemas/SecurityMonitoringSignalResponse"
102449102451
description: OK
102452+
"403":
102453+
$ref: "#/components/responses/NotAuthorizedResponse"
102450102454
"404":
102451102455
$ref: "#/components/responses/NotFoundResponse"
102452102456
"429":
@@ -102484,25 +102488,17 @@ paths:
102484102488
$ref: "#/components/schemas/SecurityMonitoringSignalTriageUpdateResponse"
102485102489
description: OK
102486102490
"400":
102487-
content:
102488-
application/json:
102489-
schema:
102490-
$ref: "#/components/schemas/APIErrorResponse"
102491-
description: Bad Request
102491+
$ref: "#/components/responses/BadRequestResponse"
102492102492
"403":
102493-
content:
102494-
application/json:
102495-
schema:
102496-
$ref: "#/components/schemas/APIErrorResponse"
102497-
description: Forbidden
102493+
$ref: "#/components/responses/NotAuthorizedResponse"
102498102494
"404":
102499-
content:
102500-
application/json:
102501-
schema:
102502-
$ref: "#/components/schemas/APIErrorResponse"
102503-
description: Not Found
102495+
$ref: "#/components/responses/NotFoundResponse"
102504102496
"429":
102505102497
$ref: "#/components/responses/TooManyRequestsResponse"
102498+
security:
102499+
- apiKeyAuth: []
102500+
appKeyAuth: []
102501+
- AuthZ: []
102506102502
summary: Modify the triage assignee of a security signal
102507102503
tags: ["Security Monitoring"]
102508102504
x-codegen-request-body-name: body
@@ -102532,25 +102528,17 @@ paths:
102532102528
$ref: "#/components/schemas/SecurityMonitoringSignalTriageUpdateResponse"
102533102529
description: OK
102534102530
"400":
102535-
content:
102536-
application/json:
102537-
schema:
102538-
$ref: "#/components/schemas/APIErrorResponse"
102539-
description: Bad Request
102531+
$ref: "#/components/responses/BadRequestResponse"
102540102532
"403":
102541-
content:
102542-
application/json:
102543-
schema:
102544-
$ref: "#/components/schemas/APIErrorResponse"
102545-
description: Forbidden
102533+
$ref: "#/components/responses/NotAuthorizedResponse"
102546102534
"404":
102547-
content:
102548-
application/json:
102549-
schema:
102550-
$ref: "#/components/schemas/APIErrorResponse"
102551-
description: Not Found
102535+
$ref: "#/components/responses/NotFoundResponse"
102552102536
"429":
102553102537
$ref: "#/components/responses/TooManyRequestsResponse"
102538+
security:
102539+
- apiKeyAuth: []
102540+
appKeyAuth: []
102541+
- AuthZ: []
102554102542
summary: Change the related incidents of a security signal
102555102543
tags: ["Security Monitoring"]
102556102544
x-codegen-request-body-name: body
@@ -102580,25 +102568,17 @@ paths:
102580102568
$ref: "#/components/schemas/SecurityMonitoringSignalTriageUpdateResponse"
102581102569
description: OK
102582102570
"400":
102583-
content:
102584-
application/json:
102585-
schema:
102586-
$ref: "#/components/schemas/APIErrorResponse"
102587-
description: Bad Request
102571+
$ref: "#/components/responses/BadRequestResponse"
102588102572
"403":
102589-
content:
102590-
application/json:
102591-
schema:
102592-
$ref: "#/components/schemas/APIErrorResponse"
102593-
description: Forbidden
102573+
$ref: "#/components/responses/NotAuthorizedResponse"
102594102574
"404":
102595-
content:
102596-
application/json:
102597-
schema:
102598-
$ref: "#/components/schemas/APIErrorResponse"
102599-
description: Not Found
102575+
$ref: "#/components/responses/NotFoundResponse"
102600102576
"429":
102601102577
$ref: "#/components/responses/TooManyRequestsResponse"
102578+
security:
102579+
- apiKeyAuth: []
102580+
appKeyAuth: []
102581+
- AuthZ: []
102602102582
summary: Change the triage state of a security signal
102603102583
tags: ["Security Monitoring"]
102604102584
x-codegen-request-body-name: body

packages/datadog-api-client-v2/apis/SecurityMonitoringApi.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1303,6 +1303,7 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory {
13031303
applySecurityAuthentication(_config, requestContext, [
13041304
"apiKeyAuth",
13051305
"appKeyAuth",
1306+
"AuthZ",
13061307
]);
13071308

13081309
return requestContext;
@@ -1363,6 +1364,7 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory {
13631364
applySecurityAuthentication(_config, requestContext, [
13641365
"apiKeyAuth",
13651366
"appKeyAuth",
1367+
"AuthZ",
13661368
]);
13671369

13681370
return requestContext;
@@ -1418,6 +1420,7 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory {
14181420
applySecurityAuthentication(_config, requestContext, [
14191421
"apiKeyAuth",
14201422
"appKeyAuth",
1423+
"AuthZ",
14211424
]);
14221425

14231426
return requestContext;
@@ -7369,7 +7372,11 @@ export class SecurityMonitoringApiResponseProcessor {
73697372
) as SecurityMonitoringSignalResponse;
73707373
return body;
73717374
}
7372-
if (response.httpStatusCode === 404 || response.httpStatusCode === 429) {
7375+
if (
7376+
response.httpStatusCode === 403 ||
7377+
response.httpStatusCode === 404 ||
7378+
response.httpStatusCode === 429
7379+
) {
73737380
const bodyText = ObjectSerializer.parse(
73747381
await response.body.text(),
73757382
contentType

packages/datadog-api-client-v2/models/ObjectSerializer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5164,6 +5164,7 @@ const enumsMap: { [key: string]: any[] } = {
51645164
"none",
51655165
"false_positive",
51665166
"testing_or_maintenance",
5167+
"remediated",
51675168
"investigated_case_opened",
51685169
"true_positive_benign",
51695170
"true_positive_malicious",

packages/datadog-api-client-v2/models/SecurityMonitoringSignalArchiveReason.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export type SecurityMonitoringSignalArchiveReason =
1414
| typeof NONE
1515
| typeof FALSE_POSITIVE
1616
| typeof TESTING_OR_MAINTENANCE
17+
| typeof REMEDIATED
1718
| typeof INVESTIGATED_CASE_OPENED
1819
| typeof TRUE_POSITIVE_BENIGN
1920
| typeof TRUE_POSITIVE_MALICIOUS
@@ -22,6 +23,7 @@ export type SecurityMonitoringSignalArchiveReason =
2223
export const NONE = "none";
2324
export const FALSE_POSITIVE = "false_positive";
2425
export const TESTING_OR_MAINTENANCE = "testing_or_maintenance";
26+
export const REMEDIATED = "remediated";
2527
export const INVESTIGATED_CASE_OPENED = "investigated_case_opened";
2628
export const TRUE_POSITIVE_BENIGN = "true_positive_benign";
2729
export const TRUE_POSITIVE_MALICIOUS = "true_positive_malicious";

0 commit comments

Comments
 (0)