Skip to content

Commit f75da16

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spectherve
authored
Skip validation in security monitoring tests (#1712)
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> Co-authored-by: Thomas Hervé <[email protected]>
1 parent c52a615 commit f75da16

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
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.6",
7-
"regenerated": "2023-10-06 19:52:04.370424",
8-
"spec_repo_commit": "298a7f88"
7+
"regenerated": "2023-10-10 07:51:52.156669",
8+
"spec_repo_commit": "6482b048"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2023-10-06 19:52:04.384233",
13-
"spec_repo_commit": "298a7f88"
12+
"regenerated": "2023-10-10 07:51:52.174430",
13+
"spec_repo_commit": "6482b048"
1414
}
1515
}
1616
}

tests/v2/features/security_monitoring.feature

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Feature: Security Monitoring
5555
When the request is sent
5656
Then the response status is 200 OK
5757

58-
@team:DataDog/k9-cloud-security-platform
58+
@skip-validation @team:DataDog/k9-cloud-security-platform
5959
Scenario: Create a cloud_configuration rule returns "OK" response
6060
Given new "CreateSecurityMonitoringRule" request
6161
And body with value {"type":"cloud_configuration","name":"{{ unique }}_cloud","isEnabled":false,"cases":[{"status":"info","notifications":["channel"]}],"options":{"complianceRuleOptions":{"resourceType":"gcp_compute_disk","complexRule": false,"regoRule":{"policy":"package datadog\n\nimport data.datadog.output as dd_output\n\nimport future.keywords.contains\nimport future.keywords.if\nimport future.keywords.in\n\nmilliseconds_in_a_day := ((1000 * 60) * 60) * 24\n\neval(iam_service_account_key) = \"skip\" if {\n\tiam_service_account_key.disabled\n} else = \"pass\" if {\n\t(iam_service_account_key.resource_seen_at / milliseconds_in_a_day) - (iam_service_account_key.valid_after_time / milliseconds_in_a_day) <= 90\n} else = \"fail\"\n\n# This part remains unchanged for all rules\nresults contains result if {\n\tsome resource in input.resources[input.main_resource_type]\n\tresult := dd_output.format(resource, eval(resource))\n}\n","resourceTypes":["gcp_compute_disk"]}}},"message":"ddd","tags":["my:tag"],"complianceSignalOptions":{"userActivationStatus":true,"userGroupByFields":["@account_id"]},"filters":[{"action":"require","query":"resource_id:helo*"},{"action":"suppress","query":"control:helo*"}]}
@@ -73,7 +73,7 @@ Feature: Security Monitoring
7373
When the request is sent
7474
Then the response status is 400 Bad Request
7575

76-
@team:DataDog/k9-cloud-security-platform
76+
@skip-validation @team:DataDog/k9-cloud-security-platform
7777
Scenario: Create a detection rule returns "OK" response
7878
Given new "CreateSecurityMonitoringRule" request
7979
And body with value {"name":"{{ unique }}", "queries":[{"query":"@test:true","aggregation":"count","groupByFields":[],"distinctFields":[],"metric":""}],"filters":[],"cases":[{"name":"","status":"info","condition":"a > 0","notifications":[]}],"options":{"evaluationWindow":900,"keepAlive":3600,"maxSignalDuration":86400},"message":"Test rule","tags":[],"isEnabled":true, "type":"log_detection"}
@@ -83,7 +83,7 @@ Feature: Security Monitoring
8383
And the response "type" is equal to "log_detection"
8484
And the response "message" is equal to "Test rule"
8585

86-
@team:DataDog/k9-cloud-security-platform
86+
@skip-validation @team:DataDog/k9-cloud-security-platform
8787
Scenario: Create a detection rule with type 'impossible_travel' returns "OK" response
8888
Given new "CreateSecurityMonitoringRule" request
8989
And body with value {"queries":[{"aggregation":"geo_data","groupByFields":["@usr.id"],"distinctFields":[],"metric":"@network.client.geoip","query":"*"}],"cases":[{"name":"","status":"info","notifications":[]}],"hasExtendedTitle":true,"message":"test","isEnabled":true,"options":{"maxSignalDuration":86400,"evaluationWindow":900,"keepAlive":3600,"detectionMethod":"impossible_travel","impossibleTravelOptions":{"baselineUserLocations":false}},"name":"{{ unique }}","type":"log_detection","tags":[],"filters":[]}
@@ -94,7 +94,7 @@ Feature: Security Monitoring
9494
And the response "message" is equal to "test"
9595
And the response "options.detectionMethod" is equal to "impossible_travel"
9696

97-
@team:DataDog/k9-cloud-security-platform
97+
@skip-validation @team:DataDog/k9-cloud-security-platform
9898
Scenario: Create a detection rule with type 'signal_correlation' returns "OK" response
9999
Given there is a valid "security_rule" in the system
100100
And there is a valid "security_rule_bis" in the system
@@ -107,7 +107,7 @@ Feature: Security Monitoring
107107
And the response "message" is equal to "Test signal correlation rule"
108108
And the response "isEnabled" is equal to true
109109

110-
@team:DataDog/k9-cloud-security-platform
110+
@skip-validation @team:DataDog/k9-cloud-security-platform
111111
Scenario: Create a detection rule with type 'workload_security' returns "OK" response
112112
Given new "CreateSecurityMonitoringRule" request
113113
And body with value {"name":"{{ unique }}", "queries":[{"query":"@test:true","aggregation":"count","groupByFields":[],"distinctFields":[],"metric":""}],"filters":[],"cases":[{"name":"","status":"info","condition":"a > 0","notifications":[]}],"options":{"evaluationWindow":900,"keepAlive":3600,"maxSignalDuration":86400},"message":"Test rule","tags":[],"isEnabled":true, "type": "workload_security"}
@@ -180,15 +180,15 @@ Feature: Security Monitoring
180180
When the request is sent
181181
Then the response status is 404 Not Found
182182

183-
@team:DataDog/k9-cloud-security-platform
183+
@skip-validation @team:DataDog/k9-cloud-security-platform
184184
Scenario: Delete an existing rule returns "OK" response
185185
Given there is a valid "security_rule" in the system
186186
And new "DeleteSecurityMonitoringRule" request
187187
And request contains "rule_id" parameter from "security_rule.id"
188188
When the request is sent
189189
Then the response status is 204 OK
190190

191-
@team:DataDog/k9-cloud-security-platform
191+
@skip-validation @team:DataDog/k9-cloud-security-platform
192192
Scenario: Get a cloud configuration rule's details returns "OK" response
193193
Given there is a valid "cloud_configuration_rule" in the system
194194
And new "GetSecurityMonitoringRule" request
@@ -272,7 +272,7 @@ Feature: Security Monitoring
272272
When the request is sent
273273
Then the response status is 404 Not Found
274274

275-
@team:DataDog/k9-cloud-security-platform
275+
@skip-validation @team:DataDog/k9-cloud-security-platform
276276
Scenario: Get a rule's details returns "OK" response
277277
Given new "GetSecurityMonitoringRule" request
278278
And there is a valid "security_rule" in the system
@@ -359,7 +359,7 @@ Feature: Security Monitoring
359359
When the request is sent
360360
Then the response status is 400 Bad Request
361361

362-
@team:DataDog/k9-cloud-security-platform
362+
@skip-validation @team:DataDog/k9-cloud-security-platform
363363
Scenario: List rules returns "OK" response
364364
Given new "ListSecurityMonitoringRules" request
365365
When the request is sent
@@ -435,7 +435,7 @@ Feature: Security Monitoring
435435
When the request is sent
436436
Then the response status is 409 Resource Conflict: The finding has already been muted or unmuted within the last 60 seconds.
437437

438-
@team:DataDog/k9-cloud-security-platform
438+
@skip-validation @team:DataDog/k9-cloud-security-platform
439439
Scenario: Update a cloud configuration rule's details returns "OK" response
440440
Given new "UpdateSecurityMonitoringRule" request
441441
And there is a valid "cloud_configuration_rule" in the system
@@ -482,7 +482,7 @@ Feature: Security Monitoring
482482
And the response "data.attributes.filtered_data_type" is equal to "logs"
483483
And the response "data.attributes.name" is equal to "{{ unique }}"
484484

485-
@team:DataDog/k9-cloud-security-platform
485+
@skip-validation @team:DataDog/k9-cloud-security-platform
486486
Scenario: Update an existing rule returns "Bad Request" response
487487
Given new "UpdateSecurityMonitoringRule" request
488488
And there is a valid "security_rule" in the system
@@ -499,7 +499,7 @@ Feature: Security Monitoring
499499
When the request is sent
500500
Then the response status is 404 Not Found
501501

502-
@team:DataDog/k9-cloud-security-platform
502+
@skip-validation @team:DataDog/k9-cloud-security-platform
503503
Scenario: Update an existing rule returns "OK" response
504504
Given new "UpdateSecurityMonitoringRule" request
505505
And there is a valid "security_rule" in the system

0 commit comments

Comments
 (0)