Gdpr Compliant
GitHubOfficialFirst committed by mikaelkriefDistributed by GitHub
- Skill
- Guidelines
- Security
- MIT
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured framework for engineers and architects to integrate GDPR compliance into the software development lifecycle. It covers core principles like data minimization, purpose limitation, and storage limitation, while offering actionable rules for API design, logging, encryption, and password management. It includes checklists for PR reviews and guidance on maintaining a Record of Processing Activities (RoPA) and handling Data Subject Requests (DSRs).
What it does
- Provides engineering standards for data minimization and purpose limitation.
- Defines technical requirements for encryption, password hashing, and secrets management.
- Offers a PR review checklist for privacy compliance in data models and infrastructure.
- Outlines implementation patterns for user rights like access, rectification, and erasure.
- Guides the maintenance of a Record of Processing Activities (RoPA).
- Sets rules for secure logging, error handling, and testing with synthetic data.
When to use it
- When designing new APIs, data models, or cloud infrastructure.
- During pull request reviews to ensure privacy compliance.
- When implementing features that handle personal data, user accounts, or analytics.
- When setting up retention policies or automated data deletion jobs.
- When preparing for or responding to Data Subject Requests (DSRs).
- When evaluating the security of authentication flows and logging practices.
Advantages
- Reduces legal and compliance risk by embedding privacy-by-design into code.
- Provides clear, actionable technical rules rather than abstract legal advice.
- Standardizes security practices across different teams and services.
- Simplifies the process of maintaining compliance documentation like the RoPA.
- Promotes data hygiene by enforcing strict retention and minimization.
Usage examples
- “Is this API design GDPR-compliant?”
- The agent will evaluate the API against rules regarding PII in URLs, authentication requirements, and data minimization, providing specific feedback on identified risks.
- “How should I handle user data retention for our new logging service?”
- The agent will suggest appropriate retention periods based on the provided guidelines and recommend implementing automated TTL-based deletion.
- “Review this PR for GDPR compliance.”
- The agent will check the changes against the PR review checklist, flagging issues like hardcoded secrets, missing retention logic, or improper logging of PII.
- “What are the requirements for encrypting sensitive user data?”
- The agent will detail the required encryption standards, including the use of column-level encryption and KMS-backed key management.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/github/gdpr-compliant/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip gdpr-compliant.zip -d .agents/skills
Documentation by mikaelkrief
GDPR Engineering Skill
Actionable GDPR reference for engineers, architects, DevOps, and tech leads. Inspired by CNIL developer guidance and GDPR Articles 5, 25, 32, 33, 35.
Golden Rule: Collect less. Store less. Expose less. Retain less.
For deep dives, read the reference files in references/:
references/data-rights.md— user rights endpoints, DSR workflow, RoPAreferences/security.md— encryption, hashing, secrets, anonymizationreferences/operations.md— cloud, CI/CD, incident response, architecture patterns
1. Core GDPR Principles (Article 5)
| Principle | Engineering obligation |
|---|---|
| Lawfulness, fairness, transparency | Document legal basis for every processing activity in the RoPA |
| Purpose limitation | Data collected for purpose A MUST NOT be reused for purpose B without a new legal basis |
| Data minimization | Collect only fields with a documented business need today |
| Accuracy | Provide update endpoints; propagate corrections to downstream stores |
| Storage limitation | Define TTL at schema design time — never after |
| Integrity & confidentiality | Encrypt at rest and in transit; restrict and audit access |
| Accountability | Maintain evidence of compliance; RoPA ready for DPA inspection at any time |
2. Privacy by Design & by Default
MUST
Add
CreatedAt,RetentionExpiresAtto every table holding personal data at creation time.Default all optional data collection to off. Users opt in; they never opt out of a default-on setting.
Conduct a DPIA before building high-risk processing (biometrics, health data, large-scale profiling, systematic monitoring).
Update the RoPA with every new feature that introduces a processing activity.
Sign a DPA with every sub-processor before data flows to them.
MUST NOT
Ship a new data collection feature without a documented legal basis.
Enable analytics, tracking, or telemetry by default without explicit consent.
Store personal data in a system not listed in the RoPA.
3. Data Minimization
MUST
Map every DTO/model field to a concrete business need. Remove undocumented fields.
Use separate DTOs for create, read, and update — never reuse the same object.
Return only what the caller is authorized to see — use response projections.
Mask sensitive values at the edge: return
****1234for card numbers, never the full value.Exclude sensitive fields (DOB, national ID, health) from default list/search projections.
MUST NOT
Log full request/response bodies if they may contain personal data.
Include personal data in URL path segments or query parameters (CDN logs, browser history).
Collect
dateOfBirth, national ID, or health data without an explicit legal basis.
4. Purpose Limitation
MUST
Document the purpose of every processing activity in code comments and in the RoPA.
Obtain a new legal basis or perform a compatibility analysis before reusing data for a secondary purpose.
MUST NOT
Share personal data collected for service delivery with advertising networks without explicit consent.
Use support ticket content to train ML models without a separate legal basis and user notice.
5. Storage Limitation & Retention
MUST
Every table holding personal data MUST have a defined retention period.
Enforce retention automatically via a scheduled job (Hangfire, cron) — never a manual process.
Anonymize or delete data when retention expires — never leave expired data silently in production.
Recommended defaults
| Data type | Max retention |
|---|---|
| Auth / audit logs | 12–24 months |
| Session / refresh tokens | 30–90 days |
| Email / notification logs | 6 months |
| Inactive user accounts | 12 months after last login → notify → delete |
| Payment records | As required by tax law (7–10 years), minimized |
| Analytics events | 13 months |
SHOULD
Add
RetentionExpiresAtcolumn — compute at insert time.Use soft-delete (
DeletedAt) with a scheduled hard-delete after the erasure request window (30 days).
MUST NOT
Retain personal data indefinitely "in case it becomes useful later."
6. API Design Rules
MUST
MUST NOT include personal data in URL paths or query parameters.
GET /users/{userId}
Authenticate all endpoints that return or accept personal data.
Extract the acting user's identity from the JWT — never from the request body.
Validate ownership on every resource:
if (resource.OwnerId != currentUserId) return 403.Use UUIDs or opaque identifiers — never sequential integers as public resource IDs.
SHOULD
Rate-limit sensitive endpoints (login, data export, password reset).
Set
Referrer-Policy: no-referrerand an explicitCORSallowlist.
MUST NOT
Return stack traces, internal paths, or database errors in API responses.
Use
Access-Control-Allow-Origin: *on authenticated APIs.
7. Logging Rules
MUST
Anonymize IPs in application logs — mask last octet (IPv4) or last 80 bits (IPv6).
192.168.1.xxx
MUST NOT log: passwords, tokens, session IDs, credentials, card numbers, national IDs, health data.
MUST NOT log full request/response bodies where PII may be present.
Enforce log retention — purge automatically after the defined period.
SHOULD
Log events not data:
"User {UserId} updated email"not"Email changed from [email protected] to [email protected]".Use structured logging (JSON) with
userIdas an internal identifier, not the email address.Separate audit logs (sensitive access, admin actions) from application logs — different retention and ACLs.
8. Error Handling
MUST
Return generic error messages — never expose stack traces, internal paths, or DB errors.
"Column 'email' violates unique constraint on table 'users'""A user with this email address already exists."
Use Problem Details (RFC 7807) for all error responses.
Log the full error server-side with a correlation ID; return only the correlation ID to the client.
MUST NOT
Include file paths, class names, or line numbers in error responses.
Include personal data in error messages (e.g., "User [email protected] not found").
9. Encryption (summary — see references/security.md for full detail)
| Scope | Minimum standard |
|---|---|
| Standard personal data | AES-256 disk/volume encryption |
| Sensitive data (health, financial, biometric) | AES-256 column-level + envelope encryption via KMS |
| In transit | TLS 1.2+ (prefer 1.3); HSTS enforced |
| Keys | HSM-backed KMS; rotate DEKs annually |
MUST NOT allow TLS 1.0/1.1, null cipher suites, or hardcoded encryption keys.
10. Password Hashing
MUST
Use Argon2id (recommended) or bcrypt (cost ≥ 12). Never MD5, SHA-1, or SHA-256.
Use a unique salt per password. Store only the hash.
MUST NOT
Log passwords in any form. Transmit passwords in URLs. Store reset tokens in plaintext.
11. Secrets Management
MUST
Store all secrets in a KMS: Azure Key Vault, AWS Secrets Manager, GCP Secret Manager, or HashiCorp Vault.
Use pre-commit hooks (
gitleaks,detect-secrets) to prevent secret commits.Rotate secrets on developer offboarding, annual schedule, or suspected compromise.
.gitignore MUST include: .env, .env.*, *.pem, *.key, *.pfx, *.p12, secrets/
MUST NOT
Commit secrets to source code. Store secrets as plain-text environment variable defaults.
12. Anonymization & Pseudonymization (summary — see references/security.md)
Anonymization = irreversible → falls outside GDPR scope. Use for retained records after erasure.
Pseudonymization = reversible with a key → still personal data, reduced risk.
When erasing a user, anonymize records that must be retained (financial, audit) rather than deleting them.
Store the pseudonymization key in the KMS — never in the same database as the pseudonymized data.
MUST NOT call data "anonymized" if re-identification is possible through linkage attacks.
13. Testing with Fake Data
MUST
MUST NOT use production personal data in dev, staging, or CI environments.
MUST NOT restore production DB backups to non-production without scrubbing PII first.
Use synthetic data generators:
Bogus(.NET),Faker(JS/Python/Ruby).Use
@example.comfor all test email addresses.
14. Anti-Patterns
| Anti-pattern | Correct approach |
|---|---|
| PII in URLs | Opaque UUIDs as public identifiers |
| Logging full request bodies | Log structured event metadata only |
| "Keep forever" schema | TTL defined at design time |
| Production data in dev/test | Synthetic data + scrubbing pipeline |
| Shared credentials across teams | Individual accounts + RBAC |
| Hardcoded secrets | KMS + secret manager |
Access-Control-Allow-Origin: * on auth APIs | Explicit CORS allowlist |
| Storing consent with profile data | Dedicated consent store |
| PII in GET query params | POST body or authenticated session |
| Sequential integer IDs in public URLs | UUIDs |
| "Anonymized" data with quasi-identifiers | Apply k-anonymity, test linkage resistance |
| Mixing backup regions outside EEA | Explicit region lockdown on backup jobs |
15. PR Review Checklist
Data model
Every new PII column has a documented purpose and retention period.
Sensitive fields (health, financial, national ID) use column-level encryption.
No sequential integer PKs as public-facing identifiers.
API
No PII in URL paths or query parameters.
All endpoints returning personal data are authenticated.
Ownership checks present — user cannot access another user's resource.
Rate limiting applied to sensitive endpoints.
Logging
No passwords, tokens, or credentials logged.
IPs anonymized (last octet masked).
No full request/response bodies logged where PII may be present.
Infrastructure
No public storage buckets or public-IP databases.
New cloud resources tagged with
DataClassification.Encryption at rest enabled for new storage resources.
New geographic regions for data storage are EEA-compliant or covered by SCCs.
Secrets & CI/CD
No secrets in source code or committed config files.
New secrets added to KMS and secrets inventory document.
CI/CD secrets masked in pipeline logs.
Retention & erasure
Retention enforcement job or policy covers new data store or field.
Erasure pipeline updated to cover new data store.
User rights & governance
Data export endpoint includes any new personal data field.
RoPA updated if a new processing activity is introduced.
New sub-processors have a signed DPA and a RoPA entry.
DPIA triggered if the change involves high-risk processing.
Golden Rule: Collect less. Store less. Expose less. Retain less.
Every byte of personal data you do not collect is a byte you cannot lose, cannot breach, and cannot be held liable for.
Inspired by CNIL developer GDPR guidance, GDPR Articles 5, 25, 32, 33, 35, ENISA, OWASP, and NIST engineering best practices.
Files
- ATTRIBUTION.mdAdded by AutoGineer867 B
- LICENSELicence file added by AutoGineer1.0 KiB
- SKILL.md11.6 KiB
- references/Security.md11.6 KiB
- references/data-rights.md6.4 KiB
references/data-rights.md
GDPR Reference — Data Rights, Accountability & Governance
Load this file when you need implementation detail on: user rights endpoints, Data Subject Request (DSR) workflow, Record of Processing Activities (RoPA), consent management.
User Rights Implementation (Articles 15–22)
Every right MUST have a tested API endpoint or documented back-office process before the system goes live. Respond to verified requests within 30 calendar days.
| Right | Article | Engineering implementation |
|---|---|---|
| Right of access | 15 | GET /api/v1/me/data-export — all personal data, JSON or CSV |
| Right to rectification | 16 | PUT /api/v1/me/profile — propagate to all downstream stores |
| Right to erasure | 17 | DELETE /api/v1/me — scrub all stores per erasure checklist |
| Right to restriction | 18 | ProcessingRestricted flag on user record; gate non-essential processing |
| Right to portability | 20 | Same as access endpoint; structured, machine-readable (JSON) |
| Right to object | 21 | Opt-out endpoint for legitimate-interest processing; honor immediately |
| Automated decision-making | 22 | Expose a human review path + explanation of the logic |
Erasure Checklist — MUST cover all stores
When DELETE /api/v1/me is called, the erasure pipeline MUST scrub:
Primary relational database (anonymize or delete rows)
Read replicas
Search index (Elasticsearch, Azure Cognitive Search, etc.)
In-memory cache (Redis, IMemoryCache)
Object storage (S3, Azure Blob — profile pictures, documents)
Email service logs (Brevo, SendGrid — delivery logs)
Analytics platform (Mixpanel, Amplitude, GA4 — user deletion API)
Audit logs (anonymize identifying fields — do not delete the event)
Backups (document the backup TTL; accept that backups expire naturally)
CDN edge cache (purge if personal data may be cached)
Third-party sub-processors (trigger their deletion API or document the manual step)
Data Export Format (GET /api/v1/me/data-export)
{
"exportedAt": "2025-03-30T10:00:00Z",
"subject": {
"id": "uuid",
"email": "[email protected]",
"createdAt": "2024-01-15T08:30:00Z"
},
"profile": { ... },
"orders": [ ... ],
"consents": [ ... ],
"auditEvents": [ ... ]
}MUST be machine-readable (JSON preferred, CSV acceptable).
MUST NOT be a PDF screenshot or HTML page.
MUST include all stores listed in the RoPA for this user.
DSR Tracker (back-office)
Implement a Data Subject Request tracker with:
Incoming request date
Request type (access / rectification / erasure / portability / restriction / objection)
Verification status (identity confirmed y/n)
Deadline (received date + 30 days)
Assigned handler
Completion date and outcome
Notes
Automate the primary store scrubbing; document manual steps for third-party stores.
Record of Processing Activities (RoPA)
Maintain as a living document (Markdown, YAML, or JSON) version-controlled in the repo. Update with every new feature that introduces a processing activity.
Minimum fields per processing activity
- name: "User account management"
purpose: "Create and manage user accounts for service access"
legalBasis: "Contract (Art. 6(1)(b))"
dataSubjects: ["Registered users"]
personalDataCategories: ["Name", "Email", "Password hash", "IP address"]
recipients: ["Internal engineering team", "Brevo (email delivery)"]
retentionPeriod: "Account lifetime + 12 months"
transfers:
outside_eea: true
safeguard: "Brevo — Standard Contractual Clauses (SCCs)"
securityMeasures: ["TLS 1.3", "AES-256 at rest", "bcrypt password hashing"]
dpia_required: falseLegal basis options (Art. 6)
| Basis | When to use |
|---|---|
Contract (6(1)(b)) | Processing necessary to fulfill the service contract |
Legitimate interest (6(1)(f)) | Fraud prevention, security, analytics (requires balancing test) |
Consent (6(1)(a)) | Marketing, non-essential cookies, optional profiling |
Legal obligation (6(1)(c)) | Tax records, anti-money-laundering |
Vital interest (6(1)(d)) | Emergency situations only |
Public task (6(1)(e)) | Public authorities |
Consent Management
MUST
Store consent as an immutable event log, not a mutable boolean flag.
Record: what was consented to, when, which version of the privacy policy, the mechanism.
Load analytics / marketing SDKs conditionally — only after consent is granted.
Provide a consent withdrawal mechanism as easy to use as the consent grant.
Consent store schema (minimum)
CREATE TABLE ConsentRecords (
Id UUID PRIMARY KEY,
UserId UUID NOT NULL,
Purpose VARCHAR(100) NOT NULL, -- e.g. "marketing_emails", "analytics"
Granted BOOLEAN NOT NULL,
PolicyVersion VARCHAR(20) NOT NULL,
ConsentedAt TIMESTAMPTZ NOT NULL,
IpAddressHash VARCHAR(64), -- HMAC-SHA256 of anonymized IP
UserAgent VARCHAR(500)
);MUST NOT
MUST NOT pre-tick consent checkboxes.
MUST NOT bundle consent for marketing with consent for service delivery.
MUST NOT make service access conditional on marketing consent.
MUST NOT use dark patterns (e.g., "Accept all" prominent, "Reject" buried).
Sub-processor Management
Maintain a sub-processor list updated with every new SaaS tool or cloud service that touches personal data.
Minimum fields per sub-processor:
| Field | Example |
|---|---|
| Name | Brevo |
| Service | Transactional email |
| Data categories transferred | Email address, name, email content |
| Processing location | EU (Paris) |
| DPA signed | 2024-01-10 |
| DPA URL / reference | [link] |
| SCCs applicable | N/A (EU-based) |
MUST review the sub-processor list annually and upon any change. MUST NOT allow data to flow to a new sub-processor before a DPA is signed.
DPIA Triggers (Article 35)
A DPIA is mandatory before processing that is likely to result in a high risk. Triggers include:
Systematic and extensive profiling with significant effects on individuals
Large-scale processing of special category data (health, biometric, racial origin, sexual orientation, religion)
Systematic monitoring of publicly accessible areas (CCTV, location tracking)
Processing of children's data at scale
Innovative technology with unknown privacy implications
Matching or combining datasets from multiple sources
When in doubt: conduct the DPIA anyway. Document the outcome.
Requirements and compatibility
Written for: GitHub Copilot
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- First committed by
mikaelkrief
- Publisher
- GitHub (Official)
- Distributed by
- GitHub
- Source
- github/awesome-copilot · skills/gdpr-compliant · commit 797337f
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
- Contributors
- mikaelkrief
AutoGineer is not affiliated with or endorsed by mikaelkrief or GitHub.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download gdpr-compliant.zip