Skip to content

Commit 0f44365

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Cloud SIEM - Add instantaneousBaseline feature parameter. (#3081)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent dac1eaa commit 0f44365

File tree

5 files changed

+86
-0
lines changed

5 files changed

+86
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47596,6 +47596,8 @@ components:
4759647596
properties:
4759747597
forgetAfter:
4759847598
$ref: '#/components/schemas/SecurityMonitoringRuleNewValueOptionsForgetAfter'
47599+
instantaneousBaseline:
47600+
$ref: '#/components/schemas/SecurityMonitoringRuleNewValueOptionsInstantaneousBaseline'
4759947601
learningDuration:
4760047602
$ref: '#/components/schemas/SecurityMonitoringRuleNewValueOptionsLearningDuration'
4760147603
learningMethod:
@@ -47621,6 +47623,13 @@ components:
4762147623
- TWO_WEEKS
4762247624
- THREE_WEEKS
4762347625
- FOUR_WEEKS
47626+
SecurityMonitoringRuleNewValueOptionsInstantaneousBaseline:
47627+
description: When set to true, Datadog uses previous values that fall within
47628+
the defined learning window to construct the baseline, enabling the system
47629+
to establish an accurate baseline more rapidly rather than relying solely
47630+
on gradual learning over time.
47631+
example: false
47632+
type: boolean
4762447633
SecurityMonitoringRuleNewValueOptionsLearningDuration:
4762547634
default: 0
4762647635
description: 'The duration in days during which values are learned, and after
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2025-12-10T08:37:17.537Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{
2+
"log": {
3+
"_recordingName": "Security Monitoring/Validate a detection rule with detection method 'new_value' with enabled feature 'instantaneousBaseline' returns \"OK\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "cbc721010d20de2d84fcd5191be021fe",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 675,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "*/*"
22+
},
23+
{
24+
"_fromType": "array",
25+
"name": "content-type",
26+
"value": "application/json"
27+
}
28+
],
29+
"headersSize": 588,
30+
"httpVersion": "HTTP/1.1",
31+
"method": "POST",
32+
"postData": {
33+
"mimeType": "application/json",
34+
"params": [],
35+
"text": "{\"cases\":[{\"name\":\"\",\"notifications\":[],\"status\":\"info\"}],\"hasExtendedTitle\":true,\"isEnabled\":true,\"message\":\"My security monitoring rule\",\"name\":\"My security monitoring rule\",\"options\":{\"detectionMethod\":\"new_value\",\"evaluationWindow\":0,\"keepAlive\":300,\"maxSignalDuration\":600,\"newValueOptions\":{\"forgetAfter\":7,\"instantaneousBaseline\":true,\"learningDuration\":1,\"learningMethod\":\"duration\",\"learningThreshold\":0}},\"queries\":[{\"aggregation\":\"new_value\",\"dataSource\":\"logs\",\"distinctFields\":[],\"groupByFields\":[\"@userIdentity.assumed_role\"],\"metric\":\"name\",\"metrics\":[\"name\"],\"name\":\"\",\"query\":\"source:source_here\"}],\"tags\":[\"env:prod\",\"team:security\"],\"type\":\"log_detection\"}"
36+
},
37+
"queryString": [],
38+
"url": "https://api.datadoghq.com/api/v2/security_monitoring/rules/validation"
39+
},
40+
"response": {
41+
"bodySize": 0,
42+
"content": {
43+
"mimeType": "text/plain",
44+
"size": 0
45+
},
46+
"cookies": [],
47+
"headers": [],
48+
"headersSize": 601,
49+
"httpVersion": "HTTP/1.1",
50+
"redirectURL": "",
51+
"status": 204,
52+
"statusText": "No Content"
53+
},
54+
"startedDateTime": "2025-12-10T08:37:18.179Z",
55+
"time": 297
56+
}
57+
],
58+
"pages": [],
59+
"version": "1.2"
60+
}
61+
}

features/v2/security_monitoring.feature

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1764,6 +1764,13 @@ Feature: Security Monitoring
17641764
When the request is sent
17651765
Then the response status is 204 OK
17661766

1767+
@team:DataDog/k9-cloud-security-platform
1768+
Scenario: Validate a detection rule with detection method 'new_value' with enabled feature 'instantaneousBaseline' returns "OK" response
1769+
Given new "ValidateSecurityMonitoringRule" request
1770+
And body with value {"cases":[{"name":"","status":"info","notifications":[]}],"hasExtendedTitle":true,"isEnabled":true,"message":"My security monitoring rule","name":"My security monitoring rule","options":{"evaluationWindow":0,"keepAlive":300,"maxSignalDuration":600,"detectionMethod":"new_value","newValueOptions":{"forgetAfter":7,"instantaneousBaseline":true,"learningDuration":1,"learningThreshold":0,"learningMethod":"duration"}},"queries":[{"query":"source:source_here","groupByFields":["@userIdentity.assumed_role"],"distinctFields":[],"metric":"name","metrics":["name"],"aggregation":"new_value","name":"","dataSource":"logs"}],"tags":["env:prod","team:security"],"type":"log_detection"}
1771+
When the request is sent
1772+
Then the response status is 204 OK
1773+
17671774
@team:DataDog/k9-cloud-security-platform
17681775
Scenario: Validate a detection rule with detection method 'sequence_detection' returns "OK" response
17691776
Given new "ValidateSecurityMonitoringRule" request

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ export class SecurityMonitoringRuleNewValueOptions {
1313
* The duration in days after which a learned value is forgotten.
1414
*/
1515
"forgetAfter"?: SecurityMonitoringRuleNewValueOptionsForgetAfter;
16+
/**
17+
* When set to true, Datadog uses previous values that fall within the defined learning window to construct the baseline, enabling the system to establish an accurate baseline more rapidly rather than relying solely on gradual learning over time.
18+
*/
19+
"instantaneousBaseline"?: boolean;
1620
/**
1721
* The duration in days during which values are learned, and after which signals will be generated for values that
1822
* weren't learned. If set to 0, a signal will be generated for all new values after the first value is learned.
@@ -46,6 +50,10 @@ export class SecurityMonitoringRuleNewValueOptions {
4650
type: "SecurityMonitoringRuleNewValueOptionsForgetAfter",
4751
format: "int32",
4852
},
53+
instantaneousBaseline: {
54+
baseName: "instantaneousBaseline",
55+
type: "boolean",
56+
},
4957
learningDuration: {
5058
baseName: "learningDuration",
5159
type: "SecurityMonitoringRuleNewValueOptionsLearningDuration",

0 commit comments

Comments
 (0)