Skip to content

Commit d7c2151

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

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

services/security_monitoring/src/v2/SecurityMonitoringApi.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1599,6 +1599,7 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory {
15991599
applySecurityAuthentication(_config, requestContext, [
16001600
"apiKeyAuth",
16011601
"appKeyAuth",
1602+
"AuthZ",
16021603
]);
16031604

16041605
return requestContext;
@@ -1667,6 +1668,7 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory {
16671668
applySecurityAuthentication(_config, requestContext, [
16681669
"apiKeyAuth",
16691670
"appKeyAuth",
1671+
"AuthZ",
16701672
]);
16711673

16721674
return requestContext;
@@ -1732,6 +1734,7 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory {
17321734
applySecurityAuthentication(_config, requestContext, [
17331735
"apiKeyAuth",
17341736
"appKeyAuth",
1737+
"AuthZ",
17351738
]);
17361739

17371740
return requestContext;
@@ -8095,7 +8098,11 @@ export class SecurityMonitoringApiResponseProcessor {
80958098
) as SecurityMonitoringSignalResponse;
80968099
return body;
80978100
}
8098-
if (response.httpStatusCode === 404 || response.httpStatusCode === 429) {
8101+
if (
8102+
response.httpStatusCode === 403 ||
8103+
response.httpStatusCode === 404 ||
8104+
response.httpStatusCode === 429
8105+
) {
80998106
const bodyText = parse(await response.body.text(), contentType);
81008107
let body: APIErrorResponse;
81018108
try {

services/security_monitoring/src/v2/models/SecurityMonitoringSignalArchiveReason.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export type SecurityMonitoringSignalArchiveReason =
77
| typeof NONE
88
| typeof FALSE_POSITIVE
99
| typeof TESTING_OR_MAINTENANCE
10+
| typeof REMEDIATED
1011
| typeof INVESTIGATED_CASE_OPENED
1112
| typeof TRUE_POSITIVE_BENIGN
1213
| typeof TRUE_POSITIVE_MALICIOUS
@@ -15,6 +16,7 @@ export type SecurityMonitoringSignalArchiveReason =
1516
export const NONE = "none";
1617
export const FALSE_POSITIVE = "false_positive";
1718
export const TESTING_OR_MAINTENANCE = "testing_or_maintenance";
19+
export const REMEDIATED = "remediated";
1820
export const INVESTIGATED_CASE_OPENED = "investigated_case_opened";
1921
export const TRUE_POSITIVE_BENIGN = "true_positive_benign";
2022
export const TRUE_POSITIVE_MALICIOUS = "true_positive_malicious";

services/security_monitoring/src/v2/models/TypingInfo.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,7 @@ export const TypingInfo: ModelTypingInfo = {
544544
"none",
545545
"false_positive",
546546
"testing_or_maintenance",
547+
"remediated",
547548
"investigated_case_opened",
548549
"true_positive_benign",
549550
"true_positive_malicious",

0 commit comments

Comments
 (0)