Offline sensitive-data detection, redaction, JSON and streaming pipelines for MoonBit applications.
pub(all) struct BatchResult {
lines : Array[String]
summary : BatchSummary
changed_indices : Array[Int]
} derive(Eq, Debug)pub(all) struct BatchSummary {
lines : Int
changed_lines : Int
findings : Int
access_tokens : Int
bearer_tokens : Int
jwts : Int
credentials : Int
emails : Int
ipv4s : Int
payment_cards : Int
private_keys : Int
url_credentials : Int
custom_secrets : Int
resident_ids : Int
mac_addresses : Int
uuids : Int
ipv6s : Int
phones : Int
public_keys : Int
wallet_addresses : Int
webhook_urls : Int
} derive(Eq, Debug)type ChunkScannerpub(all) struct Finding {
kind : SensitiveKind
start : Int
end : Int
confidence : Confidence
} derive(Eq, Debug)pub(all) struct JsonRedactionResult {
text : String
changed_fields : Int
findings : Array[JsonFinding]
parsed : Bool
} derive(Eq, Debug)pub(all) struct ScanConfig {
detect_access_token : Bool
detect_bearer : Bool
detect_jwt : Bool
detect_private_key : Bool
detect_url_credential : Bool
detect_assignment : Bool
detect_email : Bool
detect_ipv4 : Bool
detect_payment_card : Bool
detect_resident_id : Bool
detect_webhook : Bool
detect_wallet : Bool
detect_public_key : Bool
detect_phone : Bool
detect_ipv6 : Bool
detect_uuid : Bool
detect_mac : Bool
suppress_version_ipv4 : Bool
require_known_card_prefix : Bool
suppress_example_domains : Bool
extra_prefixes : Array[TokenPrefixRule]
} derive(Eq, Debug)pub(all) struct StructuredResult {
fields : Array[StructuredFieldResult]
changed_fields : Int
findings : Int
} derive(Eq, Debug)fn redact_batch(lines : Array[String], style? : RedactionStyle, policy? : ScanPolicy) -> BatchResultfn redact_batch_with_config(lines : Array[String], config : ScanConfig, style? : RedactionStyle) -> BatchResultfn redact_except(text : String, keep : Array[String], style? : RedactionStyle, config? : ScanConfig) -> RedactionResultfn redact_fields(fields : Array[StructuredField], style? : RedactionStyle, policy? : ScanPolicy) -> StructuredResultfn redact_fields_with_config(fields : Array[StructuredField], config : ScanConfig, style? : RedactionStyle) -> StructuredResultfn redact_full(text : String, rules : Array[CustomRule], config : ScanConfig, style? : RedactionStyle) -> RedactionResultfn redact_json_with_rules(text : String, rules : Array[CustomRule], config? : ScanConfig, style? : RedactionStyle) -> JsonRedactionResultfn redact_with_config(text : String, config : ScanConfig, style? : RedactionStyle) -> RedactionResultfn redact_with_rules(text : String, rules : Array[CustomRule], style? : RedactionStyle, policy? : ScanPolicy) -> RedactionResultfn scan_with_rules(text : String, rules : Array[CustomRule], policy? : ScanPolicy) -> Array[Finding]Install
Download zipOffline sensitive-data detection, redaction, JSON and streaming pipelines for MoonBit applications.