Skip to content

Commit 3395c44

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 2d1ebbf0 of spec repo (#723)
Co-authored-by: ci.datadog-api-spec <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
1 parent 44329b6 commit 3395c44

File tree

5 files changed

+31
-7
lines changed

5 files changed

+31
-7
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.2",
7-
"regenerated": "2022-06-27 13:32:34.030447",
8-
"spec_repo_commit": "773b3560"
7+
"regenerated": "2022-06-27 16:07:52.649564",
8+
"spec_repo_commit": "2d1ebbf0"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.2",
12-
"regenerated": "2022-06-27 13:32:34.043315",
13-
"spec_repo_commit": "773b3560"
12+
"regenerated": "2022-06-27 16:07:52.664534",
13+
"spec_repo_commit": "2d1ebbf0"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6340,6 +6340,17 @@ components:
63406340
- cases
63416341
- message
63426342
type: object
6343+
SecurityMonitoringRuleDecreaseCriticalityBasedOnEnv:
6344+
description: 'If true, signals in non-production environments have a lower severity
6345+
than what is defined by the rule case, which can reduce signal noise.
6346+
6347+
The severity is decreased by one level: `CRITICAL` in production becomes `HIGH`
6348+
in non-production, `HIGH` becomes `MEDIUM` and so on. `INFO` remains `INFO`.
6349+
6350+
The decrement is applied when the environment tag of the signal starts with
6351+
`staging`, `test` or `dev`.'
6352+
example: false
6353+
type: boolean
63436354
SecurityMonitoringRuleDetectionMethod:
63446355
description: The detection method.
63456356
enum:
@@ -6533,6 +6544,8 @@ components:
65336544
SecurityMonitoringRuleOptions:
65346545
description: Options on rules.
65356546
properties:
6547+
decreaseCriticalityBasedOnEnv:
6548+
$ref: '#/components/schemas/SecurityMonitoringRuleDecreaseCriticalityBasedOnEnv'
65366549
detectionMethod:
65376550
$ref: '#/components/schemas/SecurityMonitoringRuleDetectionMethod'
65386551
evaluationWindow:

examples/v2/security-monitoring/UpdateSecurityMonitoringRule.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const params: v2.SecurityMonitoringApiUpdateSecurityMonitoringRuleRequest = {
2222
],
2323
hasExtendedTitle: true,
2424
options: {
25+
decreaseCriticalityBasedOnEnv: false,
2526
detectionMethod: "threshold",
2627
evaluationWindow: 0,
2728
hardcodedEvaluatorType: "log4shell",

features/v2/security_monitoring.feature

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,22 +226,22 @@ Feature: Security Monitoring
226226
Scenario: Update an existing rule returns "Bad Request" response
227227
Given new "UpdateSecurityMonitoringRule" request
228228
And request contains "rule_id" parameter from "REPLACE.ME"
229-
And body with value {"cases": [{"notifications": [], "status": "critical"}], "filters": [{"action": "require"}], "hasExtendedTitle": true, "options": {"detectionMethod": "threshold", "evaluationWindow": 0, "hardcodedEvaluatorType": "log4shell", "impossibleTravelOptions": {"baselineUserLocations": true}, "keepAlive": 0, "maxSignalDuration": 0, "newValueOptions": {"forgetAfter": 1, "learningDuration": 0, "learningMethod": "duration", "learningThreshold": 0}}, "queries": [{"aggregation": "count", "distinctFields": [], "groupByFields": []}], "tags": [], "version": 1}
229+
And body with value {"cases": [{"notifications": [], "status": "critical"}], "filters": [{"action": "require"}], "hasExtendedTitle": true, "options": {"decreaseCriticalityBasedOnEnv": false, "detectionMethod": "threshold", "evaluationWindow": 0, "hardcodedEvaluatorType": "log4shell", "impossibleTravelOptions": {"baselineUserLocations": true}, "keepAlive": 0, "maxSignalDuration": 0, "newValueOptions": {"forgetAfter": 1, "learningDuration": 0, "learningMethod": "duration", "learningThreshold": 0}}, "queries": [{"aggregation": "count", "distinctFields": [], "groupByFields": []}], "tags": [], "version": 1}
230230
When the request is sent
231231
Then the response status is 400 Bad Request
232232

233233
@generated @skip @team:DataDog/k9-cloud-security-platform
234234
Scenario: Update an existing rule returns "Not Found" response
235235
Given new "UpdateSecurityMonitoringRule" request
236236
And request contains "rule_id" parameter from "REPLACE.ME"
237-
And body with value {"cases": [{"notifications": [], "status": "critical"}], "filters": [{"action": "require"}], "hasExtendedTitle": true, "options": {"detectionMethod": "threshold", "evaluationWindow": 0, "hardcodedEvaluatorType": "log4shell", "impossibleTravelOptions": {"baselineUserLocations": true}, "keepAlive": 0, "maxSignalDuration": 0, "newValueOptions": {"forgetAfter": 1, "learningDuration": 0, "learningMethod": "duration", "learningThreshold": 0}}, "queries": [{"aggregation": "count", "distinctFields": [], "groupByFields": []}], "tags": [], "version": 1}
237+
And body with value {"cases": [{"notifications": [], "status": "critical"}], "filters": [{"action": "require"}], "hasExtendedTitle": true, "options": {"decreaseCriticalityBasedOnEnv": false, "detectionMethod": "threshold", "evaluationWindow": 0, "hardcodedEvaluatorType": "log4shell", "impossibleTravelOptions": {"baselineUserLocations": true}, "keepAlive": 0, "maxSignalDuration": 0, "newValueOptions": {"forgetAfter": 1, "learningDuration": 0, "learningMethod": "duration", "learningThreshold": 0}}, "queries": [{"aggregation": "count", "distinctFields": [], "groupByFields": []}], "tags": [], "version": 1}
238238
When the request is sent
239239
Then the response status is 404 Not Found
240240

241241
@generated @skip @team:DataDog/k9-cloud-security-platform
242242
Scenario: Update an existing rule returns "OK" response
243243
Given new "UpdateSecurityMonitoringRule" request
244244
And request contains "rule_id" parameter from "REPLACE.ME"
245-
And body with value {"cases": [{"notifications": [], "status": "critical"}], "filters": [{"action": "require"}], "hasExtendedTitle": true, "options": {"detectionMethod": "threshold", "evaluationWindow": 0, "hardcodedEvaluatorType": "log4shell", "impossibleTravelOptions": {"baselineUserLocations": true}, "keepAlive": 0, "maxSignalDuration": 0, "newValueOptions": {"forgetAfter": 1, "learningDuration": 0, "learningMethod": "duration", "learningThreshold": 0}}, "queries": [{"aggregation": "count", "distinctFields": [], "groupByFields": []}], "tags": [], "version": 1}
245+
And body with value {"cases": [{"notifications": [], "status": "critical"}], "filters": [{"action": "require"}], "hasExtendedTitle": true, "options": {"decreaseCriticalityBasedOnEnv": false, "detectionMethod": "threshold", "evaluationWindow": 0, "hardcodedEvaluatorType": "log4shell", "impossibleTravelOptions": {"baselineUserLocations": true}, "keepAlive": 0, "maxSignalDuration": 0, "newValueOptions": {"forgetAfter": 1, "learningDuration": 0, "learningMethod": "duration", "learningThreshold": 0}}, "queries": [{"aggregation": "count", "distinctFields": [], "groupByFields": []}], "tags": [], "version": 1}
246246
When the request is sent
247247
Then the response status is 200 OK

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util";
1717
* Options on rules.
1818
*/
1919
export class SecurityMonitoringRuleOptions {
20+
/**
21+
* If true, signals in non-production environments have a lower severity than what is defined by the rule case, which can reduce signal noise.
22+
* The severity is decreased by one level: `CRITICAL` in production becomes `HIGH` in non-production, `HIGH` becomes `MEDIUM` and so on. `INFO` remains `INFO`.
23+
* The decrement is applied when the environment tag of the signal starts with `staging`, `test` or `dev`.
24+
*/
25+
"decreaseCriticalityBasedOnEnv"?: boolean;
2026
/**
2127
* The detection method.
2228
*/
@@ -58,6 +64,10 @@ export class SecurityMonitoringRuleOptions {
5864
* @ignore
5965
*/
6066
static readonly attributeTypeMap: AttributeTypeMap = {
67+
decreaseCriticalityBasedOnEnv: {
68+
baseName: "decreaseCriticalityBasedOnEnv",
69+
type: "boolean",
70+
},
6171
detectionMethod: {
6272
baseName: "detectionMethod",
6373
type: "SecurityMonitoringRuleDetectionMethod",

0 commit comments

Comments
 (0)