Microsoft Security Utilities - Secret Masker
microsoft-security-utilities-secret-masker is part of the Microsoft Security Utilities used internally. You can find the related .NET SDK package here. This Secret Masker Python library focuses on:
providing some built-in detection rules in json format
detecting sensitive data for given input
masking sensitive data with simple symbols or sha256 hash for given input
Installation
You can install the package via pip:
pip install microsoft-security-utilities-secret-masker
Usage
You can use the SecretMasker class to detect and mask sensitive data in your input. Here is an example:
from microsoft_security_utilities_secret_masker import SecretMasker, load_regex_patterns_from_json_file
precisely_classified_regex_patterns = load_regex_patterns_from_json_file(PreciselyClassifiedSecurityKeys.json )
unclassified_regex_patterns = load_regex_patterns_from_json_file(UnclassifiedPotentialSecurityKeys.json )
|