From 510b2b49e0f9e770c733cfbedff27296352edfb2 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 23 Oct 2026 08:18:42 +0000 Subject: [PATCH] Regenerate client from commit 4521dba of spec repo --- .generator/schemas/v2/openapi.yaml | 11 ++++++++++- .../sensitive_data_scanner_rule_attributes.py | 4 +++- ...ata_scanner_standard_pattern_attributes.py | 19 ++++++++++++++++++- .../sensitive_data_scanner_suppressions.py | 13 ++++++++++++- .../features/sensitive_data_scanner.feature | 1 + 5 files changed, 44 insertions(+), 4 deletions(-) diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 86e6f24483..088f3a95de 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -118689,6 +118689,8 @@ components: maximum: 5 minimum: 1 type: integer + suppressions: + $ref: "#/components/schemas/SensitiveDataScannerSuppressions" tags: description: List of tags. items: @@ -118735,7 +118737,9 @@ components: type: object SensitiveDataScannerSuppressions: description: |- - Object describing the suppressions for a rule. There are three types of suppressions, `starts_with`, `ends_with`, and `exact_match`. + Object describing suppressions for a rule, or the recommended suppression lists published by a standard pattern. + There are three types of suppressions, `starts_with`, `ends_with`, and `exact_match`. + Rules based on the Datadog library can use recommended or custom suppressions. Custom rules can only use custom suppressions. Suppressed matches are not obfuscated, counted in metrics, or displayed in the Findings page. properties: ends_with: @@ -118759,6 +118763,11 @@ components: description: A string prefix; matches starting with this value are suppressed. type: string type: array + use_recommended_suppressions: + description: |- + Should the rule use the underlying standard pattern suppression configuration. If set to `true`, the rule must be tied + to a standard pattern. If set to `false`, the specified suppressions are applied. + type: boolean type: object SensitiveDataScannerTextReplacement: description: Object describing how the scanned event will be replaced. diff --git a/src/datadog_api_client/v2/model/sensitive_data_scanner_rule_attributes.py b/src/datadog_api_client/v2/model/sensitive_data_scanner_rule_attributes.py index 66ed4e4d3c..4df9e599d5 100644 --- a/src/datadog_api_client/v2/model/sensitive_data_scanner_rule_attributes.py +++ b/src/datadog_api_client/v2/model/sensitive_data_scanner_rule_attributes.py @@ -113,7 +113,9 @@ def __init__( :param priority: Integer from 1 (high) to 5 (low) indicating rule issue severity. :type priority: int, optional - :param suppressions: Object describing the suppressions for a rule. There are three types of suppressions, ``starts_with`` , ``ends_with`` , and ``exact_match``. + :param suppressions: Object describing suppressions for a rule, or the recommended suppression lists published by a standard pattern. + There are three types of suppressions, ``starts_with`` , ``ends_with`` , and ``exact_match``. + Rules based on the Datadog library can use recommended or custom suppressions. Custom rules can only use custom suppressions. Suppressed matches are not obfuscated, counted in metrics, or displayed in the Findings page. :type suppressions: SensitiveDataScannerSuppressions, optional diff --git a/src/datadog_api_client/v2/model/sensitive_data_scanner_standard_pattern_attributes.py b/src/datadog_api_client/v2/model/sensitive_data_scanner_standard_pattern_attributes.py index 5a787469dc..2aea71c285 100644 --- a/src/datadog_api_client/v2/model/sensitive_data_scanner_standard_pattern_attributes.py +++ b/src/datadog_api_client/v2/model/sensitive_data_scanner_standard_pattern_attributes.py @@ -3,7 +3,7 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import List, Union +from typing import List, Union, TYPE_CHECKING from datadog_api_client.model_utils import ( ModelNormal, @@ -13,6 +13,10 @@ ) +if TYPE_CHECKING: + from datadog_api_client.v2.model.sensitive_data_scanner_suppressions import SensitiveDataScannerSuppressions + + class SensitiveDataScannerStandardPatternAttributes(ModelNormal): validations = { "priority": { @@ -23,12 +27,15 @@ class SensitiveDataScannerStandardPatternAttributes(ModelNormal): @cached_property def openapi_types(_): + from datadog_api_client.v2.model.sensitive_data_scanner_suppressions import SensitiveDataScannerSuppressions + return { "description": (str,), "included_keywords": ([str],), "name": (str,), "pattern": (str,), "priority": (int,), + "suppressions": (SensitiveDataScannerSuppressions,), "tags": ([str],), } @@ -38,6 +45,7 @@ def openapi_types(_): "name": "name", "pattern": "pattern", "priority": "priority", + "suppressions": "suppressions", "tags": "tags", } @@ -48,6 +56,7 @@ def __init__( name: Union[str, UnsetType] = unset, pattern: Union[str, UnsetType] = unset, priority: Union[int, UnsetType] = unset, + suppressions: Union[SensitiveDataScannerSuppressions, UnsetType] = unset, tags: Union[List[str], UnsetType] = unset, **kwargs, ): @@ -69,6 +78,12 @@ def __init__( :param priority: Integer from 1 (high) to 5 (low) indicating standard pattern issue severity. :type priority: int, optional + :param suppressions: Object describing suppressions for a rule, or the recommended suppression lists published by a standard pattern. + There are three types of suppressions, ``starts_with`` , ``ends_with`` , and ``exact_match``. + Rules based on the Datadog library can use recommended or custom suppressions. Custom rules can only use custom suppressions. + Suppressed matches are not obfuscated, counted in metrics, or displayed in the Findings page. + :type suppressions: SensitiveDataScannerSuppressions, optional + :param tags: List of tags. :type tags: [str], optional """ @@ -82,6 +97,8 @@ def __init__( kwargs["pattern"] = pattern if priority is not unset: kwargs["priority"] = priority + if suppressions is not unset: + kwargs["suppressions"] = suppressions if tags is not unset: kwargs["tags"] = tags super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/sensitive_data_scanner_suppressions.py b/src/datadog_api_client/v2/model/sensitive_data_scanner_suppressions.py index b1de088653..c5b7272bcc 100644 --- a/src/datadog_api_client/v2/model/sensitive_data_scanner_suppressions.py +++ b/src/datadog_api_client/v2/model/sensitive_data_scanner_suppressions.py @@ -20,12 +20,14 @@ def openapi_types(_): "ends_with": ([str],), "exact_match": ([str],), "starts_with": ([str],), + "use_recommended_suppressions": (bool,), } attribute_map = { "ends_with": "ends_with", "exact_match": "exact_match", "starts_with": "starts_with", + "use_recommended_suppressions": "use_recommended_suppressions", } def __init__( @@ -33,10 +35,13 @@ def __init__( ends_with: Union[List[str], UnsetType] = unset, exact_match: Union[List[str], UnsetType] = unset, starts_with: Union[List[str], UnsetType] = unset, + use_recommended_suppressions: Union[bool, UnsetType] = unset, **kwargs, ): """ - Object describing the suppressions for a rule. There are three types of suppressions, ``starts_with`` , ``ends_with`` , and ``exact_match``. + Object describing suppressions for a rule, or the recommended suppression lists published by a standard pattern. + There are three types of suppressions, ``starts_with`` , ``ends_with`` , and ``exact_match``. + Rules based on the Datadog library can use recommended or custom suppressions. Custom rules can only use custom suppressions. Suppressed matches are not obfuscated, counted in metrics, or displayed in the Findings page. :param ends_with: List of strings to use for suppression of matches ending with these strings. @@ -47,6 +52,10 @@ def __init__( :param starts_with: List of strings to use for suppression of matches starting with these strings. :type starts_with: [str], optional + + :param use_recommended_suppressions: Should the rule use the underlying standard pattern suppression configuration. If set to ``true`` , the rule must be tied + to a standard pattern. If set to ``false`` , the specified suppressions are applied. + :type use_recommended_suppressions: bool, optional """ if ends_with is not unset: kwargs["ends_with"] = ends_with @@ -54,4 +63,6 @@ def __init__( kwargs["exact_match"] = exact_match if starts_with is not unset: kwargs["starts_with"] = starts_with + if use_recommended_suppressions is not unset: + kwargs["use_recommended_suppressions"] = use_recommended_suppressions super().__init__(kwargs) diff --git a/tests/v2/features/sensitive_data_scanner.feature b/tests/v2/features/sensitive_data_scanner.feature index 00415164c3..2db0cd8878 100644 --- a/tests/v2/features/sensitive_data_scanner.feature +++ b/tests/v2/features/sensitive_data_scanner.feature @@ -140,6 +140,7 @@ Feature: Sensitive Data Scanner Given new "ListStandardPatterns" request When the request is sent Then the response status is 200 OK + And the response "data[0].attributes" has field "suppressions" @team:ddoghq/sensitive-data-scanner Scenario: Reorder Groups returns "Bad Request" response