← 返回
未分类 中文

Privacy Shield

Manages sensitive data access by marking resources with privacy levels and enforcing share, export, and usage restrictions based on a centralized registry.
通过为资源标记隐私等级并在集中注册表中强制执行共享、导出和使用限制来管理敏感数据的访问。
xiaobu2020
未分类 clawhub v1.0.1 1 版本 100000 Key: 无需
★ 0
Stars
📥 490
下载
💾 0
安装
1
版本
#latest

概述

Privacy Shield

Privacy data marking system — unified sensitive resource management with pre-operation checks and audit logging.

Design Principles

  • Conservative by default: Unmarked data should be handled with caution
  • Check before act: Verify privacy level before any data operation
  • Centralized control: One registry file governs all privacy rules

Privacy Levels

LevelMeaningExample
-------------------------
owner_onlyOwner can view/use onlyPhotos, personal info
privateNo external disclosure, internal use OKModel info, API keys
no_exportMust not leave the machineMemory files, ontology
publicFree to useNon-sensitive data

Quick Start

Mark a resource

# Mark a file or directory
python scripts/registry.py mark media/images/people/ --level owner_only --reason "Family photos"

# Mark a rule category
python scripts/registry.py mark --type rule "model_info" --level private --reason "Infrastructure"

Check permission

# Check if a resource can be shared
python scripts/registry.py check media/images/people/photo.jpg --action share

# Check privacy level only
python scripts/registry.py check media/images/people/photo.jpg

List all marks

python scripts/registry.py list
python scripts/registry.py list --level owner_only

Remove a mark

python scripts/registry.py unmark media/images/old-photo.jpg

View audit log

python scripts/registry.py audit
python scripts/registry.py audit --deny-only

Agent Integration

Before any data output operation:

  1. Check registrypython scripts/registry.py check --action
  2. Evaluate result:
    • owner_only → Output only when owner requests
    • private → No external disclosure, internal processing OK
    • no_export → Never leave this machine
    • Unmarked → Default to caution, ask the owner

Registry File

Location: data/privacy-registry.json

{
  "version": "1.0.0",
  "rules": {
    "photos": {"level": "owner_only", "reason": "Family photos"},
    "model_info": {"level": "private", "reason": "Infrastructure"}
  },
  "resources": [
    {
      "path": "media/images/people/",
      "level": "owner_only",
      "reason": "Family photos",
      "marked_at": "2026-03-20T09:53:00+08:00"
    }
  ]
}

Features

  • ✅ Path prefix + glob pattern matching
  • ✅ Automatic audit logging (JSONL)
  • ✅ Integration with image-manager (--privacy flag)
  • ✅ CLI for mark/check/list/unmark/audit

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-03-30 21:58 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Agent Behavioral Constitution

xiaobu2020
强制执行AI行为准则,确保安全性、隐私保护、诚实性、可追溯性、风险感知行动、主动自我改进及可问责的决策日志记录。
★ 0 📥 482

Image Manager

xiaobu2020
按类别管理本地图片,存储原图和缩略图,通过JSON索引实现标签、日期和关键词的快速搜索。
★ 1 📥 457

Conversation Saver

xiaobu2020
自动从对话历史中提取关键信息并保存到本地记忆文件。后台静默运行,采用规则+LLM混合提取。
★ 0 📥 383