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
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,11 @@ public SensitiveDataScannerRuleAttributes suppressions(
}

/**
* Object describing the suppressions for a rule. There are three types of suppressions, <code>
* starts_with</code>, <code>ends_with</code>, and <code>exact_match</code>. Suppressed matches
* are not obfuscated, counted in metrics, or displayed in the Findings page.
* Object describing suppressions for a rule, or the recommended suppression lists published by a
* standard pattern. There are three types of suppressions, <code>starts_with</code>, <code>
* ends_with</code>, and <code>exact_match</code>. 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.
*
* @return suppressions
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
SensitiveDataScannerStandardPatternAttributes.JSON_PROPERTY_NAME,
SensitiveDataScannerStandardPatternAttributes.JSON_PROPERTY_PATTERN,
SensitiveDataScannerStandardPatternAttributes.JSON_PROPERTY_PRIORITY,
SensitiveDataScannerStandardPatternAttributes.JSON_PROPERTY_SUPPRESSIONS,
SensitiveDataScannerStandardPatternAttributes.JSON_PROPERTY_TAGS
})
@jakarta.annotation.Generated(
Expand All @@ -46,6 +47,9 @@ public class SensitiveDataScannerStandardPatternAttributes {
public static final String JSON_PROPERTY_PRIORITY = "priority";
private Long priority;

public static final String JSON_PROPERTY_SUPPRESSIONS = "suppressions";
private SensitiveDataScannerSuppressions suppressions;

public static final String JSON_PROPERTY_TAGS = "tags";
private List<String> tags = null;

Expand Down Expand Up @@ -169,6 +173,36 @@ public void setPriority(Long priority) {
this.priority = priority;
}

public SensitiveDataScannerStandardPatternAttributes suppressions(
SensitiveDataScannerSuppressions suppressions) {
this.suppressions = suppressions;
this.unparsed |= suppressions.unparsed;
return this;
}

/**
* Object describing suppressions for a rule, or the recommended suppression lists published by a
* standard pattern. There are three types of suppressions, <code>starts_with</code>, <code>
* ends_with</code>, and <code>exact_match</code>. 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.
*
* @return suppressions
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_SUPPRESSIONS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public SensitiveDataScannerSuppressions getSuppressions() {
return suppressions;
}

public void setSuppressions(SensitiveDataScannerSuppressions suppressions) {
this.suppressions = suppressions;
if (suppressions != null) {
this.unparsed |= suppressions.unparsed;
}
}

public SensitiveDataScannerStandardPatternAttributes tags(List<String> tags) {
this.tags = tags;
return this;
Expand Down Expand Up @@ -263,6 +297,8 @@ public boolean equals(Object o) {
&& Objects.equals(this.name, sensitiveDataScannerStandardPatternAttributes.name)
&& Objects.equals(this.pattern, sensitiveDataScannerStandardPatternAttributes.pattern)
&& Objects.equals(this.priority, sensitiveDataScannerStandardPatternAttributes.priority)
&& Objects.equals(
this.suppressions, sensitiveDataScannerStandardPatternAttributes.suppressions)
&& Objects.equals(this.tags, sensitiveDataScannerStandardPatternAttributes.tags)
&& Objects.equals(
this.additionalProperties,
Expand All @@ -272,7 +308,14 @@ public boolean equals(Object o) {
@Override
public int hashCode() {
return Objects.hash(
description, includedKeywords, name, pattern, priority, tags, additionalProperties);
description,
includedKeywords,
name,
pattern,
priority,
suppressions,
tags,
additionalProperties);
}

@Override
Expand All @@ -284,6 +327,7 @@ public String toString() {
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" pattern: ").append(toIndentedString(pattern)).append("\n");
sb.append(" priority: ").append(toIndentedString(priority)).append("\n");
sb.append(" suppressions: ").append(toIndentedString(suppressions)).append("\n");
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
sb.append(" additionalProperties: ")
.append(toIndentedString(additionalProperties))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,17 @@
import java.util.Objects;

/**
* Object describing the suppressions for a rule. There are three types of suppressions, <code>
* starts_with</code>, <code>ends_with</code>, and <code>exact_match</code>. Suppressed matches are
* not obfuscated, counted in metrics, or displayed in the Findings page.
* Object describing suppressions for a rule, or the recommended suppression lists published by a
* standard pattern. There are three types of suppressions, <code>starts_with</code>, <code>
* ends_with</code>, and <code>exact_match</code>. 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.
*/
@JsonPropertyOrder({
SensitiveDataScannerSuppressions.JSON_PROPERTY_ENDS_WITH,
SensitiveDataScannerSuppressions.JSON_PROPERTY_EXACT_MATCH,
SensitiveDataScannerSuppressions.JSON_PROPERTY_STARTS_WITH
SensitiveDataScannerSuppressions.JSON_PROPERTY_STARTS_WITH,
SensitiveDataScannerSuppressions.JSON_PROPERTY_USE_RECOMMENDED_SUPPRESSIONS
})
@jakarta.annotation.Generated(
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
Expand All @@ -41,6 +44,10 @@ public class SensitiveDataScannerSuppressions {
public static final String JSON_PROPERTY_STARTS_WITH = "starts_with";
private List<String> startsWith = null;

public static final String JSON_PROPERTY_USE_RECOMMENDED_SUPPRESSIONS =
"use_recommended_suppressions";
private Boolean useRecommendedSuppressions;

public SensitiveDataScannerSuppressions endsWith(List<String> endsWith) {
this.endsWith = endsWith;
return this;
Expand Down Expand Up @@ -128,6 +135,30 @@ public void setStartsWith(List<String> startsWith) {
this.startsWith = startsWith;
}

public SensitiveDataScannerSuppressions useRecommendedSuppressions(
Boolean useRecommendedSuppressions) {
this.useRecommendedSuppressions = useRecommendedSuppressions;
return this;
}

/**
* Should the rule use the underlying standard pattern suppression configuration. If set to <code>
* true</code>, the rule must be tied to a standard pattern. If set to <code>false</code>, the
* specified suppressions are applied.
*
* @return useRecommendedSuppressions
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_USE_RECOMMENDED_SUPPRESSIONS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getUseRecommendedSuppressions() {
return useRecommendedSuppressions;
}

public void setUseRecommendedSuppressions(Boolean useRecommendedSuppressions) {
this.useRecommendedSuppressions = useRecommendedSuppressions;
}

/**
* A container for additional, undeclared properties. This is a holder for any undeclared
* properties as specified with the 'additionalProperties' keyword in the OAS document.
Expand Down Expand Up @@ -188,13 +219,17 @@ public boolean equals(Object o) {
return Objects.equals(this.endsWith, sensitiveDataScannerSuppressions.endsWith)
&& Objects.equals(this.exactMatch, sensitiveDataScannerSuppressions.exactMatch)
&& Objects.equals(this.startsWith, sensitiveDataScannerSuppressions.startsWith)
&& Objects.equals(
this.useRecommendedSuppressions,
sensitiveDataScannerSuppressions.useRecommendedSuppressions)
&& Objects.equals(
this.additionalProperties, sensitiveDataScannerSuppressions.additionalProperties);
}

@Override
public int hashCode() {
return Objects.hash(endsWith, exactMatch, startsWith, additionalProperties);
return Objects.hash(
endsWith, exactMatch, startsWith, useRecommendedSuppressions, additionalProperties);
}

@Override
Expand All @@ -204,6 +239,9 @@ public String toString() {
sb.append(" endsWith: ").append(toIndentedString(endsWith)).append("\n");
sb.append(" exactMatch: ").append(toIndentedString(exactMatch)).append("\n");
sb.append(" startsWith: ").append(toIndentedString(startsWith)).append("\n");
sb.append(" useRecommendedSuppressions: ")
.append(toIndentedString(useRecommendedSuppressions))
.append("\n");
sb.append(" additionalProperties: ")
.append(toIndentedString(additionalProperties))
.append("\n");
Expand Down
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
Loading