用于检测和掩蔽机密信息的工具
项目描述
Microsoft Security Utilities - Secret Masker
microsoft-security-utilities-secret-masker是Microsoft Security Utilities内部使用的一部分。您可以在此处找到相关的.NET SDK软件包。此Secret Masker Python库专注于
提供一些内置的json格式的检测规则
检测给定输入的敏感数据
对给定输入的敏感数据进行简单的符号或sha256哈希掩蔽
安装
您可以通过pip安装此软件包
pip install microsoft-security-utilities-secret-masker
用法
您可以使用SecretMasker类来检测和掩蔽您的输入中的敏感数据。以下是一个示例
from microsoft_security_utilities_secret_masker import SecretMasker, load_regex_patterns_from_json_file
# Load built-in detection rules
precisely_classified_regex_patterns = load_regex_patterns_from_json_file('PreciselyClassifiedSecurityKeys.json')
unclassified_regex_patterns = load_regex_patterns_from_json_file('UnclassifiedPotentialSecurityKeys.json')
# construct secret masker with chosen patterns
regex_patterns = precisely_classified_regex_patterns.union(unclassified_regex_patterns)
secret_masker = SecretMasker(regex_patterns)
input = "This is a sample input with no secrets"
detected_secrets = secret_masker.detect_secrets(input)
processed_input = secret_masker.mask_secrets(input)
许可证
Microsoft Security Utilities - Secret Masker (secret-masker) Copyright (c) Microsoft Corporation All rights reserved. MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.::
发布历史
1.0.0b3
小修复
1.0.0b2
采用置信度级别模式
1.0.0b1
首次发布
关闭
microsoft_security_utilities_secret_masker-1.0.0b3.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | d04548230c67a3bd2cb460b28e71fe6cac168f48f06d76a969d9ca47bdf67343 |
|
MD5 | 6e19aeeb4540f7d44428846c8db55fcc |
|
BLAKE2b-256 | ced306730675783ff775af413153b7ea534931bba9d45687d3268eb9f313f2bc |
关闭
microsoft_security_utilities_secret_masker-1.0.0b3-py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | e7c6157f798d9f1a94fc979f963a27581f948d38ad8b2fb2bbd8e1a7d4bcd3b9 |
|
MD5 | 5e055e0da81a9876d0575f569f41bb5c |
|
BLAKE2b-256 | b66fdfa2a2fdba983f03b7189c26a2c4d36bc260fa4b494aa0b6d943e4aa7c97 |