Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118689,6 +118689,8 @@ components:
maximum: 5
minimum: 1
type: integer
suppressions:
$ref: "#/components/schemas/SensitiveDataScannerSuppressions"
tags:
description: List of tags.
items:
Expand Down Expand Up @@ -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:
Expand All @@ -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.
Expand Down
1 change: 1 addition & 0 deletions features/v2/sensitive_data_scanner.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -72,6 +80,10 @@ export class SensitiveDataScannerStandardPatternAttributes {
type: "number",
format: "int64",
},
suppressions: {
baseName: "suppressions",
type: "SensitiveDataScannerSuppressions",
},
tags: {
baseName: "tags",
type: "Array<string>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -23,6 +25,11 @@ export class SensitiveDataScannerSuppressions {
* List of strings to use for suppression of matches starting with these strings.
*/
"startsWith"?: Array<string>;
/**
* 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.
Expand Down Expand Up @@ -52,6 +59,10 @@ export class SensitiveDataScannerSuppressions {
baseName: "starts_with",
type: "Array<string>",
},
useRecommendedSuppressions: {
baseName: "use_recommended_suppressions",
type: "boolean",
},
additionalProperties: {
baseName: "additionalProperties",
type: "{ [key: string]: any; }",
Expand Down
Loading