Privacy Check

隐私敏感信息扫描器 (Privacy Check) v1.0.1。 检测15+种敏感个人信息:身份证号、手机号、邮箱、银行卡、信用卡、 SSN、护照、驾驶证、微信号、支付宝号、API密钥等。 支持 JSON/CSV/HTML 报告输出、白名单忽略、文件类型过滤。 Use when: 需要在数据文件中发现敏感信息、 数据发布前做隐私审查、合规检查准备、数据脱…

ChengQian

@cqdev-ai

What This Skill Does

Scans text files for 15+ types of sensitive personal information (PII) including Chinese ID numbers, phone numbers, emails, bank cards, SSNs, passports, API keys, and more. Supports single file or recursive directory scanning with JSON, CSV, or HTML report output, plus ASCII bar chart summaries.

Replaces manual privacy reviews and ad-hoc regex scripts by automatically detecting a broad range of PII patterns across files and generating structured compliance reports.

When to Use It

  • Scan a CSV file for exposed Chinese ID numbers before sharing it externally
  • Generate an HTML privacy audit report for a directory of log files
  • Identify API keys and email addresses in a codebase before open-sourcing
  • Filter out false positives by adding known safe patterns to a whitelist
  • Check a batch of JSON files for credit card numbers and SSNs during data migration
  • Pre-process a dataset by detecting and masking PII before handing it to a third party

Install

$ openclaw skills install @cqdev-ai/privacy-check

🔍 Privacy Check v1.0.1

Overview

扫描文件中的敏感个人信息。支持单个文件或整个目录递归扫描,输出结构化的 JSON/CSV/HTML 报告,并通过 ASCII 条形图展示类型分布。

Usage

# 扫描单个文件
python3 scripts/scanner.py --file data.csv

# 扫描目录
python3 scripts/scanner.py --dir ./data/

# HTML 报告
python3 scripts/scanner.py --dir ./data/ --format html --output report.html

# 忽略注释行 + 只扫描 txt/csv
python3 scripts/scanner.py --dir ./data/ --ignore "^#" --ext .txt,.csv

Supported Patterns (15+)

类型示例(脱敏后)严重级别
中国大陆身份证号1101**********1234
中国大陆手机号138****1234
电子邮件地址usa****@example.com
银行卡号(Luhn)6222**********1234
信用卡号(Luhn)4111**********1111
美国社会安全号(SSN)*--1234
中国护照号E1****34
港澳护照号AB****78
台湾护照号12****89
中国大陆驾驶证号1101************99
微信号zh****en
支付宝账号usa****@...
IP地址192.**..*
邮政编码100***
API密钥sk-...****abcd

Output Formats

JSON (默认) — 结构化数据供程序处理:

{"scan_time": "...", "total_findings": 42, "by_type": {"china_id": 5, ...}}

CSV (--format csv) — 扁平表格,每行一条发现:

file,line,type,description,severity,match
data.csv,128,china_id,中国大陆身份证号,高,1101**********1234

HTML (--format html) — 带样式、摘要卡片和条形图的可视化页面。

ASCII 条形图摘要

v1.0.1 终端输出包含类型分布图:

████████████████████ 中国大陆身份证号: 15
████████████ 邮箱: 8
██████ 手机号: 4

Legal

本工具仅辅助检测,不能替代专业合规审计。检测结果可能存在漏报或误报,使用者应自行核实。

Security

  • ✅ 纯本地运行,无网络请求
  • ✅ 仅读取用户指定的文件
  • ✅ 检测结果脱敏显示,不泄露原始数据
  • ❌ 无任意代码执行(无 exec/eval)
  • ❌ 无系统命令执行(无 subprocess/shell)

Top skills in this category