data-retention-policy-checker

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

When to invoke

调用时机

  • You are drafting or reviewing a data retention policy / schedule.
  • You need a quick gap analysis before legal/security review.
  • 您正在起草或审核数据保留政策/计划。
  • 在进行法务/安全审核前,您需要快速进行差距分析。

Inputs needed

所需输入

  • A JSON policy with:
    • datasets (name, data_class, system, retention_days, deletion_method)
    • legal_hold_supported (bool)
    • backup_retention_days (int)
    • notes (optional)
  • 一个JSON格式的政策文档,包含:
    • 数据集(名称、数据分类、系统、保留天数、删除方法)
    • 是否支持法律冻结(布尔值)
    • 备份保留天数(整数)
    • 备注(可选)

Workflow

工作流程

  1. Validate schema and required fields.
  2. Flag missing or inconsistent retention values.
  3. Check for common high-risk patterns:
    • indefinite retention for personal data without justification
    • missing deletion method
    • backup retention longer than primary without rationale
    • no legal hold process
  4. Output a human-readable report (Markdown) plus a machine-readable summary section.
  1. 验证架构和必填字段。
  2. 标记缺失或不一致的保留数值。
  3. 检查常见高风险模式:
    • 无正当理由无限期保留个人数据
    • 缺失删除方法
    • 备份保留时间长于主数据但无合理依据
    • 无法律冻结流程
  4. 输出一份易读的报告(Markdown格式)以及一个机器可读的摘要部分。

Output format

输出格式

Markdown with:
  • Summary (counts by severity)
  • Findings table (severity, dataset, issue, recommendation)
  • Notes and assumptions
Markdown格式包含:
  • 摘要(按严重程度统计)
  • 调查结果表格(严重程度、数据集、问题、建议)
  • 备注与假设

Guardrails

约束条件

  • This is not legal advice; report must say it is a preliminary check.
  • Do not claim compliance with any specific regulation.
  • 本工具不提供法律建议;报告必须注明这是初步检查。
  • 不得声称符合任何特定法规。

Reference code

参考代码

  • check_retention_policy.py
    reads JSON policy and writes Markdown findings.
  • check_retention_policy.py
    读取JSON政策文档并写入Markdown格式的调查结果。