From d52a2068bd6389c8a266f32c4973848cedef9b7d Mon Sep 17 00:00:00 2001 From: Abdulla Abdurakhmanov Date: Sun, 4 Aug 2024 21:50:36 +0200 Subject: [PATCH] Docs update --- README.md | 3 +++ src/args.rs | 4 +--- src/redacters/mod.rs | 4 +++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 500a014..e635fab 100644 --- a/README.md +++ b/README.md @@ -134,6 +134,9 @@ and/or by size: - The accuracy of redaction depends on the DLP model, so don't rely on it as the only security measure. - The tool was mostly design to redact files internally. Not recommended use it in public environments without proper security measures and manual review. +- Integrity of the files is not guaranteed due to DLP implementation specifics. Some of the formats such as + HTML/XML/JSON + may be corrupted after redaction since they treated as text. - Use it at your own risk. The author is not responsible for any data loss or security breaches. ## Licence diff --git a/src/args.rs b/src/args.rs index cecc9e1..251dce3 100644 --- a/src/args.rs +++ b/src/args.rs @@ -112,9 +112,7 @@ impl TryInto for RedacterArgs { }, Some(RedacterType::AwsComprehendDlp) => Ok(RedacterProviderOptions::AwsComprehendDlp( crate::redacters::AwsComprehendDlpRedacterOptions { - region: self - .aws_region - .map(|region_str| aws_config::Region::new(region_str)), + region: self.aws_region.map(aws_config::Region::new), }, )), None => Err(AppError::RedacterConfigError { diff --git a/src/redacters/mod.rs b/src/redacters/mod.rs index 7049630..beae5bd 100644 --- a/src/redacters/mod.rs +++ b/src/redacters/mod.rs @@ -91,7 +91,9 @@ impl<'a> Redacters<'a> { && (mime.subtype() == mime::PLAIN || mime.subtype() == mime::HTML || mime.subtype() == mime::XML - || mime.subtype() == mime::CSS)) + || mime.subtype() == mime::CSS + || mime.subtype() == "x-yaml" + || mime.subtype() == "yaml")) || (mime.type_() == mime::APPLICATION && (mime.subtype() == mime::XML || mime.subtype() == mime::JSON