Class: StandardAudit::SensitiveKeysDryRun::Report
- Inherits:
-
Struct
- Object
- Struct
- StandardAudit::SensitiveKeysDryRun::Report
- Defined in:
- lib/standard_audit/sensitive_keys_dry_run.rb
Overview
[rows_scanned] how many audit rows were read
[stripped] key path => row count, for keys the candidate rule
would redact
[kept] key path => row count, for keys it would keep
[nested_unfiltered] key path => row count, for nested keys the rule
matches but which are NOT redacted because
filter_nested_metadata is off. This is the
exposure filter_nested_metadata exists to close;
empty when nested filtering is enabled.
Instance Attribute Summary collapse
-
#kept ⇒ Object
Returns the value of attribute kept.
-
#nested ⇒ Object
Returns the value of attribute nested.
-
#nested_unfiltered ⇒ Object
Returns the value of attribute nested_unfiltered.
-
#rows_scanned ⇒ Object
Returns the value of attribute rows_scanned.
-
#stripped ⇒ Object
Returns the value of attribute stripped.
Instance Method Summary collapse
Instance Attribute Details
#kept ⇒ Object
Returns the value of attribute kept
30 31 32 |
# File 'lib/standard_audit/sensitive_keys_dry_run.rb', line 30 def kept @kept end |
#nested ⇒ Object
Returns the value of attribute nested
30 31 32 |
# File 'lib/standard_audit/sensitive_keys_dry_run.rb', line 30 def nested @nested end |
#nested_unfiltered ⇒ Object
Returns the value of attribute nested_unfiltered
30 31 32 |
# File 'lib/standard_audit/sensitive_keys_dry_run.rb', line 30 def nested_unfiltered @nested_unfiltered end |
#rows_scanned ⇒ Object
Returns the value of attribute rows_scanned
30 31 32 |
# File 'lib/standard_audit/sensitive_keys_dry_run.rb', line 30 def rows_scanned @rows_scanned end |
#stripped ⇒ Object
Returns the value of attribute stripped
30 31 32 |
# File 'lib/standard_audit/sensitive_keys_dry_run.rb', line 30 def stripped @stripped end |
Instance Method Details
#any_stripped? ⇒ Boolean
31 32 33 |
# File 'lib/standard_audit/sensitive_keys_dry_run.rb', line 31 def any_stripped? stripped.any? end |
#to_s ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/standard_audit/sensitive_keys_dry_run.rb', line 35 def to_s lines = [] lines << "Rows scanned: #{rows_scanned}" lines << "Nested filtering: #{nested ? 'on' : 'off'}" lines << "" lines << section("WOULD BE STRIPPED", stripped, "Nothing would be stripped.") lines << "" lines << section("KEPT", kept, "No metadata keys found.") if nested_unfiltered.any? lines << "" lines << section( "MATCHES BUT NOT STRIPPED (nested; set config.filter_nested_metadata = true to redact)", nested_unfiltered, nil ) end lines.join("\n") end |