mitools-desensitize

v1.0.0

数据脱敏工具,支持手机号、身份证、银行卡、邮箱、IP地址、中文姓名等多种敏感信息脱敏

0· 137·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for bianchengyy/mitools-desensitize.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "mitools-desensitize" (bianchengyy/mitools-desensitize) from ClawHub.
Skill page: https://clawhub.ai/bianchengyy/mitools-desensitize
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install mitools-desensitize

ClawHub CLI

Package manager switcher

npx clawhub@latest install mitools-desensitize
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description (data desensitization) match the provided code and tool definitions. The declared tools call the included Python script and the script implements the rules advertised (phone, idcard, bankcard, email, name, IP, path username, digit sequences, wildcard, restore).
Instruction Scope
SKILL.md describes text/file operations and listing/restoring rules; the implementation performs only local text transformations and reads/writes a local config file. The instructions do not ask the agent to read unrelated system files, use external endpoints, or access environment credentials.
Install Mechanism
There is no install spec (instruction-only), but the skill includes a Python script that will be executed from the user's ~/.workbuddy/skills/... path. This is expected for a code-backed skill; no external downloads or package installs are performed.
Credentials
The skill requests no environment variables, no credentials, and no config paths outside its own per-user directory (~/.workbuddy/skills/mitools-desensitize/desensitize_config.json). The config file location and content are proportional to the stated functionality.
Persistence & Privilege
always is false and the skill does not request elevated or cross-skill privileges. It creates and updates its own config in the user's home directory but does not modify other skills or system-wide settings.
Assessment
This skill appears to do only local, offline text/file masking and stores its configuration under ~/.workbuddy/skills/mitools-desensitize/desensitize_config.json. If you plan to install it: (1) review the included desensitize.py if you want to audit exact masking behavior and any custom-rule regexes; (2) be aware it will create/update a config file in your home directory; (3) check and sanitize any custom_rules in that config before using on sensitive data (malformed regexes could cause unexpected replacements); (4) no network requests or credential access were found, but because the skill runs Python code on your machine you should only install code from sources you trust.

Like a lobster shell, security has layers — review code before you run it.

latestvk970e0f2yegb49mde4816vv3sx83b11e
137downloads
0stars
1versions
Updated 1mo ago
v1.0.0
MIT-0

数据脱敏工具 (mitools-desensitize)

基于正则表达式的数据脱敏工具,支持多种敏感信息类型的自动识别和脱敏处理。

功能特性

  • 📱 手机号脱敏 - 保留前3位和后3位,中间用*号替代
  • 🆔 身份证号脱敏 - 保留前3位和后3位,中间用*号替代
  • 💳 银行卡脱敏 - 保留前2位,其余用*号替代
  • 📧 邮箱脱敏 - 保留前2位,后面用***替代
  • 👤 中文姓名脱敏 - 保留姓氏,后面用**替代
  • 🌐 IP地址脱敏 - 替换为伪IP地址(139.1.2.xxx)
  • 📁 路径用户名脱敏 - 替换路径中的用户名为demo01/demo02等
  • 🔢 长串数字脱敏 - 6位以上连续数字替换为等长伪数字
  • 📝 字段名脱敏 - 敏感字段名首字保留,后面用**替代
  • 🔄 通配符规则 - 支持自定义通配符替换规则
  • ↩️ 数据还原 - 支持根据映射表还原脱敏数据

使用方法

1. 对文本进行脱敏

脱敏 <文本内容>

示例:

脱敏 张三的手机号是13812345678,邮箱是zhangsan@example.com

2. 对文件进行脱敏

脱敏文件 <文件路径>

示例:

脱敏文件 ./user_data.log

3. 根据映射还原数据

脱敏还原 <脱敏后文本> <映射JSON>

示例:

脱敏还原 "张**的手机号是138*****678" '{"username": {"张三": "demo01"}}'

4. 查看支持的脱敏规则

脱敏规则列表

支持的脱敏规则

规则名称说明示例
phone手机号脱敏13812345678 → 138*****678
idcard身份证号脱敏110101199001011234 → 110******234
bankcard银行卡脱敏6222021234567890123 → 62** **** **** **** ***
email邮箱脱敏zhangsan@example.com → zh***@***.com
chinese_name中文姓名脱敏张三 → 张**
ipIP地址脱敏192.168.1.1 → 139.1.2.100
path_user路径用户名脱敏/home/zhangsan → /home/demo01
digit_sequence长串数字脱敏1234567890 → 0000000001
chinese_field字段名脱敏手机号 → 手**
wildcard通配符规则dev*23 → dev31

配置文件

工具会自动生成 desensitize_config.json 配置文件,包含:

  • levels: 脱敏级别配置,定义应用哪些规则
  • wildcard_rules: 通配符替换规则
  • custom_rules: 自定义正则规则

使用场景

  • 日志脱敏 - 清理生产环境日志中的敏感信息
  • 数据分享 - 脱敏后分享给第三方
  • 测试数据 - 生成脱敏的测试数据集
  • 文档处理 - 清理文档中的敏感信息

Comments

Loading comments...