From 8aa8e47e6f3105c747968c9a8a7b313cd0425172 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 16 Apr 2026 14:06:59 +0000 Subject: [PATCH] Regenerate client from commit 253ad71 of spec repo --- .generator/schemas/v2/openapi.yaml | 7 +- .../frozen.json | 1 + .../recording.har | 104 ++++++++++++++++++ features/v2/security_monitoring.feature | 7 ++ .../src/v2/models/RuleTypesItems.ts | 7 +- .../src/v2/models/TypingInfo.ts | 2 + 6 files changed, 126 insertions(+), 2 deletions(-) create mode 100644 cassettes/v2/Security-Monitoring_1187227211/Create-a-new-vulnerability-based-notification-rule-with-sast-and-secret-rule-types-return_1041700713/frozen.json create mode 100644 cassettes/v2/Security-Monitoring_1187227211/Create-a-new-vulnerability-based-notification-rule-with-sast-and-secret-rule-types-return_1041700713/recording.har diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 8a51fd127ec1..933b156f6395 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -57465,7 +57465,8 @@ components: Signal-based notification rules can filter signals based on rule types application_security, log_detection, workload_security, signal_correlation, cloud_configuration and infrastructure_configuration. Vulnerability-based notification rules can filter vulnerabilities based on rule types application_code_vulnerability, - application_library_vulnerability, attack_path, container_image_vulnerability, identity_risk, misconfiguration, api_security, host_vulnerability and iac_misconfiguration. + application_library_vulnerability, attack_path, container_image_vulnerability, identity_risk, misconfiguration, + api_security, host_vulnerability, iac_misconfiguration, sast_vulnerability and secret_vulnerability. enum: - application_security - log_detection @@ -57482,6 +57483,8 @@ components: - api_security - host_vulnerability - iac_misconfiguration + - sast_vulnerability + - secret_vulnerability type: string x-enum-varnames: - APPLICATION_SECURITY @@ -57499,6 +57502,8 @@ components: - API_SECURITY - HOST_VULNERABILITY - IAC_MISCONFIGURATION + - SAST_VULNERABILITY + - SECRET_VULNERABILITY RuleUser: description: User creating or modifying a rule. properties: diff --git a/cassettes/v2/Security-Monitoring_1187227211/Create-a-new-vulnerability-based-notification-rule-with-sast-and-secret-rule-types-return_1041700713/frozen.json b/cassettes/v2/Security-Monitoring_1187227211/Create-a-new-vulnerability-based-notification-rule-with-sast-and-secret-rule-types-return_1041700713/frozen.json new file mode 100644 index 000000000000..f5c8e2441efa --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Create-a-new-vulnerability-based-notification-rule-with-sast-and-secret-rule-types-return_1041700713/frozen.json @@ -0,0 +1 @@ +"2026-04-16T13:47:18.057Z" diff --git a/cassettes/v2/Security-Monitoring_1187227211/Create-a-new-vulnerability-based-notification-rule-with-sast-and-secret-rule-types-return_1041700713/recording.har b/cassettes/v2/Security-Monitoring_1187227211/Create-a-new-vulnerability-based-notification-rule-with-sast-and-secret-rule-types-return_1041700713/recording.har new file mode 100644 index 000000000000..f8576bb10836 --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Create-a-new-vulnerability-based-notification-rule-with-sast-and-secret-rule-types-return_1041700713/recording.har @@ -0,0 +1,104 @@ +{ + "log": { + "_recordingName": "Security Monitoring/Create a new vulnerability-based notification rule with sast and secret rule types returns \"Successfully created the notification rule.\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "c063ba4707a314ad0932fc744f457fd5", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 439, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 613, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Test-Create_a_new_vulnerability_based_notification_rule_with_sast_and_secret_rule_types_returns_Successfu-1776347238\",\"selectors\":{\"query\":\"(source:production_service OR env:prod)\",\"rule_types\":[\"sast_vulnerability\",\"secret_vulnerability\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_findings\"},\"targets\":[\"@john.doe@email.com\"],\"time_aggregation\":86400},\"type\":\"notification_rules\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/vulnerabilities/notification_rules" + }, + "response": { + "bodySize": 692, + "content": { + "mimeType": "application/vnd.api+json", + "size": 692, + "text": "{\"data\":{\"id\":\"exz-ipg-n1m\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1776347239287,\"created_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"enabled\":true,\"modified_at\":1776347239287,\"modified_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"name\":\"Test-Create_a_new_vulnerability_based_notification_rule_with_sast_and_secret_rule_types_returns_Successfu-1776347238\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"sast_vulnerability\",\"secret_vulnerability\"],\"query\":\"(source:production_service OR env:prod)\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@john.doe@email.com\"],\"time_aggregation\":86400,\"version\":1}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 662, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2026-04-16T13:47:19.126Z", + "time": 203 + }, + { + "_id": "9dbd8db3f734efcbf0da5e234a383dd7", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 561, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/vulnerabilities/notification_rules/exz-ipg-n1m" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 601, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2026-04-16T13:47:19.349Z", + "time": 93 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/features/v2/security_monitoring.feature b/features/v2/security_monitoring.feature index 1fdee4f141b9..245f23784085 100644 --- a/features/v2/security_monitoring.feature +++ b/features/v2/security_monitoring.feature @@ -591,6 +591,13 @@ Feature: Security Monitoring When the request is sent Then the response status is 201 Successfully created the notification rule. + @team:DataDog/cloud-security-posture-management + Scenario: Create a new vulnerability-based notification rule with sast and secret rule types returns "Successfully created the notification rule." response + Given new "CreateVulnerabilityNotificationRule" request + And body with value {"data": {"attributes": {"enabled": true, "name": "{{ unique }}", "selectors": {"query": "(source:production_service OR env:prod)", "rule_types": ["sast_vulnerability", "secret_vulnerability"], "severities": ["critical"], "trigger_source": "security_findings"}, "targets": ["@john.doe@email.com"], "time_aggregation": 86400}, "type": "notification_rules"}} + When the request is sent + Then the response status is 201 Successfully created the notification rule. + @team:DataDog/k9-cloud-siem Scenario: Create a scheduled detection rule returns "OK" response Given new "CreateSecurityMonitoringRule" request diff --git a/services/security_monitoring/src/v2/models/RuleTypesItems.ts b/services/security_monitoring/src/v2/models/RuleTypesItems.ts index 6f24de06a82a..4b34fca02201 100644 --- a/services/security_monitoring/src/v2/models/RuleTypesItems.ts +++ b/services/security_monitoring/src/v2/models/RuleTypesItems.ts @@ -5,7 +5,8 @@ import { UnparsedObject } from "@datadog/datadog-api-client"; * Signal-based notification rules can filter signals based on rule types application_security, log_detection, * workload_security, signal_correlation, cloud_configuration and infrastructure_configuration. * Vulnerability-based notification rules can filter vulnerabilities based on rule types application_code_vulnerability, - * application_library_vulnerability, attack_path, container_image_vulnerability, identity_risk, misconfiguration, api_security, host_vulnerability and iac_misconfiguration. + * application_library_vulnerability, attack_path, container_image_vulnerability, identity_risk, misconfiguration, + * api_security, host_vulnerability, iac_misconfiguration, sast_vulnerability and secret_vulnerability. */ export type RuleTypesItems = | typeof APPLICATION_SECURITY @@ -23,6 +24,8 @@ export type RuleTypesItems = | typeof API_SECURITY | typeof HOST_VULNERABILITY | typeof IAC_MISCONFIGURATION + | typeof SAST_VULNERABILITY + | typeof SECRET_VULNERABILITY | UnparsedObject; export const APPLICATION_SECURITY = "application_security"; export const LOG_DETECTION = "log_detection"; @@ -40,3 +43,5 @@ export const MISCONFIGURATION = "misconfiguration"; export const API_SECURITY = "api_security"; export const HOST_VULNERABILITY = "host_vulnerability"; export const IAC_MISCONFIGURATION = "iac_misconfiguration"; +export const SAST_VULNERABILITY = "sast_vulnerability"; +export const SECRET_VULNERABILITY = "secret_vulnerability"; diff --git a/services/security_monitoring/src/v2/models/TypingInfo.ts b/services/security_monitoring/src/v2/models/TypingInfo.ts index 43aac14f333f..590c55e08c1c 100644 --- a/services/security_monitoring/src/v2/models/TypingInfo.ts +++ b/services/security_monitoring/src/v2/models/TypingInfo.ts @@ -374,6 +374,8 @@ export const TypingInfo: ModelTypingInfo = { "api_security", "host_vulnerability", "iac_misconfiguration", + "sast_vulnerability", + "secret_vulnerability", ], RunThreatHuntingJobRequestDataType: ["historicalDetectionsJobCreate"], SBOMComponentLicenseType: [