diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 86e6f24483b3..088f3a95de1e 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/features/v2/sensitive_data_scanner.feature b/features/v2/sensitive_data_scanner.feature index 00415164c39b..2db0cd887803 100644 --- a/features/v2/sensitive_data_scanner.feature +++ b/features/v2/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 diff --git a/packages/datadog-api-client-v2/models/SensitiveDataScannerRuleAttributes.ts b/packages/datadog-api-client-v2/models/SensitiveDataScannerRuleAttributes.ts index 5462c5012774..90887dbda90b 100644 --- a/packages/datadog-api-client-v2/models/SensitiveDataScannerRuleAttributes.ts +++ b/packages/datadog-api-client-v2/models/SensitiveDataScannerRuleAttributes.ts @@ -50,7 +50,9 @@ export class SensitiveDataScannerRuleAttributes { */ "priority"?: number; /** - * 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. */ "suppressions"?: SensitiveDataScannerSuppressions; diff --git a/packages/datadog-api-client-v2/models/SensitiveDataScannerStandardPatternAttributes.ts b/packages/datadog-api-client-v2/models/SensitiveDataScannerStandardPatternAttributes.ts index 60f28da8b757..bd33b1636e7b 100644 --- a/packages/datadog-api-client-v2/models/SensitiveDataScannerStandardPatternAttributes.ts +++ b/packages/datadog-api-client-v2/models/SensitiveDataScannerStandardPatternAttributes.ts @@ -3,6 +3,7 @@ * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2020-Present Datadog, Inc. */ +import { SensitiveDataScannerSuppressions } from "./SensitiveDataScannerSuppressions"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; @@ -30,6 +31,13 @@ export class SensitiveDataScannerStandardPatternAttributes { * Integer from 1 (high) to 5 (low) indicating standard pattern issue severity. */ "priority"?: number; + /** + * 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. + */ + "suppressions"?: SensitiveDataScannerSuppressions; /** * List of tags. */ @@ -72,6 +80,10 @@ export class SensitiveDataScannerStandardPatternAttributes { type: "number", format: "int64", }, + suppressions: { + baseName: "suppressions", + type: "SensitiveDataScannerSuppressions", + }, tags: { baseName: "tags", type: "Array", diff --git a/packages/datadog-api-client-v2/models/SensitiveDataScannerSuppressions.ts b/packages/datadog-api-client-v2/models/SensitiveDataScannerSuppressions.ts index 46eb5e8a0253..86be2637b300 100644 --- a/packages/datadog-api-client-v2/models/SensitiveDataScannerSuppressions.ts +++ b/packages/datadog-api-client-v2/models/SensitiveDataScannerSuppressions.ts @@ -7,7 +7,9 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util"; /** - * 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. */ export class SensitiveDataScannerSuppressions { @@ -23,6 +25,11 @@ export class SensitiveDataScannerSuppressions { * List of strings to use for suppression of matches starting with these strings. */ "startsWith"?: Array; + /** + * 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. + */ + "useRecommendedSuppressions"?: boolean; /** * A container for additional, undeclared properties. @@ -52,6 +59,10 @@ export class SensitiveDataScannerSuppressions { baseName: "starts_with", type: "Array", }, + useRecommendedSuppressions: { + baseName: "use_recommended_suppressions", + type: "boolean", + }, additionalProperties: { baseName: "additionalProperties", type: "{ [key: string]: any; }",