Skip to content

Commit be61ed2

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

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
@@ -57944,6 +57944,7 @@ components:
5794457944
- none
5794557945
- false_positive
5794657946
- testing_or_maintenance
57947+
- remediated
5794757948
- investigated_case_opened
5794857949
- true_positive_benign
5794957950
- true_positive_malicious
@@ -57953,6 +57954,7 @@ components:
5795357954
- NONE
5795457955
- FALSE_POSITIVE
5795557956
- TESTING_OR_MAINTENANCE
57957+
- REMEDIATED
5795657958
- INVESTIGATED_CASE_OPENED
5795757959
- TRUE_POSITIVE_BENIGN
5795857960
- TRUE_POSITIVE_MALICIOUS
@@ -103305,6 +103307,8 @@ paths:
103305103307
schema:
103306103308
$ref: "#/components/schemas/SecurityMonitoringSignalResponse"
103307103309
description: OK
103310+
"403":
103311+
$ref: "#/components/responses/NotAuthorizedResponse"
103308103312
"404":
103309103313
$ref: "#/components/responses/NotFoundResponse"
103310103314
"429":
@@ -103342,25 +103346,17 @@ paths:
103342103346
$ref: "#/components/schemas/SecurityMonitoringSignalTriageUpdateResponse"
103343103347
description: OK
103344103348
"400":
103345-
content:
103346-
application/json:
103347-
schema:
103348-
$ref: "#/components/schemas/APIErrorResponse"
103349-
description: Bad Request
103349+
$ref: "#/components/responses/BadRequestResponse"
103350103350
"403":
103351-
content:
103352-
application/json:
103353-
schema:
103354-
$ref: "#/components/schemas/APIErrorResponse"
103355-
description: Forbidden
103351+
$ref: "#/components/responses/NotAuthorizedResponse"
103356103352
"404":
103357-
content:
103358-
application/json:
103359-
schema:
103360-
$ref: "#/components/schemas/APIErrorResponse"
103361-
description: Not Found
103353+
$ref: "#/components/responses/NotFoundResponse"
103362103354
"429":
103363103355
$ref: "#/components/responses/TooManyRequestsResponse"
103356+
security:
103357+
- apiKeyAuth: []
103358+
appKeyAuth: []
103359+
- AuthZ: []
103364103360
summary: Modify the triage assignee of a security signal
103365103361
tags: ["Security Monitoring"]
103366103362
x-codegen-request-body-name: body
@@ -103390,25 +103386,17 @@ paths:
103390103386
$ref: "#/components/schemas/SecurityMonitoringSignalTriageUpdateResponse"
103391103387
description: OK
103392103388
"400":
103393-
content:
103394-
application/json:
103395-
schema:
103396-
$ref: "#/components/schemas/APIErrorResponse"
103397-
description: Bad Request
103389+
$ref: "#/components/responses/BadRequestResponse"
103398103390
"403":
103399-
content:
103400-
application/json:
103401-
schema:
103402-
$ref: "#/components/schemas/APIErrorResponse"
103403-
description: Forbidden
103391+
$ref: "#/components/responses/NotAuthorizedResponse"
103404103392
"404":
103405-
content:
103406-
application/json:
103407-
schema:
103408-
$ref: "#/components/schemas/APIErrorResponse"
103409-
description: Not Found
103393+
$ref: "#/components/responses/NotFoundResponse"
103410103394
"429":
103411103395
$ref: "#/components/responses/TooManyRequestsResponse"
103396+
security:
103397+
- apiKeyAuth: []
103398+
appKeyAuth: []
103399+
- AuthZ: []
103412103400
summary: Change the related incidents of a security signal
103413103401
tags: ["Security Monitoring"]
103414103402
x-codegen-request-body-name: body
@@ -103438,25 +103426,17 @@ paths:
103438103426
$ref: "#/components/schemas/SecurityMonitoringSignalTriageUpdateResponse"
103439103427
description: OK
103440103428
"400":
103441-
content:
103442-
application/json:
103443-
schema:
103444-
$ref: "#/components/schemas/APIErrorResponse"
103445-
description: Bad Request
103429+
$ref: "#/components/responses/BadRequestResponse"
103446103430
"403":
103447-
content:
103448-
application/json:
103449-
schema:
103450-
$ref: "#/components/schemas/APIErrorResponse"
103451-
description: Forbidden
103431+
$ref: "#/components/responses/NotAuthorizedResponse"
103452103432
"404":
103453-
content:
103454-
application/json:
103455-
schema:
103456-
$ref: "#/components/schemas/APIErrorResponse"
103457-
description: Not Found
103433+
$ref: "#/components/responses/NotFoundResponse"
103458103434
"429":
103459103435
$ref: "#/components/responses/TooManyRequestsResponse"
103436+
security:
103437+
- apiKeyAuth: []
103438+
appKeyAuth: []
103439+
- AuthZ: []
103460103440
summary: Change the triage state of a security signal
103461103441
tags: ["Security Monitoring"]
103462103442
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
@@ -5209,6 +5209,7 @@ const enumsMap: { [key: string]: any[] } = {
52095209
"none",
52105210
"false_positive",
52115211
"testing_or_maintenance",
5212+
"remediated",
52125213
"investigated_case_opened",
52135214
"true_positive_benign",
52145215
"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)