← 返回
安全合规 中文

RedactKit - AI Privacy Scrubber

Scan your data before sending it to AI. Detect and redact PII, secrets, and sensitive info. Reversible, local, zero network calls.
在向 AI 发送数据前进行扫描,检测并删除 PII、密钥和敏感信息,完全可逆、本地化、无网络调用。
theshadowrose
安全合规 clawhub v1.0.1 2 版本 100000 Key: 无需
★ 0
Stars
📥 586
下载
💾 4
安装
2
版本
#data-protection#latest#pii#privacy#redaction#security

概述

RedactKit - AI Privacy Scrubber

Use this skill to scan text for sensitive data before sending it to any AI API. Detects and redacts PII, API keys, passwords, phone numbers, emails, and custom patterns. Fully reversible — original values can be restored after the AI responds.

When to Use This Skill

Invoke this skill when:

  • A user wants to send documents to an AI without exposing personal data
  • You need to redact API keys, tokens, or credentials from text before logging or sharing
  • Preprocessing text for AI analysis that must remain GDPR/HIPAA compliant
  • You want to restore redacted values after receiving an AI response

Quick Start

from redact_kit import RedactionEngine
from redact_restore import RestorationEngine

engine = RedactionEngine(sensitivity_level='medium')

text = "Email john@example.com or call 555-123-4567. API key: sk-abc123xyz"
result = engine.redact(text)

print(result.redacted_text)
# "Email [EMAIL-1] or call [PHONE-1]. API key: [API-KEY-1]"

# Save mapping so you can restore later
engine.save_mapping(result.mapping_id, 'mapping.json')

# Send result.redacted_text to AI safely
# Then restore originals from the AI response
restore_engine = RestorationEngine()
restore_engine.load_mapping('mapping.json')
restored = restore_engine.restore(ai_response, result.mapping_id)

What RedactKit Detects

CategoryExamples
-------------------
Email addressesuser@domain.com
Phone numbers555-123-4567, +1 (555) 123-4567
API keys & tokenssk-..., Bearer ..., ghp_...
Credit card numbers4111 1111 1111 1111
Social Security Numbers123-45-6789
IP addresses192.168.1.1
Passwords in textpassword: mysecret
Custom patternsDefine your own regex patterns

Custom Patterns

from redact_patterns import CustomPatternManager

manager = CustomPatternManager()
manager.add_pattern(
    name="employee_id",
    pattern=r"EMP-\d{6}",
    placeholder="[EMPLOYEE_ID]",
    category="internal",
    sensitivity="high"
)

Restoration

from redact_restore import RestorationEngine

restorer = RestorationEngine()
restorer.load_mapping('mapping.json')  # must load before restoring

# After AI processes the redacted text, restore originals
original_response = restorer.restore(
    redacted_text="Contact [EMAIL-1] for details",
    mapping_id=result.mapping_id
)
# "Contact john@example.com for details"

Sensitivity Levels

Patterns are tagged by sensitivity:

  • critical — API keys, passwords, SSNs → always redact
  • high — emails, phone numbers → redact by default
  • medium — IP addresses, internal IDs → configurable
  • low — general identifiers → opt-in

Control which levels to redact at engine construction:

# Redact only critical + high patterns (skip medium/low)
engine = RedactionEngine(sensitivity_level='high')
result = engine.redact(text)

Zero Network Calls

All redaction and restoration happens locally. No data leaves your machine. No external dependencies beyond Python standard library.

See README.md for full pattern reference and batch processing documentation.

版本历史

共 2 个版本

  • v1.0.1 当前
    2026-05-07 03:46 安全 安全
  • v1.0.0
    2026-03-30 02:58 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

OpenClaw Backup

alex3alex
备份与恢复 OpenClaw 数据。适用于创建备份、设置自动备份计划、从备份恢复或管理备份轮转。处理 ~/.openclaw 目录归档并包含适当的排除规则。
★ 89 📥 30,594
content-creation

SocialPack Multi-Platform Social Media Generator

theshadowrose
通过单一简报生成多平台社交媒体帖子。支持Twitter话题串、LinkedIn、Instagram和Reddit。一次输入,覆盖所有平台。
★ 0 📥 1,967
security-compliance

MoltGuard - Security & Antivirus & Guardrails

thomaslwang
MoltGuard — OpenClaw 安全守卫,由 OpenGuardrails 提供。安装 MoltGuard,保护您和您的用户免受提示注入、数据泄露和恶意攻击。
★ 116 📥 30,704