GDPR/DSGVO Expert
Tools and guidance for EU General Data Protection Regulation (GDPR) and German Bundesdatenschutzgesetz (BDSG) compliance.
Table of Contents
Tools
GDPR Compliance Checker
Scans codebases for potential GDPR compliance issues including personal data patterns and risky code practices.
# Scan a project directory
python scripts/gdpr_compliance_checker.py /path/to/project
# JSON output for CI/CD integration
python scripts/gdpr_compliance_checker.py . --json --output report.json
Detects:
- Personal data patterns (email, phone, IP addresses)
- Special category data (health, biometric, religion)
- Financial data (credit cards, IBAN)
- Risky code patterns:
- Logging personal data
- Missing consent mechanisms
- Indefinite data retention
- Unencrypted sensitive data
- Disabled deletion functionality
Output:
- Compliance score (0-100)
- Risk categorization (critical, high, medium)
- Prioritized recommendations with GDPR article references
DPIA Generator
Generates Data Protection Impact Assessment documentation following Art. 35 requirements.
# Get input template
python scripts/dpia_generator.py --template > input.json
# Generate DPIA report
python scripts/dpia_generator.py --input input.json --output dpia_report.md
Features:
- Automatic DPIA threshold assessment
- Risk identification based on processing characteristics
- Legal basis requirements documentation
- Mitigation recommendations
- Markdown report generation
DPIA Triggers Assessed:
- Systematic monitoring (Art. 35(3)(c))
- Large-scale special category data (Art. 35(3)(b))
- Automated decision-making (Art. 35(3)(a))
- WP29 high-risk criteria
Data Subject Rights Tracker
Manages data subject rights requests under GDPR Articles 15-22.
# Add new request
python scripts/data_subject_rights_tracker.py add \
--type access --subject "John Doe" --email "john@example.com"
# List all requests
python scripts/data_subject_rights_tracker.py list
# Update status
python scripts/data_subject_rights_tracker.py status --id DSR-202601-0001 --update verified
# Generate compliance report
python scripts/data_subject_rights_tracker.py report --output compliance.json
# Generate response template
python scripts/data_subject_rights_tracker.py template --id DSR-202601-0001
Supported Rights:
| Right |
Article |
Deadline |
| Access |
Art. 15 |
30 days |
| Rectification |
Art. 16 |
30 days |
| Erasure |
Art. 17 |
30 days |
| Restriction |
Art. 18 |
30 days |
| Portability |
Art. 20 |
30 days |
| Objection |
Art. 21 |
30 days |
| Automated decisions |
Art. 22 |
30 days |
Features:
- Deadline tracking with overdue alerts
- Identity verification workflow
- Response template generation
- Compliance reporting
Reference Guides
GDPR Compliance Guide
references/gdpr_compliance_guide.md
Comprehensive implementation guidance covering:
- Legal bases for processing (Art. 6)
- Special category requirements (Art. 9)
- Data subject rights implementation
- Accountability requirements (Art. 30)
- International transfers (Chapter V)
- Breach notification (Art. 33-34)
German BDSG Requirements
references/german_bdsg_requirements.md
German-specific requirements including:
- DPO appointment threshold (§ 38 BDSG - 20+ employees)
- Employment data processing (§ 26 BDSG)
- Video surveillance rules (§ 4 BDSG)
- Credit scoring requirements (§ 31 BDSG)
- State data protection laws (Landesdatenschutzgesetze)
- Works council co-determination rights
DPIA Methodology
references/dpia_methodology.md
Step-by-step DPIA process:
- Threshold assessment criteria
- WP29 high-risk indicators
- Risk assessment methodology
- Mitigation measure categories
- DPO and supervisory authority consultation
- Templates and checklists
Workflows
Workflow 1: New Processing Activity Assessment
Step 1: Run compliance checker on codebase
→ python scripts/gdpr_compliance_checker.py /path/to/code
Step 2: Review findings and compliance score
→ Address critical and high issues
Step 3: Determine if DPIA required
→ Check references/dpia_methodology.md threshold criteria
Step 4: If DPIA required, generate assessment
→ python scripts/dpia_generator.py --template > input.json
→ Fill in processing details
→ python scripts/dpia_generator.py --input input.json --output dpia.md
Step 5: Document in records of processing activities
Workflow 2: Data Subject Request Handling
Step 1: Log request in tracker
→ python scripts/data_subject_rights_tracker.py add --type [type] ...
Step 2: Verify identity (proportionate measures)
→ python scripts/data_subject_rights_tracker.py status --id [ID] --update verified
Step 3: Gather data from systems
→ python scripts/data_subject_rights_tracker.py status --id [ID] --update in_progress
Step 4: Generate response
→ python scripts/data_subject_rights_tracker.py template --id [ID]
Step 5: Send response and complete
→ python scripts/data_subject_rights_tracker.py status --id [ID] --update completed
Step 6: Monitor compliance
→ python scripts/data_subject_rights_tracker.py report
Workflow 3: German BDSG Compliance Check
Step 1: Determine if DPO required
→ 20+ employees processing personal data automatically
→ OR processing requires DPIA
→ OR business involves data transfer/market research
Step 2: If employees involved, review § 26 BDSG
→ Document legal basis for employee data
→ Check works council requirements
Step 3: If video surveillance, comply with § 4 BDSG
→ Install signage
→ Document necessity
→ Limit retention
Step 4: Register DPO with supervisory authority
→ See references/german_bdsg_requirements.md for authority list
Key GDPR Concepts
Legal Bases (Art. 6)
- Consent: Marketing, newsletters, analytics (must be freely given, specific, informed)
- Contract: Order fulfillment, service delivery
- Legal obligation: Tax records, employment law
- Legitimate interests: Fraud prevention, security (requires balancing test)
Special Category Data (Art. 9)
Requires explicit consent or Art. 9(2) exception:
- Health data
- Biometric data
- Racial/ethnic origin
- Political opinions
- Religious beliefs
- Trade union membership
- Genetic data
- Sexual orientation
Data Subject Rights
All rights must be fulfilled within 30 days (extendable to 90 for complex requests):
- Access: Provide copy of data and processing information
- Rectification: Correct inaccurate data
- Erasure: Delete data (with exceptions for legal obligations)
- Restriction: Limit processing while issues are resolved
- Portability: Provide data in machine-readable format
- Object: Stop processing based on legitimate interests
German BDSG Additions
| Topic |
BDSG Section |
Key Requirement |
| DPO threshold |
§ 38 |
20+ employees = mandatory DPO |
| Employment |
§ 26 |
Detailed employee data rules |
| Video |
§ 4 |
Signage and proportionality |
| Scoring |
§ 31 |
Explainable algorithms |
Cross-Reference: CCPA/CPRA US Privacy Comparison
When operating across EU and US jurisdictions, align GDPR compliance with California Consumer Privacy Act (CCPA) as amended by CPRA. Key differences to manage:
| Dimension |
GDPR |
CCPA/CPRA |
| Scope |
Any org processing EU resident data |
For-profit businesses meeting revenue/data thresholds |
| Legal basis |
6 lawful bases required (Art. 6) |
No legal basis requirement; opt-out model |
| Consent |
Opt-in by default |
Opt-out (except minors and sensitive data) |
| Data subject rights |
Access, rectification, erasure, portability, objection |
Know, delete, correct, opt-out of sale/sharing, limit sensitive data use |
| Breach notification |
72 hours to supervisory authority (Art. 33) |
"Most expedient time possible" to consumers |
| Enforcement |
DPAs with fines up to 4% global turnover |
California Privacy Protection Agency (CPPA), $2,500-$7,500 per violation |
| DPO requirement |
Mandatory in many cases (Art. 37) |
No DPO requirement |
| Children's data |
Under 16 requires parental consent (Art. 8) |
Under 16 opt-in for sale; under 13 parental consent |
Practical alignment: Build a unified privacy program that satisfies the stricter GDPR requirements by default, then layer CCPA/CPRA-specific mechanisms (e.g., "Do Not Sell or Share My Personal Information" link, annual metrics disclosure).
See also: ../ccpa-cpra-specialist/SKILL.md for full CCPA/CPRA compliance workflows and tools.
Infrastructure Privacy Controls
Cookie Consent and Tracking
Implement compliant cookie consent per GDPR Art. 6 + ePrivacy Directive:
| Category |
Examples |
Consent Required |
Default State |
| Strictly Necessary |
Session, CSRF, load balancer |
No |
Active |
| Functional |
Language preference, UI settings |
Yes |
Inactive |
| Analytics |
Google Analytics, Matomo, Hotjar |
Yes |
Inactive |
| Marketing |
Facebook Pixel, Google Ads, retargeting |
Yes |
Inactive |
Implementation requirements:
- Banner must block all non-essential cookies until explicit consent
- Pre-checked boxes are NOT valid consent (Planet49 ruling, CJEU C-673/17)
- Consent must be as easy to withdraw as to give
- Record consent proof (timestamp, version, choices made)
- Re-consent on material changes to cookie policy
Global Privacy Control (GPC) Signal
Per CCPA/CPRA regulations and emerging EU guidance:
- Detect
Sec-GPC: 1 HTTP header and navigator.globalPrivacyControl JavaScript API
- Treat GPC as valid opt-out signal for CCPA/CPRA
- For GDPR: GPC can serve as a signal of objection under Art. 21 — evaluate on a case-by-case basis
- Log GPC signal detection and honor it automatically
Data Localization and Cross-Border Transfers
| Transfer Mechanism |
Status (post-Schrems II) |
When to Use |
| EU Adequacy Decision |
Valid |
Transfers to adequate countries (e.g., Japan, UK, South Korea, US via DPF) |
| Standard Contractual Clauses (SCCs) |
Valid with TIA |
Default mechanism for non-adequate countries |
| Binding Corporate Rules (BCRs) |
Valid |
Intra-group transfers in multinationals |
| EU-US Data Privacy Framework (DPF) |
Valid (since July 2023) |
US companies certified under DPF |
| Derogations (Art. 49) |
Limited use only |
Explicit consent, contract necessity — not for systematic transfers |
Transfer Impact Assessment (TIA) requirements for SCCs:
- Map the data flow (what data, to whom, where)
- Assess recipient country legal framework (surveillance laws, access by authorities)
- Evaluate supplementary measures needed (encryption, pseudonymization, contractual)
- Document assessment and review annually
AI-Specific GDPR Requirements
Automated Decision-Making (Art. 22)
Art. 22 restricts decisions based solely on automated processing that produce legal or similarly significant effects:
| Requirement |
Implementation |
| Right not to be subject to automated decisions |
Provide human review mechanism for consequential decisions |
| Right to explanation |
Document and explain logic, significance, and consequences |
| Right to contest |
Enable data subjects to challenge automated decisions |
| Explicit consent or contract necessity |
Secure Art. 22(2) legal basis before deploying |
| Suitable safeguards |
Implement human oversight, right to express point of view |
AI transparency checklist:
AI Training Data Requirements
| Requirement |
GDPR Basis |
Action |
| Lawful basis for training data |
Art. 6 |
Legitimate interest (with DPIA) or consent |
| Purpose limitation |
Art. 5(1)(b) |
Training purpose must be compatible with original collection |
| Data minimization |
Art. 5(1)(c) |
Use minimum data necessary; prefer synthetic/anonymized data |
| Accuracy |
Art. 5(1)(d) |
Ensure training data is accurate and up-to-date |
| Storage limitation |
Art. 5(1)(e) |
Define retention for training datasets |
| Special category data |
Art. 9 |
Explicit consent or Art. 9(2)(j) research exemption for health/biometric data |
| Right to erasure |
Art. 17 |
Implement mechanism to remove individual data from training sets (or document inability) |
| Data scraping |
Art. 14 |
Inform data subjects when using publicly available data for training |
Enhanced DPIA Methodology with EU AI Act Integration
When DPIA + AI Act Conformity Assessment Overlap
For AI systems processing personal data, both GDPR Art. 35 DPIA and EU AI Act conformity assessment may apply:
| AI Risk Level (EU AI Act) |
GDPR DPIA Required? |
Combined Assessment Approach |
| Unacceptable (Art. 5) |
N/A — prohibited |
Do not deploy |
| High-risk (Annex III) |
Almost always yes |
Joint DPIA + conformity assessment |
| Limited risk (Art. 50) |
Evaluate per Art. 35 criteria |
DPIA if systematic monitoring or profiling |
| Minimal risk |
Evaluate per Art. 35 criteria |
Standard DPIA threshold assessment |
Enhanced DPIA Process for AI Systems
Step 1: AI System Classification
→ Classify under EU AI Act risk levels
→ Map to GDPR Art. 35(3) triggers
Step 2: Data Flow and Processing Analysis
→ Document training data sources and legal basis
→ Map inference data flows
→ Identify automated decision points (Art. 22)
Step 3: AI-Specific Risk Assessment
→ Bias and discrimination risk (protected groups)
→ Accuracy and reliability risk
→ Explainability and transparency gaps
→ Data quality and representativeness
→ Model drift and ongoing monitoring needs
Step 4: Fundamental Rights Impact
→ Right to non-discrimination
→ Right to privacy and data protection
→ Freedom of expression (content moderation AI)
→ Right to an effective remedy
Step 5: Combined Mitigation Measures
→ Technical: differential privacy, federated learning, model cards
→ Organizational: AI ethics board, human oversight procedures
→ Contractual: AI-specific DPA clauses with processors
→ Monitoring: continuous bias monitoring, performance drift detection
Step 6: DPO and Supervisory Authority Consultation
→ Consult DPO on combined assessment
→ Prior consultation with SA if high residual risk (Art. 36)
→ Notify national AI authority if high-risk AI system
Privacy by Design Technical Controls
Data Minimization Techniques
| Technique |
Description |
Use Case |
| Field-level encryption |
Encrypt specific PII fields at rest |
Database storage |
| Tokenization |
Replace PII with non-reversible tokens |
Payment processing, analytics |
| Data masking |
Obscure portions of data (e.g., email: j***@example.com) |
UI display, logging |
| Aggregation |
Process only aggregated/statistical data |
Analytics, reporting |
| Purpose-scoped access |
Limit data access to specific processing purposes |
Multi-purpose systems |
| Automatic expiration |
TTL-based data deletion |
Session data, temporary processing |
Pseudonymization Implementation (Recital 26, Art. 4(5))
| Method |
Reversibility |
Strength |
Best For |
| HMAC-based |
Reversible with key |
Strong |
Internal analytics with re-identification need |
| Format-preserving encryption |
Reversible with key |
Strong |
Legacy system compatibility |
| Deterministic hashing (salted) |
One-way |
Medium |
Cross-dataset linkage without PII |
| Random ID mapping |
Reversible with lookup table |
Strong |
Research datasets |
Key management for pseudonymization:
- Store re-identification keys separately from pseudonymized data
- Apply strict access controls to key material (minimum two-person rule)
- Document key rotation schedule
- Log all re-identification events
Encryption Standards
| Layer |
Minimum Standard |
Recommended |
| At rest |
AES-256 |
AES-256-GCM with envelope encryption |
| In transit |
TLS 1.2 |
TLS 1.3 |
| Database |
Transparent Data Encryption (TDE) |
Column-level encryption for PII |
| Backups |
AES-256 |
AES-256 + separate key from production |
| Key management |
Hardware-backed (HSM/KMS) |
Cloud KMS with customer-managed keys (BYOK) |
Cross-Framework Privacy Mapping
| Requirement |
GDPR Article |
CCPA/CPRA Section |
HIPAA Rule |
NIS2 Article |
| Risk assessment |
Art. 35 (DPIA) |
§1798.185 (risk assessment regs) |
§164.308(a)(1) |
Art. 21(2)(a) |
| Breach notification |
Art. 33-34 (72 hrs to SA) |
§1798.150 (to consumers) |
§164.404-408 (60 days) |
Art. 23 (24 hrs early warning) |
| Data minimization |
Art. 5(1)(c) |
§1798.100(c) (collection limitation) |
§164.502(b) (minimum necessary) |
Art. 21(2)(e) |
| Encryption |
Art. 32(1)(a) |
Implicit (reasonable security) |
§164.312(a)(2)(iv) (addressable) |
Art. 21(2)(e) |
| Access controls |
Art. 32(1)(b) |
Implicit (reasonable security) |
§164.312(a)(1) (access control) |
Art. 21(2)(d) |
| Incident response |
Art. 33-34 |
§1798.150 |
§164.308(a)(6) |
Art. 21(2)(b) |
| Supply chain security |
Art. 28 (processor agreements) |
§1798.140(ag) (service provider contracts) |
§164.308(b) (BAAs) |
Art. 21(2)(d) |
| Governance/accountability |
Art. 5(2), Art. 24 |
§1798.185 (audit regs) |
§164.308(a)(1) |
Art. 20 (governance) |
| Right to delete/erasure |
Art. 17 |
§1798.105 |
Limited (retention rules) |
N/A |
| Data portability |
Art. 20 |
§1798.130(a)(2) |
N/A |
N/A |
Cross-references: See ../information-security-manager-iso27001/SKILL.md for ISO 27001 security controls, and ../mdr-745-specialist/SKILL.md for healthcare device data protection under MDR.
Cross-Framework Privacy Integration
GDPR ↔ CCPA/CPRA Comparison
| Aspect |
GDPR |
CCPA/CPRA |
| Scope |
Any org processing EU residents' data |
$25M+ revenue, 100K+ consumers, or 50%+ revenue from selling PI |
| Legal Basis |
6 legal bases required (Art. 6) |
Opt-out model (no legal basis needed for collection) |
| Consent |
Opt-in required |
Opt-out for sale/sharing |
| Right to Delete |
Art. 17 |
§1798.105 |
| Data Portability |
Art. 20 |
§1798.130 |
| Penalties |
Up to €20M or 4% global turnover |
$2,500-$7,500 per violation |
| DPO Required |
Yes (in many cases) |
No |
| DPIA Required |
Yes (high risk processing) |
Risk assessments (CPRA) |
AI-Specific GDPR Requirements
- Automated Decision-Making (Art. 22): Right not to be subject to decisions based solely on automated processing with legal/significant effects
- AI Training Data: Legitimate interest or consent required; purpose limitation applies to model training
- Profiling: Requires explicit consent for automated profiling with significant effects
- EU AI Act Integration: High-risk AI systems processing personal data require DPIA per Art. 35 GDPR
- Cross-reference: See
eu-ai-act-specialist for AI-specific compliance
Infrastructure Privacy Controls
- Cookie Consent: TCF 2.2 compliant consent management platform (CMP)
- Global Privacy Control (GPC): Must honor GPC browser signals (also CCPA requirement)
- Data Localization: EU data residency requirements, Schrems II adequacy decisions
- Cross-Border Transfers: Standard Contractual Clauses (SCCs), adequacy decisions, binding corporate rules
- Privacy by Design Controls: Data minimization, pseudonymization, encryption at rest/transit, access logging
Cross-Framework Mapping
| Control |
GDPR |
CCPA |
HIPAA |
NIS2 |
| Privacy Notice |
Art. 13-14 |
§1798.100 |
Privacy Practices |
— |
| Data Subject Rights |
Art. 15-22 |
§1798.100-125 |
Access/Amendment |
— |
| Breach Notification |
Art. 33-34 |
§1798.150 |
§164.404-408 |
Art. 23 |
| DPO/Privacy Officer |
Art. 37-39 |
— |
Privacy Officer |
— |
| Risk Assessment |
Art. 35 (DPIA) |
Risk Assessment |
§164.308(a)(1) |
Art. 21 |
| Encryption |
Art. 32 |
Reasonable Security |
§164.312(a)(2)(iv) |
Art. 21.2.h |
| Training |
Art. 39.1.b |
— |
§164.308(a)(5) |
Art. 21.2.g |
Troubleshooting
| Problem |
Possible Cause |
Resolution |
| Compliance checker reports critical findings for special category data |
Code processes health, biometric, or religious data without explicit consent or Art. 9(2) exception |
Identify all special category data processing; secure explicit consent or document applicable Art. 9(2) exception; implement field-level encryption for sensitive fields |
| DPIA generator determines assessment required but organization has no DPIA process |
Processing triggers Art. 35(3) criteria (systematic monitoring, large-scale special categories, or automated decision-making) |
Follow the DPIA methodology in references/dpia_methodology.md; generate template with dpia_generator.py --template; consult DPO before proceeding; consider prior consultation with supervisory authority if high residual risk (Art. 36) |
| Data subject rights requests consistently exceed 30-day deadline |
Manual fulfillment without tracking system, unclear data location, or complex verification requirements |
Deploy data_subject_rights_tracker.py for automated deadline monitoring; map all personal data locations using data inventory; streamline identity verification to proportionate measures |
| Cross-border transfer mechanism invalidated or uncertain |
Reliance on deprecated mechanism or Transfer Impact Assessment not completed for SCCs |
Review current adequacy decisions (UK, Japan, South Korea, US via DPF); for SCCs, complete Transfer Impact Assessment per Schrems II requirements; document supplementary measures (encryption, pseudonymization) |
| Cookie consent banner flagged as non-compliant |
Pre-checked boxes, cookie wall blocking access, or reject button harder to find than accept |
Implement TCF 2.2 compliant CMP; ensure all non-essential cookies blocked until explicit consent; make reject as prominent as accept (per Planet49 ruling, CJEU C-673/17); record consent proof |
| GDPR compliance checker detects personal data in application logs |
Application logs contain email addresses, IP addresses, or user identifiers |
Implement log sanitization to mask or pseudonymize personal data before storage; configure logging frameworks to exclude PII fields; set log retention limits aligned with purpose |
| AI system processing personal data lacks Art. 22 safeguards |
Automated decision-making produces legal or significant effects without human review mechanism |
Implement human-in-the-loop for high-stakes decisions; provide right to explanation and right to contest; document algorithmic logic in plain language; include AI decision-making in privacy notice per Art. 13(2)(f) |
Success Criteria
- Compliance score of 80+ on codebase scan -- indicating no critical personal data exposure issues, with all high-risk patterns addressed and documented
- All data subject rights requests fulfilled within 30 days -- tracked via
data_subject_rights_tracker.py with identity verification completed, response templates generated, and compliance reports showing zero overdue requests
- DPIA completed for all high-risk processing activities -- covering Art. 35(3) triggers, WP29 criteria, risk mitigation measures, and DPO consultation; prior SA consultation documented where required
- Records of Processing Activities (Art. 30) maintained and current -- covering all processing activities with purposes, legal bases, data categories, recipients, retention periods, and transfer mechanisms
- Cross-border transfer mechanisms validated -- adequacy decisions, SCCs with TIA, or BCRs in place for all international data flows, reviewed annually
- Cookie consent implementation compliant -- non-essential cookies blocked until explicit consent, reject as easy as accept, consent proof recorded with timestamp and version, GPC signal honored
- DPO appointed and registered where required -- including German BDSG Section 38 threshold (20+ employees processing personal data automatically), with supervisory authority notification
Scope & Limitations
In Scope:
- Codebase scanning for personal data patterns and risky processing practices
- DPIA generation following Art. 35 requirements with threshold assessment and risk mitigation
- Data subject rights request tracking (Art. 15-22) with deadline monitoring and response templates
- German BDSG-specific requirements (DPO threshold, employment data, video surveillance, credit scoring)
- Cross-border transfer mechanism assessment (adequacy decisions, SCCs, BCRs, DPF)
- AI-specific GDPR requirements (Art. 22 automated decisions, training data governance, profiling)
- Cross-framework privacy mapping (GDPR, CCPA/CPRA, HIPAA, NIS2)
Out of Scope:
- Legal advice on specific legal basis selection or legitimate interest balancing tests -- consult DPO and legal counsel
- Supervisory authority notification or interaction for breach reporting (Art. 33-34)
- Implementation of cookie consent management platforms or consent management code
- GDPR representative appointment logistics for non-EU organizations (Art. 27)
- Binding Corporate Rules (BCR) application or approval process
- German Landesdatenschutzgesetze (state-level data protection laws) beyond general guidance
Important Notes:
- GDPR enforcement fines reached EUR 2.3 billion in 2025, a 38% year-over-year increase; healthcare violations spiked with average penalties of EUR 203,000
- The EU AI Act creates dual obligations for AI systems processing personal data -- both DPIA (GDPR Art. 35) and conformity assessment (AI Act) may apply simultaneously
- Dark patterns in consent interfaces are under heightened enforcement scrutiny; regulators are penalizing cookie walls, manipulative UI, and buried reject options
Integration Points
| Skill |
Integration |
When to Use |
ccpa-cpra-privacy-expert |
Unified privacy program covering both GDPR and CCPA/CPRA; cross-framework mapping |
When organization processes data of both EU residents and California consumers |
eu-ai-act-specialist |
Combined DPIA + AI Act conformity assessment for high-risk AI systems processing personal data |
When AI system triggers both GDPR Art. 35 DPIA and EU AI Act high-risk classification |
information-security-manager-iso27001 |
ISO 27001 security controls support GDPR Art. 32 security of processing requirements |
When implementing technical and organizational measures for personal data protection |
infrastructure-compliance-auditor |
Technical privacy controls validation (encryption, access controls, logging, data masking) |
When assessing infrastructure supporting GDPR privacy-by-design requirements |
dora-compliance-expert |
DORA complements GDPR for financial sector ICT systems processing personal data |
When financial entity must align DORA ICT security with GDPR data protection requirements |
Tool Reference
gdpr_compliance_checker.py
Scans codebases for potential GDPR compliance issues including personal data patterns and risky code practices.
| Flag |
Required |
Description |
<project_dir> |
Yes |
Path to project directory to scan |
--json |
No |
Output results in JSON format for CI/CD integration |
--output <file> |
No |
Export report to specified file path |
Detects: Email, phone, IP address, credit card, IBAN, German ID patterns; special category data (health, biometric, religion); risky code patterns (logging PII, missing consent, indefinite retention, unencrypted sensitive data, disabled deletion). Output: Compliance score (0-100), risk categorization (critical/high/medium), and prioritized recommendations with GDPR article references.
dpia_generator.py
Generates Data Protection Impact Assessment documentation following Art. 35 requirements.
| Flag |
Required |
Description |
--template |
No |
Generate blank DPIA input template to stdout |
--input <file> |
Yes (unless --template or --interactive) |
Path to JSON processing activity description |
--output <file> |
No |
Export DPIA report to specified file path (markdown format) |
--interactive |
No |
Launch interactive mode for guided DPIA creation |
Features: Automatic DPIA threshold assessment against Art. 35(3) triggers and WP29 criteria, risk identification based on processing characteristics, legal basis documentation, mitigation recommendations, and markdown report generation.
data_subject_rights_tracker.py
Manages data subject rights requests under GDPR Articles 15-22 with deadline tracking and response templates.
| Subcommand |
Description |
add |
Add new request (--type, --subject, --email required) |
list |
List all tracked requests |
status |
View or update request status (--id required, --update to change status) |
report |
Generate compliance report (--output for file export) |
template |
Generate response template for specific request (--id required) |
| Flag |
Description |
--type <right> |
Right type: access, rectification, erasure, restriction, portability, objection, automated |
--subject <name> |
Data subject name |
--email <email> |
Data subject email address |
--id <request_id> |
Request identifier (e.g., DSR-202601-0001) |
--update <status> |
New status: received, verified, in_progress, completed, denied, extended |
--output <file> |
Export report or template to specified file path |
Features: 30-day deadline tracking with overdue alerts, identity verification workflow, response template generation per right type, and compliance reporting with metrics.
1---2name: gdpr-dsgvo-expert3description: GDPR and German DSGVO compliance automation. Scans codebases for privacy risks, generates DPIA documentation, tracks data subject rights requests. Use for GDPR compliance assessments, privacy audits, data protection planning, DPIA generation, and data subject rights management.4license: MIT + Commons Clause5---6# GDPR/DSGVO Expert
7
8Tools and guidance for EU General Data Protection Regulation (GDPR) and German Bundesdatenschutzgesetz (BDSG) compliance.
9
10---
11
12## Table of Contents
13
14- [Tools](#tools)
15 - [GDPR Compliance Checker](#gdpr-compliance-checker)
16 - [DPIA Generator](#dpia-generator)
17 - [Data Subject Rights Tracker](#data-subject-rights-tracker)
18- [Reference Guides](#reference-guides)
19- [Workflows](#workflows)
20
21---
22
23## Tools
24
25### GDPR Compliance Checker
26
27Scans codebases for potential GDPR compliance issues including personal data patterns and risky code practices.
28
29```bash
30# Scan a project directory
31python scripts/gdpr_compliance_checker.py /path/to/project
32
33# JSON output for CI/CD integration
34python scripts/gdpr_compliance_checker.py . --json --output report.json
35```
36
37**Detects:**
38- Personal data patterns (email, phone, IP addresses)
39- Special category data (health, biometric, religion)
40- Financial data (credit cards, IBAN)
41- Risky code patterns:
42 - Logging personal data
43 - Missing consent mechanisms
44 - Indefinite data retention
45 - Unencrypted sensitive data
46 - Disabled deletion functionality
47
48**Output:**
49- Compliance score (0-100)
50- Risk categorization (critical, high, medium)
51- Prioritized recommendations with GDPR article references
52
53---
54
55### DPIA Generator
56
57Generates Data Protection Impact Assessment documentation following Art. 35 requirements.
58
59```bash
60# Get input template
61python scripts/dpia_generator.py --template > input.json
62
63# Generate DPIA report
64python scripts/dpia_generator.py --input input.json --output dpia_report.md
65```
66
67**Features:**
68- Automatic DPIA threshold assessment
69- Risk identification based on processing characteristics
70- Legal basis requirements documentation
71- Mitigation recommendations
72- Markdown report generation
73
74**DPIA Triggers Assessed:**
75- Systematic monitoring (Art. 35(3)(c))
76- Large-scale special category data (Art. 35(3)(b))
77- Automated decision-making (Art. 35(3)(a))
78- WP29 high-risk criteria
79
80---
81
82### Data Subject Rights Tracker
83
84Manages data subject rights requests under GDPR Articles 15-22.
85
86```bash
87# Add new request
88python scripts/data_subject_rights_tracker.py add \
89 --type access --subject "John Doe" --email "john@example.com"
90
91# List all requests
92python scripts/data_subject_rights_tracker.py list
93
94# Update status
95python scripts/data_subject_rights_tracker.py status --id DSR-202601-0001 --update verified
96
97# Generate compliance report
98python scripts/data_subject_rights_tracker.py report --output compliance.json
99
100# Generate response template
101python scripts/data_subject_rights_tracker.py template --id DSR-202601-0001
102```
103
104**Supported Rights:**
105
106| Right | Article | Deadline |
107|-------|---------|----------|
108| Access | Art. 15 | 30 days |
109| Rectification | Art. 16 | 30 days |
110| Erasure | Art. 17 | 30 days |
111| Restriction | Art. 18 | 30 days |
112| Portability | Art. 20 | 30 days |
113| Objection | Art. 21 | 30 days |
114| Automated decisions | Art. 22 | 30 days |
115
116**Features:**
117- Deadline tracking with overdue alerts
118- Identity verification workflow
119- Response template generation
120- Compliance reporting
121
122---
123
124## Reference Guides
125
126### GDPR Compliance Guide
127`references/gdpr_compliance_guide.md`
128
129Comprehensive implementation guidance covering:
130- Legal bases for processing (Art. 6)
131- Special category requirements (Art. 9)
132- Data subject rights implementation
133- Accountability requirements (Art. 30)
134- International transfers (Chapter V)
135- Breach notification (Art. 33-34)
136
137### German BDSG Requirements
138`references/german_bdsg_requirements.md`
139
140German-specific requirements including:
141- DPO appointment threshold (§ 38 BDSG - 20+ employees)
142- Employment data processing (§ 26 BDSG)
143- Video surveillance rules (§ 4 BDSG)
144- Credit scoring requirements (§ 31 BDSG)
145- State data protection laws (Landesdatenschutzgesetze)
146- Works council co-determination rights
147
148### DPIA Methodology
149`references/dpia_methodology.md`
150
151Step-by-step DPIA process:
152- Threshold assessment criteria
153- WP29 high-risk indicators
154- Risk assessment methodology
155- Mitigation measure categories
156- DPO and supervisory authority consultation
157- Templates and checklists
158
159---
160
161## Workflows
162
163### Workflow 1: New Processing Activity Assessment
164
165```
166Step 1: Run compliance checker on codebase
167 → python scripts/gdpr_compliance_checker.py /path/to/code
168
169Step 2: Review findings and compliance score
170 → Address critical and high issues
171
172Step 3: Determine if DPIA required
173 → Check references/dpia_methodology.md threshold criteria
174
175Step 4: If DPIA required, generate assessment
176 → python scripts/dpia_generator.py --template > input.json
177 → Fill in processing details
178 → python scripts/dpia_generator.py --input input.json --output dpia.md
179
180Step 5: Document in records of processing activities
181```
182
183### Workflow 2: Data Subject Request Handling
184
185```
186Step 1: Log request in tracker
187 → python scripts/data_subject_rights_tracker.py add --type [type] ...
188
189Step 2: Verify identity (proportionate measures)
190 → python scripts/data_subject_rights_tracker.py status --id [ID] --update verified
191
192Step 3: Gather data from systems
193 → python scripts/data_subject_rights_tracker.py status --id [ID] --update in_progress
194
195Step 4: Generate response
196 → python scripts/data_subject_rights_tracker.py template --id [ID]
197
198Step 5: Send response and complete
199 → python scripts/data_subject_rights_tracker.py status --id [ID] --update completed
200
201Step 6: Monitor compliance
202 → python scripts/data_subject_rights_tracker.py report
203```
204
205### Workflow 3: German BDSG Compliance Check
206
207```
208Step 1: Determine if DPO required
209 → 20+ employees processing personal data automatically
210 → OR processing requires DPIA
211 → OR business involves data transfer/market research
212
213Step 2: If employees involved, review § 26 BDSG
214 → Document legal basis for employee data
215 → Check works council requirements
216
217Step 3: If video surveillance, comply with § 4 BDSG
218 → Install signage
219 → Document necessity
220 → Limit retention
221
222Step 4: Register DPO with supervisory authority
223 → See references/german_bdsg_requirements.md for authority list
224```
225
226---
227
228## Key GDPR Concepts
229
230### Legal Bases (Art. 6)
231
232- **Consent**: Marketing, newsletters, analytics (must be freely given, specific, informed)
233- **Contract**: Order fulfillment, service delivery
234- **Legal obligation**: Tax records, employment law
235- **Legitimate interests**: Fraud prevention, security (requires balancing test)
236
237### Special Category Data (Art. 9)
238
239Requires explicit consent or Art. 9(2) exception:
240- Health data
241- Biometric data
242- Racial/ethnic origin
243- Political opinions
244- Religious beliefs
245- Trade union membership
246- Genetic data
247- Sexual orientation
248
249### Data Subject Rights
250
251All rights must be fulfilled within **30 days** (extendable to 90 for complex requests):
252- **Access**: Provide copy of data and processing information
253- **Rectification**: Correct inaccurate data
254- **Erasure**: Delete data (with exceptions for legal obligations)
255- **Restriction**: Limit processing while issues are resolved
256- **Portability**: Provide data in machine-readable format
257- **Object**: Stop processing based on legitimate interests
258
259### German BDSG Additions
260
261| Topic | BDSG Section | Key Requirement |
262|-------|--------------|-----------------|
263| DPO threshold | § 38 | 20+ employees = mandatory DPO |
264| Employment | § 26 | Detailed employee data rules |
265| Video | § 4 | Signage and proportionality |
266| Scoring | § 31 | Explainable algorithms |
267
268---
269
270## Cross-Reference: CCPA/CPRA US Privacy Comparison
271
272When operating across EU and US jurisdictions, align GDPR compliance with California Consumer Privacy Act (CCPA) as amended by CPRA. Key differences to manage:
273
274| Dimension | GDPR | CCPA/CPRA |
275|-----------|------|-----------|
276| Scope | Any org processing EU resident data | For-profit businesses meeting revenue/data thresholds |
277| Legal basis | 6 lawful bases required (Art. 6) | No legal basis requirement; opt-out model |
278| Consent | Opt-in by default | Opt-out (except minors and sensitive data) |
279| Data subject rights | Access, rectification, erasure, portability, objection | Know, delete, correct, opt-out of sale/sharing, limit sensitive data use |
280| Breach notification | 72 hours to supervisory authority (Art. 33) | "Most expedient time possible" to consumers |
281| Enforcement | DPAs with fines up to 4% global turnover | California Privacy Protection Agency (CPPA), $2,500-$7,500 per violation |
282| DPO requirement | Mandatory in many cases (Art. 37) | No DPO requirement |
283| Children's data | Under 16 requires parental consent (Art. 8) | Under 16 opt-in for sale; under 13 parental consent |
284
285**Practical alignment:** Build a unified privacy program that satisfies the stricter GDPR requirements by default, then layer CCPA/CPRA-specific mechanisms (e.g., "Do Not Sell or Share My Personal Information" link, annual metrics disclosure).
286
287> **See also:** `../ccpa-cpra-specialist/SKILL.md` for full CCPA/CPRA compliance workflows and tools.
288
289---
290
291## Infrastructure Privacy Controls
292
293### Cookie Consent and Tracking
294
295Implement compliant cookie consent per GDPR Art. 6 + ePrivacy Directive:
296
297| Category | Examples | Consent Required | Default State |
298|----------|----------|------------------|---------------|
299| Strictly Necessary | Session, CSRF, load balancer | No | Active |
300| Functional | Language preference, UI settings | Yes | Inactive |
301| Analytics | Google Analytics, Matomo, Hotjar | Yes | Inactive |
302| Marketing | Facebook Pixel, Google Ads, retargeting | Yes | Inactive |
303
304**Implementation requirements:**
305- Banner must block all non-essential cookies until explicit consent
306- Pre-checked boxes are NOT valid consent (Planet49 ruling, CJEU C-673/17)
307- Consent must be as easy to withdraw as to give
308- Record consent proof (timestamp, version, choices made)
309- Re-consent on material changes to cookie policy
310
311### Global Privacy Control (GPC) Signal
312
313Per CCPA/CPRA regulations and emerging EU guidance:
314- Detect `Sec-GPC: 1` HTTP header and `navigator.globalPrivacyControl` JavaScript API
315- Treat GPC as valid opt-out signal for CCPA/CPRA
316- For GDPR: GPC can serve as a signal of objection under Art. 21 — evaluate on a case-by-case basis
317- Log GPC signal detection and honor it automatically
318
319### Data Localization and Cross-Border Transfers
320
321| Transfer Mechanism | Status (post-Schrems II) | When to Use |
322|---------------------|--------------------------|-------------|
323| EU Adequacy Decision | Valid | Transfers to adequate countries (e.g., Japan, UK, South Korea, US via DPF) |
324| Standard Contractual Clauses (SCCs) | Valid with TIA | Default mechanism for non-adequate countries |
325| Binding Corporate Rules (BCRs) | Valid | Intra-group transfers in multinationals |
326| EU-US Data Privacy Framework (DPF) | Valid (since July 2023) | US companies certified under DPF |
327| Derogations (Art. 49) | Limited use only | Explicit consent, contract necessity — not for systematic transfers |
328
329**Transfer Impact Assessment (TIA) requirements for SCCs:**
3301. Map the data flow (what data, to whom, where)
3312. Assess recipient country legal framework (surveillance laws, access by authorities)
3323. Evaluate supplementary measures needed (encryption, pseudonymization, contractual)
3334. Document assessment and review annually
334
335---
336
337## AI-Specific GDPR Requirements
338
339### Automated Decision-Making (Art. 22)
340
341Art. 22 restricts decisions based solely on automated processing that produce legal or similarly significant effects:
342
343| Requirement | Implementation |
344|-------------|----------------|
345| Right not to be subject to automated decisions | Provide human review mechanism for consequential decisions |
346| Right to explanation | Document and explain logic, significance, and consequences |
347| Right to contest | Enable data subjects to challenge automated decisions |
348| Explicit consent or contract necessity | Secure Art. 22(2) legal basis before deploying |
349| Suitable safeguards | Implement human oversight, right to express point of view |
350
351**AI transparency checklist:**
352- [ ] Document algorithmic logic in plain language
353- [ ] Implement human-in-the-loop for high-stakes decisions (credit, employment, insurance)
354- [ ] Provide opt-out mechanism for fully automated decisions
355- [ ] Conduct and document bias testing (protected characteristics under Art. 9)
356- [ ] Log all automated decisions with reasoning for auditability
357- [ ] Include AI decision-making in privacy notice (Art. 13(2)(f), Art. 14(2)(g))
358
359### AI Training Data Requirements
360
361| Requirement | GDPR Basis | Action |
362|-------------|------------|--------|
363| Lawful basis for training data | Art. 6 | Legitimate interest (with DPIA) or consent |
364| Purpose limitation | Art. 5(1)(b) | Training purpose must be compatible with original collection |
365| Data minimization | Art. 5(1)(c) | Use minimum data necessary; prefer synthetic/anonymized data |
366| Accuracy | Art. 5(1)(d) | Ensure training data is accurate and up-to-date |
367| Storage limitation | Art. 5(1)(e) | Define retention for training datasets |
368| Special category data | Art. 9 | Explicit consent or Art. 9(2)(j) research exemption for health/biometric data |
369| Right to erasure | Art. 17 | Implement mechanism to remove individual data from training sets (or document inability) |
370| Data scraping | Art. 14 | Inform data subjects when using publicly available data for training |
371
372---
373
374## Enhanced DPIA Methodology with EU AI Act Integration
375
376### When DPIA + AI Act Conformity Assessment Overlap
377
378For AI systems processing personal data, both GDPR Art. 35 DPIA and EU AI Act conformity assessment may apply:
379
380| AI Risk Level (EU AI Act) | GDPR DPIA Required? | Combined Assessment Approach |
381|---------------------------|----------------------|------------------------------|
382| Unacceptable (Art. 5) | N/A — prohibited | Do not deploy |
383| High-risk (Annex III) | Almost always yes | Joint DPIA + conformity assessment |
384| Limited risk (Art. 50) | Evaluate per Art. 35 criteria | DPIA if systematic monitoring or profiling |
385| Minimal risk | Evaluate per Art. 35 criteria | Standard DPIA threshold assessment |
386
387### Enhanced DPIA Process for AI Systems
388
389```
390Step 1: AI System Classification
391 → Classify under EU AI Act risk levels
392 → Map to GDPR Art. 35(3) triggers
393
394Step 2: Data Flow and Processing Analysis
395 → Document training data sources and legal basis
396 → Map inference data flows
397 → Identify automated decision points (Art. 22)
398
399Step 3: AI-Specific Risk Assessment
400 → Bias and discrimination risk (protected groups)
401 → Accuracy and reliability risk
402 → Explainability and transparency gaps
403 → Data quality and representativeness
404 → Model drift and ongoing monitoring needs
405
406Step 4: Fundamental Rights Impact
407 → Right to non-discrimination
408 → Right to privacy and data protection
409 → Freedom of expression (content moderation AI)
410 → Right to an effective remedy
411
412Step 5: Combined Mitigation Measures
413 → Technical: differential privacy, federated learning, model cards
414 → Organizational: AI ethics board, human oversight procedures
415 → Contractual: AI-specific DPA clauses with processors
416 → Monitoring: continuous bias monitoring, performance drift detection
417
418Step 6: DPO and Supervisory Authority Consultation
419 → Consult DPO on combined assessment
420 → Prior consultation with SA if high residual risk (Art. 36)
421 → Notify national AI authority if high-risk AI system
422```
423
424---
425
426## Privacy by Design Technical Controls
427
428### Data Minimization Techniques
429
430| Technique | Description | Use Case |
431|-----------|-------------|----------|
432| Field-level encryption | Encrypt specific PII fields at rest | Database storage |
433| Tokenization | Replace PII with non-reversible tokens | Payment processing, analytics |
434| Data masking | Obscure portions of data (e.g., email: j***@example.com) | UI display, logging |
435| Aggregation | Process only aggregated/statistical data | Analytics, reporting |
436| Purpose-scoped access | Limit data access to specific processing purposes | Multi-purpose systems |
437| Automatic expiration | TTL-based data deletion | Session data, temporary processing |
438
439### Pseudonymization Implementation (Recital 26, Art. 4(5))
440
441| Method | Reversibility | Strength | Best For |
442|--------|---------------|----------|----------|
443| HMAC-based | Reversible with key | Strong | Internal analytics with re-identification need |
444| Format-preserving encryption | Reversible with key | Strong | Legacy system compatibility |
445| Deterministic hashing (salted) | One-way | Medium | Cross-dataset linkage without PII |
446| Random ID mapping | Reversible with lookup table | Strong | Research datasets |
447
448**Key management for pseudonymization:**
449- Store re-identification keys separately from pseudonymized data
450- Apply strict access controls to key material (minimum two-person rule)
451- Document key rotation schedule
452- Log all re-identification events
453
454### Encryption Standards
455
456| Layer | Minimum Standard | Recommended |
457|-------|------------------|-------------|
458| At rest | AES-256 | AES-256-GCM with envelope encryption |
459| In transit | TLS 1.2 | TLS 1.3 |
460| Database | Transparent Data Encryption (TDE) | Column-level encryption for PII |
461| Backups | AES-256 | AES-256 + separate key from production |
462| Key management | Hardware-backed (HSM/KMS) | Cloud KMS with customer-managed keys (BYOK) |
463
464---
465
466## Cross-Framework Privacy Mapping
467
468| Requirement | GDPR Article | CCPA/CPRA Section | HIPAA Rule | NIS2 Article |
469|-------------|-------------|-------------------|------------|--------------|
470| Risk assessment | Art. 35 (DPIA) | §1798.185 (risk assessment regs) | §164.308(a)(1) | Art. 21(2)(a) |
471| Breach notification | Art. 33-34 (72 hrs to SA) | §1798.150 (to consumers) | §164.404-408 (60 days) | Art. 23 (24 hrs early warning) |
472| Data minimization | Art. 5(1)(c) | §1798.100(c) (collection limitation) | §164.502(b) (minimum necessary) | Art. 21(2)(e) |
473| Encryption | Art. 32(1)(a) | Implicit (reasonable security) | §164.312(a)(2)(iv) (addressable) | Art. 21(2)(e) |
474| Access controls | Art. 32(1)(b) | Implicit (reasonable security) | §164.312(a)(1) (access control) | Art. 21(2)(d) |
475| Incident response | Art. 33-34 | §1798.150 | §164.308(a)(6) | Art. 21(2)(b) |
476| Supply chain security | Art. 28 (processor agreements) | §1798.140(ag) (service provider contracts) | §164.308(b) (BAAs) | Art. 21(2)(d) |
477| Governance/accountability | Art. 5(2), Art. 24 | §1798.185 (audit regs) | §164.308(a)(1) | Art. 20 (governance) |
478| Right to delete/erasure | Art. 17 | §1798.105 | Limited (retention rules) | N/A |
479| Data portability | Art. 20 | §1798.130(a)(2) | N/A | N/A |
480
481> **Cross-references:** See `../information-security-manager-iso27001/SKILL.md` for ISO 27001 security controls, and `../mdr-745-specialist/SKILL.md` for healthcare device data protection under MDR.
482
483---
484
485## Cross-Framework Privacy Integration
486
487### GDPR ↔ CCPA/CPRA Comparison
488
489| Aspect | GDPR | CCPA/CPRA |
490|--------|------|-----------|
491| Scope | Any org processing EU residents' data | $25M+ revenue, 100K+ consumers, or 50%+ revenue from selling PI |
492| Legal Basis | 6 legal bases required (Art. 6) | Opt-out model (no legal basis needed for collection) |
493| Consent | Opt-in required | Opt-out for sale/sharing |
494| Right to Delete | Art. 17 | §1798.105 |
495| Data Portability | Art. 20 | §1798.130 |
496| Penalties | Up to €20M or 4% global turnover | $2,500-$7,500 per violation |
497| DPO Required | Yes (in many cases) | No |
498| DPIA Required | Yes (high risk processing) | Risk assessments (CPRA) |
499
500### AI-Specific GDPR Requirements
501
502- **Automated Decision-Making (Art. 22):** Right not to be subject to decisions based solely on automated processing with legal/significant effects
503- **AI Training Data:** Legitimate interest or consent required; purpose limitation applies to model training
504- **Profiling:** Requires explicit consent for automated profiling with significant effects
505- **EU AI Act Integration:** High-risk AI systems processing personal data require DPIA per Art. 35 GDPR
506- **Cross-reference:** See `eu-ai-act-specialist` for AI-specific compliance
507
508### Infrastructure Privacy Controls
509
510- **Cookie Consent:** TCF 2.2 compliant consent management platform (CMP)
511- **Global Privacy Control (GPC):** Must honor GPC browser signals (also CCPA requirement)
512- **Data Localization:** EU data residency requirements, Schrems II adequacy decisions
513- **Cross-Border Transfers:** Standard Contractual Clauses (SCCs), adequacy decisions, binding corporate rules
514- **Privacy by Design Controls:** Data minimization, pseudonymization, encryption at rest/transit, access logging
515
516### Cross-Framework Mapping
517
518| Control | GDPR | CCPA | HIPAA | NIS2 |
519|---------|------|------|-------|------|
520| Privacy Notice | Art. 13-14 | §1798.100 | Privacy Practices | — |
521| Data Subject Rights | Art. 15-22 | §1798.100-125 | Access/Amendment | — |
522| Breach Notification | Art. 33-34 | §1798.150 | §164.404-408 | Art. 23 |
523| DPO/Privacy Officer | Art. 37-39 | — | Privacy Officer | — |
524| Risk Assessment | Art. 35 (DPIA) | Risk Assessment | §164.308(a)(1) | Art. 21 |
525| Encryption | Art. 32 | Reasonable Security | §164.312(a)(2)(iv) | Art. 21.2.h |
526| Training | Art. 39.1.b | — | §164.308(a)(5) | Art. 21.2.g |
527
528---
529
530## Troubleshooting
531
532| Problem | Possible Cause | Resolution |
533|---------|---------------|------------|
534| Compliance checker reports critical findings for special category data | Code processes health, biometric, or religious data without explicit consent or Art. 9(2) exception | Identify all special category data processing; secure explicit consent or document applicable Art. 9(2) exception; implement field-level encryption for sensitive fields |
535| DPIA generator determines assessment required but organization has no DPIA process | Processing triggers Art. 35(3) criteria (systematic monitoring, large-scale special categories, or automated decision-making) | Follow the DPIA methodology in `references/dpia_methodology.md`; generate template with `dpia_generator.py --template`; consult DPO before proceeding; consider prior consultation with supervisory authority if high residual risk (Art. 36) |
536| Data subject rights requests consistently exceed 30-day deadline | Manual fulfillment without tracking system, unclear data location, or complex verification requirements | Deploy `data_subject_rights_tracker.py` for automated deadline monitoring; map all personal data locations using data inventory; streamline identity verification to proportionate measures |
537| Cross-border transfer mechanism invalidated or uncertain | Reliance on deprecated mechanism or Transfer Impact Assessment not completed for SCCs | Review current adequacy decisions (UK, Japan, South Korea, US via DPF); for SCCs, complete Transfer Impact Assessment per Schrems II requirements; document supplementary measures (encryption, pseudonymization) |
538| Cookie consent banner flagged as non-compliant | Pre-checked boxes, cookie wall blocking access, or reject button harder to find than accept | Implement TCF 2.2 compliant CMP; ensure all non-essential cookies blocked until explicit consent; make reject as prominent as accept (per Planet49 ruling, CJEU C-673/17); record consent proof |
539| GDPR compliance checker detects personal data in application logs | Application logs contain email addresses, IP addresses, or user identifiers | Implement log sanitization to mask or pseudonymize personal data before storage; configure logging frameworks to exclude PII fields; set log retention limits aligned with purpose |
540| AI system processing personal data lacks Art. 22 safeguards | Automated decision-making produces legal or significant effects without human review mechanism | Implement human-in-the-loop for high-stakes decisions; provide right to explanation and right to contest; document algorithmic logic in plain language; include AI decision-making in privacy notice per Art. 13(2)(f) |
541
542---
543
544## Success Criteria
545
546- **Compliance score of 80+ on codebase scan** -- indicating no critical personal data exposure issues, with all high-risk patterns addressed and documented
547- **All data subject rights requests fulfilled within 30 days** -- tracked via `data_subject_rights_tracker.py` with identity verification completed, response templates generated, and compliance reports showing zero overdue requests
548- **DPIA completed for all high-risk processing activities** -- covering Art. 35(3) triggers, WP29 criteria, risk mitigation measures, and DPO consultation; prior SA consultation documented where required
549- **Records of Processing Activities (Art. 30) maintained and current** -- covering all processing activities with purposes, legal bases, data categories, recipients, retention periods, and transfer mechanisms
550- **Cross-border transfer mechanisms validated** -- adequacy decisions, SCCs with TIA, or BCRs in place for all international data flows, reviewed annually
551- **Cookie consent implementation compliant** -- non-essential cookies blocked until explicit consent, reject as easy as accept, consent proof recorded with timestamp and version, GPC signal honored
552- **DPO appointed and registered where required** -- including German BDSG Section 38 threshold (20+ employees processing personal data automatically), with supervisory authority notification
553
554---
555
556## Scope & Limitations
557
558**In Scope:**
559- Codebase scanning for personal data patterns and risky processing practices
560- DPIA generation following Art. 35 requirements with threshold assessment and risk mitigation
561- Data subject rights request tracking (Art. 15-22) with deadline monitoring and response templates
562- German BDSG-specific requirements (DPO threshold, employment data, video surveillance, credit scoring)
563- Cross-border transfer mechanism assessment (adequacy decisions, SCCs, BCRs, DPF)
564- AI-specific GDPR requirements (Art. 22 automated decisions, training data governance, profiling)
565- Cross-framework privacy mapping (GDPR, CCPA/CPRA, HIPAA, NIS2)
566
567**Out of Scope:**
568- Legal advice on specific legal basis selection or legitimate interest balancing tests -- consult DPO and legal counsel
569- Supervisory authority notification or interaction for breach reporting (Art. 33-34)
570- Implementation of cookie consent management platforms or consent management code
571- GDPR representative appointment logistics for non-EU organizations (Art. 27)
572- Binding Corporate Rules (BCR) application or approval process
573- German Landesdatenschutzgesetze (state-level data protection laws) beyond general guidance
574
575**Important Notes:**
576- GDPR enforcement fines reached EUR 2.3 billion in 2025, a 38% year-over-year increase; healthcare violations spiked with average penalties of EUR 203,000
577- The EU AI Act creates dual obligations for AI systems processing personal data -- both DPIA (GDPR Art. 35) and conformity assessment (AI Act) may apply simultaneously
578- Dark patterns in consent interfaces are under heightened enforcement scrutiny; regulators are penalizing cookie walls, manipulative UI, and buried reject options
579
580---
581
582## Integration Points
583
584| Skill | Integration | When to Use |
585|-------|-------------|-------------|
586| `ccpa-cpra-privacy-expert` | Unified privacy program covering both GDPR and CCPA/CPRA; cross-framework mapping | When organization processes data of both EU residents and California consumers |
587| `eu-ai-act-specialist` | Combined DPIA + AI Act conformity assessment for high-risk AI systems processing personal data | When AI system triggers both GDPR Art. 35 DPIA and EU AI Act high-risk classification |
588| `information-security-manager-iso27001` | ISO 27001 security controls support GDPR Art. 32 security of processing requirements | When implementing technical and organizational measures for personal data protection |
589| `infrastructure-compliance-auditor` | Technical privacy controls validation (encryption, access controls, logging, data masking) | When assessing infrastructure supporting GDPR privacy-by-design requirements |
590| `dora-compliance-expert` | DORA complements GDPR for financial sector ICT systems processing personal data | When financial entity must align DORA ICT security with GDPR data protection requirements |
591
592---
593
594## Tool Reference
595
596### gdpr_compliance_checker.py
597
598Scans codebases for potential GDPR compliance issues including personal data patterns and risky code practices.
599
600| Flag | Required | Description |
601|------|----------|-------------|
602| `<project_dir>` | Yes | Path to project directory to scan |
603| `--json` | No | Output results in JSON format for CI/CD integration |
604| `--output <file>` | No | Export report to specified file path |
605
606**Detects:** Email, phone, IP address, credit card, IBAN, German ID patterns; special category data (health, biometric, religion); risky code patterns (logging PII, missing consent, indefinite retention, unencrypted sensitive data, disabled deletion). **Output:** Compliance score (0-100), risk categorization (critical/high/medium), and prioritized recommendations with GDPR article references.
607
608### dpia_generator.py
609
610Generates Data Protection Impact Assessment documentation following Art. 35 requirements.
611
612| Flag | Required | Description |
613|------|----------|-------------|
614| `--template` | No | Generate blank DPIA input template to stdout |
615| `--input <file>` | Yes (unless `--template` or `--interactive`) | Path to JSON processing activity description |
616| `--output <file>` | No | Export DPIA report to specified file path (markdown format) |
617| `--interactive` | No | Launch interactive mode for guided DPIA creation |
618
619**Features:** Automatic DPIA threshold assessment against Art. 35(3) triggers and WP29 criteria, risk identification based on processing characteristics, legal basis documentation, mitigation recommendations, and markdown report generation.
620
621### data_subject_rights_tracker.py
622
623Manages data subject rights requests under GDPR Articles 15-22 with deadline tracking and response templates.
624
625| Subcommand | Description |
626|------------|-------------|
627| `add` | Add new request (`--type`, `--subject`, `--email` required) |
628| `list` | List all tracked requests |
629| `status` | View or update request status (`--id` required, `--update` to change status) |
630| `report` | Generate compliance report (`--output` for file export) |
631| `template` | Generate response template for specific request (`--id` required) |
632
633| Flag | Description |
634|------|-------------|
635| `--type <right>` | Right type: `access`, `rectification`, `erasure`, `restriction`, `portability`, `objection`, `automated` |
636| `--subject <name>` | Data subject name |
637| `--email <email>` | Data subject email address |
638| `--id <request_id>` | Request identifier (e.g., `DSR-202601-0001`) |
639| `--update <status>` | New status: `received`, `verified`, `in_progress`, `completed`, `denied`, `extended` |
640| `--output <file>` | Export report or template to specified file path |
641
642**Features:** 30-day deadline tracking with overdue alerts, identity verification workflow, response template generation per right type, and compliance reporting with metrics.