数据匿名化合规与效果评估
anonymization-alternative
依据 GDPR 鉴于条款 26(Recital 26)评估匿名化作为数据保留替代方案的可行性,应用 WP29 第 05/2014 号意见中的技术(包括随机化和泛化)。使用 k-anonymity、l-diversity 和 t-closeness 指标验证匿名化有效性。适用于匿名化、去标识化、k-anonymity、保留替代方案相关查询。
- License 许可
- Apache-2.0
- 最近更新
- 2026-03-17
- Stars
- ★ 338
- Forks
- 68
01 前言 Front Matter
- name
- anonymization-alternative
- license
- Apache-2.0
- metadata
- { "tags": "anonymization, de-identification, k-anonymity, wp29-opinion, recital-26", "author": "mukul975", "domain": "privacy", "version": "1.0", "subdomain": "data-retention-deletion" }
- description
- Evaluates anonymization as a retention alternative under GDPR Recital 26, applying the WP29 Opinion 05/2014 techniques including randomization and generalization. Validates anonymization effectiveness using k-anonymity, l-diversity, and t-closeness metrics. Activate for anonymization, de-identification, k-anonymity, retention alternative queries.
02 资源文件 16
- 参考文档agents/openai.yaml237 B
- 资产文件assets/template.md2.1 KB
- 许可证LICENSE.txt10.5 KB
- 参考文档references/golang-general-backend-security.md37.8 KB
- 参考文档references/javascript-express-web-server-security.md48.2 KB
- 参考文档references/javascript-general-web-frontend-security.md37.7 KB
- 参考文档references/javascript-jquery-web-frontend-security.md32.8 KB
- 参考文档references/javascript-typescript-nextjs-web-server-security.md42.4 KB
- 参考文档references/javascript-typescript-react-web-frontend-security.md40.7 KB
- 参考文档references/javascript-typescript-vue-web-frontend-security.md30.7 KB
- 参考文档references/python-django-web-server-security.md37.8 KB
- 参考文档references/python-fastapi-web-server-security.md43.9 KB
- 参考文档references/python-flask-web-server-security.md31.0 KB
- 参考文档references/standards.md3.2 KB
- 参考文档references/workflows.md3.4 KB
- 脚本scripts/process.py11.8 KB
03 SKILL.md 正文
Anonymization as Retention Alternative
Overview
Anonymization transforms personal data into a form that no longer identifies or can reasonably be used to identify a natural person. Under GDPR Recital 26, truly anonymized data falls outside the scope of the regulation, meaning it can be retained indefinitely without a legal basis, without data subject rights applying, and without counting toward retention period obligations. However, achieving genuine anonymization — as opposed to mere pseudonymization — requires rigorous application of techniques validated against re-identification risk. This skill provides the assessment framework, implementation techniques, and validation methods for using anonymization as an alternative to deletion when retention of aggregate or statistical data serves a legitimate purpose.
Legal Foundation
GDPR Recital 26 — Anonymized Data Outside GDPR Scope
"The principles of data protection should therefore not apply to anonymous information, namely information which does not relate to an identified or identifiable natural person or to personal data rendered anonymous in such a manner that the data subject is not or no longer identifiable. This Regulation does not therefore concern the processing of such anonymous information, including for statistical or research purposes."
The critical test: whether the data subject is identifiable, taking into account "all the means reasonably likely to be used" either by the controller or "any other person" to identify the natural person.
Article 29 Working Party Opinion 05/2014 on Anonymization Techniques (WP216)
Adopted 10 April 2014, this Opinion establishes that effective anonymization must prevent:
- Singling out: Isolating some or all records which identify an individual in the dataset.
- Linkability: Linking at least two records concerning the same data subject (within the same dataset or between two separate datasets).
- Inference: Deducing, with significant probability, the value of an attribute from the values of a set of other attributes.
The Opinion evaluates randomization and generalization techniques against these three risks.
ICO Anonymization Code of Practice (Updated Guidance)
The ICO provides guidance on anonymization, emphasizing the "motivated intruder" test: could a reasonably competent person with access to resources such as the internet, public libraries, and public records re-identify individuals in the dataset?
Anonymization vs. Pseudonymization
| Characteristic | Anonymization | Pseudonymization |
|---|---|---|
| GDPR status | Outside GDPR scope (Recital 26) | Still personal data (Art. 4(5)) |
| Reversibility | Irreversible — no means to re-identify | Reversible — additional information can re-identify |
| Retention | Can be retained indefinitely | Subject to retention schedule |
| Data subject rights | Do not apply | Fully apply |
| Legal basis | Not required | Required |
| Risk of failure | If anonymization is broken, data reverts to personal data status retroactively | N/A — always personal data |
| Technique | Randomization, generalization, suppression, data masking (irreversible) | Tokenization, encryption, key-based substitution (reversible) |
WP29 Anonymization Techniques
Technique 1: Randomization
Randomization alters the truthfulness of data to break the link between the data and the individual:
| Method | Description | Singling Out | Linkability | Inference | Suitability |
|---|---|---|---|---|---|
| Noise addition | Add random noise to numerical values (e.g., age ± 3 years, salary ± 5%) | Partially mitigates | Partially mitigates | Mitigates | Statistical analysis where exact values are not critical |
| Permutation | Shuffle attribute values within a dataset so that values are no longer linked to the correct record | Partially mitigates | Mitigates | Partially mitigates | Datasets where attribute distributions must be preserved but linkages broken |
| Differential privacy | Add calibrated noise to query results ensuring that the inclusion/exclusion of any single record does not significantly change the output | Mitigates | Mitigates | Mitigates | Aggregate analytics, machine learning training data |
Technique 2: Generalization
Generalization reduces the granularity of data to prevent identification:
| Method | Description | Singling Out | Linkability | Inference | Suitability |
|---|---|---|---|---|---|
| Aggregation | Replace individual values with aggregate statistics (mean, median, count) | Mitigates | Mitigates | Partially mitigates | Reporting, trend analysis |
| K-anonymity | Ensure that each combination of quasi-identifiers appears in at least k records | Mitigates (if k sufficiently large) | Partially mitigates | Does not mitigate | Releasing microdata for research |
| L-diversity | Ensure that within each equivalence class (k-anonymity group), there are at least l distinct values for sensitive attributes | Mitigates | Partially mitigates | Partially mitigates | Datasets with sensitive attributes |
| T-closeness | Ensure that the distribution of sensitive attributes within each equivalence class is close to the overall distribution (distance ≤ t) | Mitigates | Partially mitigates | Mitigates | Datasets where attribute distribution is sensitive |
| Top/bottom coding | Replace extreme values with threshold values (e.g., age >90 becomes "90+") | Partially mitigates | Partially mitigates | Partially mitigates | Protecting outliers in numerical data |
| Data masking | Irreversibly replace characters (e.g., postcode "SW1A 1AA" → "SW1A ***") | Mitigates (for masked fields) | Partially mitigates | Partially mitigates | Reducing granularity of quasi-identifiers |
Technique 3: Suppression
| Method | Description | Effectiveness |
|---|---|---|
| Record suppression | Remove entire records that are unique or quasi-unique | Eliminates singling out for suppressed records |
| Attribute suppression | Remove entire columns that serve as identifiers or quasi-identifiers | Eliminates linkability via suppressed attributes |
| Cell suppression | Replace specific cell values with null where those values contribute to re-identification risk | Targeted mitigation of singling out |
Anonymization Assessment Workflow
Step 1: Determine Whether Anonymization is Appropriate
[Data Approaching Retention Expiry]
│
▼
[Is there a legitimate purpose for retaining the data in anonymized form?]
│
├── Statistical analysis / reporting ──► Proceed
├── Research purposes (Art. 89) ──► Proceed
├── Training ML models ──► Proceed (with separate legal basis assessment)
├── Historical archiving ──► Proceed
├── No legitimate purpose ──► DELETE (do not anonymize for no reason)
│
▼
[Can the purpose be achieved with anonymized data?]
│
├── Yes ──► Proceed to anonymization
└── No ──► Consider pseudonymization with extended retention (separate assessment)
Step 2: Select Anonymization Technique
Based on the data type and intended use:
| Data Type | Recommended Primary Technique | Secondary Technique | Validation Method |
|---|---|---|---|
| Structured numerical (age, salary, amounts) | Generalization (aggregation) + noise addition | Top/bottom coding for outliers | K-anonymity (k ≥ 5) |
| Structured categorical (gender, region, job title) | Generalization (hierarchy-based) + suppression of rare values | Permutation | L-diversity (l ≥ 3) |
| Free text (support tickets, notes) | Full suppression of personal identifiers + generalization of quasi-identifiers | Named entity removal + text generalization | Manual review sample + automated NER validation |
| Transactional (purchase history, usage logs) | Aggregation to cohort level + noise addition | Temporal generalization (day → week → month) | T-closeness (t ≤ 0.15) + k-anonymity (k ≥ 10) |
| Location data | Spatial generalization (precise coordinates → region/city) | Cloaking (minimum area containing k individuals) | K-anonymity (k ≥ 20 for location) |
Step 3: Implement Anonymization
For Orion Data Vault Corp, the standard anonymization pipeline is:
[Source Data — Personal Data Under Retention]
│
▼
[Step 1: Identifier Removal]
- Remove all direct identifiers: name, email, phone, address, NI number,
account number, IP address, device ID
- Remove any unique IDs that could be cross-referenced with other datasets
│
▼
[Step 2: Quasi-Identifier Generalization]
- Age: Generalize to 10-year bands (18-27, 28-37, 38-47, ...)
- Postcode: Truncate to outward code only (SW1A 1AA → SW1A)
- Date of birth: Remove — use age band only
- Job title: Generalize to job function category
- Transaction date: Generalize to month-year
│
▼
[Step 3: Apply K-Anonymity]
- Ensure each combination of quasi-identifiers appears in ≥ k records
- Target: k ≥ 5 for standard data; k ≥ 10 for sensitive data
- Suppress records that cannot achieve k threshold
│
▼
[Step 4: Apply L-Diversity (if sensitive attributes present)]
- Within each equivalence class, ensure ≥ l distinct values for
each sensitive attribute
- Target: l ≥ 3
│
▼
[Step 5: Add Noise (for numerical attributes)]
- Apply calibrated noise (Laplace mechanism for differential privacy)
- Epsilon (ε) parameter: ε ≤ 1.0 for standard data; ε ≤ 0.1 for sensitive data
│
▼
[Step 6: Validation]
- Run re-identification risk assessment (see below)
- If risk > threshold: iterate with stronger parameters
- If risk ≤ threshold: approve anonymized dataset
│
▼
[Anonymized Dataset — Outside GDPR Scope]
- Delete source personal data per retention schedule
- Retain anonymized dataset without retention period constraint
- Document anonymization process in anonymization register
Step 4: Validate Anonymization Effectiveness
Re-Identification Risk Assessment
| Test | Method | Threshold | Action if Failed |
|---|---|---|---|
| Singling out | Attempt to identify unique records using all available quasi-identifiers | < 0.05 (5%) probability of singling out any individual | Increase k-anonymity parameter; suppress unique records |
| Linkability | Cross-reference anonymized dataset with available external datasets (e.g., public records, social media) | No successful linkage in test sample (n ≥ 100) | Remove additional quasi-identifiers; increase generalization |
| Inference | Attempt to infer sensitive attribute values from quasi-identifiers within equivalence classes | No attribute can be inferred with > 80% confidence | Increase l-diversity; apply t-closeness |
| Motivated intruder test (ICO) | Simulate an attack by a motivated individual with access to public resources | Intruder cannot identify any individual with reasonable effort | Strengthen technique parameters; consider full suppression |
K-Anonymity Validation Criteria
| Dataset Size | Minimum k | Rationale |
|---|---|---|
| < 1,000 records | k ≥ 10 | Small datasets are more vulnerable to singling out |
| 1,000 — 100,000 records | k ≥ 5 | Standard protection level |
| > 100,000 records | k ≥ 3 (minimum); k ≥ 5 (recommended) | Larger datasets provide inherent protection |
| Special category data (any size) | k ≥ 10 | Elevated risk from re-identification of sensitive data |
| Location data (any size) | k ≥ 20 | Location data is highly re-identifiable (Montjoye et al., 2013: 4 spatiotemporal points sufficient to uniquely identify 95% of individuals) |
Anonymization Register
Orion Data Vault Corp maintains a register of all anonymization operations:
ANONYMIZATION REGISTER — Orion Data Vault Corp
(Extract as of 2026-03-14)
┌──────────────┬─────────────────┬────────────┬───────────────┬──────────┬──────────────────┬─────────────┐
│ Anon Ref │ Source Category │ Records │ Technique │ k-value │ Re-ID Risk │ Date │
├──────────────┼─────────────────┼────────────┼───────────────┼──────────┼──────────────────┼─────────────┤
│ ANON-2025-041│ CAT-005 Web │ 2.3M │ Aggregation + │ k=15 │ < 0.01% │ 2025-12-01 │
│ │ Analytics │ │ noise addition│ │ │ │
├──────────────┼─────────────────┼────────────┼───────────────┼──────────┼──────────────────┼─────────────┤
│ ANON-2026-008│ CAT-003 Trans. │ 450K │ Generalization│ k=8 │ < 0.02% │ 2026-02-15 │
│ │ Records │ │ + l-diversity │ l=4 │ │ │
├──────────────┼─────────────────┼────────────┼───────────────┼──────────┼──────────────────┼─────────────┤
│ ANON-2026-012│ CAT-009 Support │ 28K │ Text redaction│ k=5 │ < 0.05% │ 2026-03-01 │
│ │ Records │ │ + generalizn. │ │ (manual review │ │
│ │ │ │ │ │ validated) │ │
└──────────────┴─────────────────┴────────────┴───────────────┴──────────┴──────────────────┴─────────────┘
Ongoing Monitoring
Annual Re-Identification Risk Review
Anonymized datasets must be reviewed annually because:
- New data sources: Newly available external datasets may enable linkage attacks that were not possible when anonymization was performed.
- Technology advances: Improved computation and AI capabilities may reduce the effectiveness of anonymization techniques over time.
- Contextual changes: Changes in the population represented by the data may make previously anonymous records identifiable.
If a review determines that anonymization is no longer effective, the organization must either:
- Apply additional anonymization techniques to restore effectiveness, or
- Treat the dataset as personal data and apply full GDPR compliance (legal basis, retention schedule, data subject rights).
04 同仓库更多 Skills
职场邮件监控合规
workplace-email-privacy
依据 Barbulescu 诉罗马尼亚案(欧洲人权法院大法庭)、EDPB 指引及各国劳动法,实施工作场所电子邮件与互联网监控合规。涵盖可接受使用政策、合理的隐私期待、比例原则测试以及内容监控与元数据监控的区别。关键词:邮件监控、Barbulescu、职场隐私、互联网监控、可接受使用政策、ECHR、比例原则。
举报人数据保护合规
whistleblower-data
依据欧盟指令 2019/1937 和 GDPR,为举报(吹哨)系统实施数据保护合规。涵盖匿名举报渠道、举报人与被指控人的身份保护、保存期限限制、访问限制以及反报复措施。涉及成员国转化立法与数据保护机构(DPA)指引。关键词:举报人、指令 2019/1937、匿名举报、身份保护、报复、保存期限、举报渠道。
供应商终止数据返还与删除
vendor-termination-data
依据 GDPR 第 28(3)(g) 条的供应商终止数据返还与删除流程。涵盖数据提取格式、删除证明要求、过渡规划、残留数据处理以及终止后核验。
供应商隐私风险评分
vendor-risk-scoring
面向数据处理者管理的供应商隐私风险分级方法论。涵盖数据量、敏感度、传输地点、认证情况、泄露历史和控制成熟度等评分要素,通过加权风险计算进行风险分级与等级划分。
供应商隐私尽职调查
vendor-privacy-due-diligence
依据 GDPR 第 28(1) 条的签约前供应商隐私尽职调查。涵盖风险问卷、技术控制评估、认证审查、数据流分析以及针对处理者合作的书面充分性决策。
供应商隐私合规审计
vendor-privacy-audit
依据 GDPR 第 28(3)(h) 条进行现场和远程供应商审计程序。涵盖审计计划、证据收集方法、问题发现分类、整改跟踪以及用于处理者合规验证的审计报告生成。