You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Only valid when type == `replacement_string`. When enabled, matches can be unmasked in logs by users with ‘Data Scanner Unmask’ permission. As a security best practice, avoid masking for highly-sensitive, long-lived data.
22
+
#[serde(rename = "should_save_match")]
23
+
pubshould_save_match:Option<bool>,
21
24
/// Type of the replacement text. None means no replacement.
22
25
/// hash means the data will be stubbed. replacement_string means that
23
26
/// one can chose a text to replace the data. partial_replacement_from_beginning
Copy file name to clipboardExpand all lines: tests/scenarios/features/v2/sensitive_data_scanner.feature
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,17 @@ Feature: Sensitive Data Scanner
50
50
And the response "data.attributes.included_keyword_configuration.character_count" is equal to 35
51
51
And the response "data.attributes.included_keyword_configuration.keywords[0]" is equal to "credit card"
52
52
53
+
@team:DataDog/sensitive-data-scanner
54
+
Scenario: Create Scanning Rule with should_save_match returns "OK" response
55
+
Given a valid "configuration" in the system
56
+
And there is a valid "scanning_group" in the system
57
+
And new "CreateScanningRule" request
58
+
And body with value {"meta":{},"data":{"type":"sensitive_data_scanner_rule","attributes":{"name":"{{ unique }}","pattern":"pattern","text_replacement":{"type":"replacement_string","replacement_string":"REDACTED","should_save_match":true},"tags":["sensitive_data:true"],"is_enabled":true,"priority":1},"relationships":{"group":{"data":{"type":"{{ group.data.type }}","id":"{{ group.data.id }}"}}}}}
59
+
When the request is sent
60
+
Then the response status is 200 OK
61
+
And the response "data.type" is equal to "sensitive_data_scanner_rule"
62
+
And the response "data.attributes.name" is equal to "{{ unique }}"
0 commit comments