Install
openclaw skills install @bergschloss/dsgvo-auditMulti-phase DSGVO/GDPR compliance audit skill and task list for agentic QA systems (Germany). Scans database schemas, controller files, auth, subject rights (export/erasure), log/stream leakage, and third-party processor integrations for GDPR/DSGVO compliance surface. Use when invoked as /dsgvo-audit, or asked for "DSGVO-Prüfung", "GDPR audit", "dsgvo check", or "compliance check".
openclaw skills install @bergschloss/dsgvo-auditUse this skill when the user invokes /dsgvo-audit, asks for:
Default behavior when invoked without a scope argument: run the full 7-phase audit sequentially on the entire repository. When a scope is provided (e.g. /dsgvo-audit Scope: auth-registration), run only the phases relevant to that scope and note which phases were skipped.
STRICT READ-ONLY: Never modify, refactor, or create files inside the project repository. Only write reports to $outDir under _Reports.
For security/auth/crypto depth — use forensic-audit. For UX/product logic — use product-ux-audit. This skill focuses exclusively on DSGVO/GDPR compliance surface.
Adaptation Tip: Replace the stack description below with your own target application components.
Always carry this context through every phase — do not re-derive:
| Layer | Example Tech / Scope | DSGVO Relevance & Focus |
|---|---|---|
| Frontend | Next.js / React / Vue | Consent collection, cookies, privacy notice, Impressum |
| API / Backend | Fastify / Express / NestJS | Data processing, endpoints, backend validation, logs |
| Database | Prisma schema / PostgreSQL / MySQL | PII model definitions, cascades, retention, encryption |
| Desktop / Client apps | Electron / Native Clients | Local PII storage, credentials caching |
| Payment Gateway | Stripe / PayPal / Braintree | Art. 28 DPA (AVV), billing PII, webhook security |
| Communications | Twilio / SendGrid / Mailgun | SMS/Email sending, Art. 28, opt-out mechanisms |
| Event Streams | SSE / WebSockets / RabbitMQ | PII leakage in live message payloads |
| Background Workers | Cron jobs / BullMQ / Celery | Retention enforcement, automated deletion/anonymization |
Task list: Create a TaskCreate entry for each phase. Mark each in_progress when starting, completed when the phase file is verified. Never mark a phase complete without file verification.
Resolve output path:
Windows (PowerShell):
$outDir = "$env:USERPROFILE\Desktop\_Reports\dsgvo-audit_$(Get-Date -Format 'yyyy-MM-dd_HHmm')"
New-Item -ItemType Directory -Force -Path $outDir
Linux / macOS (bash):
outDir="$HOME/Desktop/_Reports/dsgvo-audit_$(date +%Y-%m-%d_%H%M)"
mkdir -p "$outDir"
Abort if creation fails.
Repo context (embed in every report header):
git rev-parse --short HEAD
git branch --show-current
git status --short
PII Quick Scan (run before Phase 0 to orient findings):
# Personal data patterns in source
rg -i "email|phone|telefon|name|address|adresse|geburtstag|birthdate|iban|kontonummer" \
--type ts --type tsx -l
# PII in console.log / app.log
rg "console\.(log|error|warn)\(.*?(email|phone|name|token|password|rustdesk)" \
--type ts -l
# PII in SSE event payloads
rg "reply\.raw\.write|res\.write|sendEvent" --type ts -l
# Hardcoded PII or secrets in source
rg -i "password\s*=\s*['\"][^'\"]{4,}|api_key\s*=\s*['\"]|secret\s*=\s*['\"]" \
--type ts -l
# Missing DSGVO endpoints
rg "dsgvo|gdpr|delete-account|export|auskunft|loeschung" \
--type ts -i -l
# RustDesk credential storage
rg "rustdesk|rdPassword|rdId|remoteId|accessCode" --type ts -l
# Consent logging
rg "consent|einwilligung|zustimmung|agreed|acceptedAt" --type ts -l
# TODO/FIXME markers in DSGVO-adjacent code
rg "TODO|FIXME|HACK" --type ts | rg -i "dsgvo|gdpr|delete|consent|privacy|datenschutz"
Schema snapshot:
cat packages/db/prisma/schema.prisma
# or:
rg --files | rg "schema\.prisma"
Read the full schema — it defines the PII surface.
# [Phase Title]
**Date**: YYYY-MM-DD HH:MM
**Repo**: [repo root path]
**Git HEAD**: [short hash] ([branch])
**Dirty files**: [git status --short output or "clean"]
**Auditor role**: [role for this phase]
---
[file:line] SEVERITY — short title
**Observed**: what the code actually does (cite file:line)
**DSGVO Article**: Art. XX — what it requires
**Gap**: what is missing or broken
**Risk**: concrete consequence (fine, complaint, data breach)
**Fix direction**: concrete next step (no full rewrites)
Severity: CRITICAL (Art. violation, fine risk > €20k) / HIGH (likely violation, complaint risk) / MEDIUM (gap, best-practice miss) / LOW (minor, documentation gap) / NOTE.
→ see Phase N: [brief label] instead of repeating the full finding. Ownership:
forensic-audit.file:line from the other.Role: EU Data Protection Officer. Task: Create a complete map of what personal data the target project collects, where it lives, and under what legal basis.
Read schema.prisma (find via rg --files | rg schema.prisma). For every model, identify:
@db.Text, encryption marker, or is stored plaintextonDelete behavior — does cascade wipe PII or leave orphaned records?RustDesk-specific: rdId, rdPassword, accessCode, or equivalent fields — these grant access to a private computer and qualify as sensitive data requiring heightened protection (Art. 9(1) analogy or at minimum Art. 32 strong encryption).
For each PII category found in PASS 1, trace:
apps/web, apps/api, Electron apps)Check Fastify route files and SSE handler for PII appearing in:
console.log / app.log / fastify.logreply.raw.write(...))Deliverable: $outDir\audit_0_pii-inventory.md
Verify write: file must exist and be > 500 bytes before Phase 1 begins.
Role: EU DPO + DSGVO-Anwalt. Fresh pass — re-read relevant files; do not rely on Phase 0 memory.
For each PII category from Phase 0, determine which legal basis is claimed in practice:
lit. b (Vertragserfüllung): processing necessary to deliver the servicelit. c (rechtliche Verpflichtung): legal obligation (tax, commercial law)lit. f (berechtigtes Interesse): legitimate interest — is a balancing test documented?lit. a (Einwilligung): consent — see PASS 2Check: is the legal basis actually documented anywhere in the codebase (comments, Datenschutzerklärung, database)? Or is it assumed?
apps/web for: cookie banner, consent state storage, consent withdrawal mechanism.RustDesk grants access to a private computer — this may constitute processing of data revealing private life and requires a specific Art. 9(2) exception or at minimum an explicit consent (Art. 9(2)(a)).
Check whether:
Are data collected for one purpose used for another? Check:
Deliverable: $outDir\audit_1_legal-basis.md
Verify write: > 500 bytes before Phase 2.
Role: EU DPO + QA Automation Lead. Fresh pass.
For Germany: all requests must be fulfilled within 1 calendar month (Art. 12(3)). Deadline runs from receipt. Extension to 3 months possible if complex — but user must be informed within month 1.
Find the data export/access endpoint (likely GET /api/dsgvo/export or similar):
Find the account deletion endpoint (likely POST /api/dsgvo/delete-account):
userId/clientId relation — does onDelete: Cascade or onDelete: SetNull apply, or is the delete manual?Deliverable: $outDir\audit_2_subject-rights.md
Verify write: > 500 bytes before Phase 3.
Role: EU DPO + Principal DBA. Fresh pass.
proactive-outreach.ts and other cron files for any deletion logicWhen an account is "deleted", does the system:
[deleted] / null / hash)?
If anonymization: is it complete? No re-identification risk from remaining fields?Deliverable: $outDir\audit_3_retention.md
Verify write: > 500 bytes before Phase 4.
Role: EU DPO + Contract Lawyer (DE). Fresh pass.
This is the highest-risk processor:
apps/api or apps/desktop — what relay/rendezvous server is configured?apps/web (Google Analytics, Plausible, etc.)? Check layout.tsx, _app.tsx, script tags.Deliverable: $outDir\audit_4_processors.md
Verify write: > 500 bytes before Phase 5.
Role: EU DPO + Security Engineer.
Fresh pass. NOT a full security audit — defer depth to forensic-audit. Focus on DSGVO Art. 32 minimum.
rdId, rdPassword) in database: encrypted or plaintext? Find the field and check for encryption helper usage.DATABASE_URL contains sslmode=require?)apps/web and apps/api endpoints?apps/desktop (client-facing) access other clients' data via API? Check ownership guards./api/admin/*): role-checked, or any authenticated user can call them?Deliverable: $outDir\audit_5_technical-measures.md
Verify write: > 500 bytes before Phase 6.
Role: EU DPO. Fresh pass.
Check the target project against EDPB WP248 rev.01 criteria to determine if a DPIA is required (e.g. due to remote computer access, systematic monitoring, processing of sensitive/location data, or vulnerable data subjects like children or elderly):
| Criterion | Project Specifics | Triggered? |
|---|---|---|
| Evaluation/scoring of persons | e.g. credit rating, performance evaluation | Check |
| Automated decision-making | e.g. automated routing, profiling | Check |
| Systematic monitoring | e.g. screen access, location tracking | Check |
| Sensitive/special category data | e.g. biometric data, medical data, access credentials | Check |
| Large scale | e.g. large volume of data subjects | Check |
| Matching/combining datasets | e.g. merging user behavior data | Check |
| Vulnerable subjects | e.g. children, patients, employees | Check |
| New technology | e.g. machine learning, advanced telemetry | Check |
| Transfer to third countries | e.g. data transfer outside EEA | Check |
If ≥ 2 criteria: DPIA is mandatory. Flag as CRITICAL if no DPIA exists.
Check apps/web for Impressum page (likely /impressum route):
Check apps/web for Datenschutzerklärung page:
Deliverable: $outDir\audit_6_dpia-impressum.md
Verify write: > 500 bytes before Final.
Before writing the master summary, validate every CRITICAL and HIGH finding from all phases.
If subagents are available: spawn one fresh subagent (no shared context, read-only) per batch of findings (5–10 findings per batch). Give it only the finding text + repo path — not your reasoning. Use this prompt template:
"You are a DSGVO compliance reviewer with no prior context. Read the file at [repo path] and locate [file:line]. Verify the following finding against the actual code. Answer for each finding: Confirmed, Overstated (suggest downgraded severity and reason), or Not an issue (drop, with reason). Do not guess — cite the actual line you read. Finding: [paste full finding block]"
If subagents are not available: re-read the cited file:line yourself with fresh eyes and apply the same three-way verdict.
Apply the verdicts (drop/downgrade/keep) before building the rollup table. Note in the master summary how many findings were dropped/downgraded and why — this is a signal of audit quality, not a failure.
Write $outDir\audit_master_summary.md:
# DSGVO Audit — Master Summary
**Date**: YYYY-MM-DD
**Project**: [Project Name]
**Git HEAD**: [hash] ([branch])
## Compliance Score
[N]/100 — calculated as: 100 minus (CRITICAL×20, HIGH×10, MEDIUM×5, LOW×1)
## Severity Rollup
| Phase | CRITICAL | HIGH | MEDIUM | LOW | NOTE |
|---------------------------|----------|------|--------|-----|------|
| 0 PII Inventory | N | N | N | N | N |
| 1 Legal Basis & Consent | N | N | N | N | N |
| 2 Data Subject Rights | N | N | N | N | N |
| 3 Retention | N | N | N | N | N |
| 4 Third-Party Processors | N | N | N | N | N |
| 5 Technical Measures | N | N | N | N | N |
| 6 DPIA / Impressum / DSE | N | N | N | N | N |
| TOTAL | N | N | N | N | N |
## Top 5 Critical/High Findings
1. [file:line] CRITICAL — ...
2. ...
## Quick Wins (fixable in < 1 day)
- ...
## Structural Fixes (require planning)
- ...
## DPIA Required?
[YES/NO/UNCERTAIN — with rationale]
## Bußgeldrisiko (Art. 83 DSGVO)
[LOW / MEDIUM / HIGH — with rationale]
Then concatenate all phase files into:
$outDir\FINAL_dsgvo-audit_$(Get-Date -Format 'yyyy-MM-dd_HHmm').md
Order: master summary → phase 0 → 1 → 2 → 3 → 4 → 5 → 6. Separate with --- and # Phase N: [title] headings.
DSGVO/GDPR Audit completed. Saved to: [outDir]
Files:
- audit_0_pii-inventory.md
- audit_1_legal-basis.md
- audit_2_subject-rights.md
- audit_3_retention.md
- audit_4_processors.md
- audit_5_technical-measures.md
- audit_6_dpia-impressum.md
- audit_master_summary.md
- FINAL_dsgvo-audit_[timestamp].md
Compliance Score: [N]/100
DPIA Required: [YES/NO/UNCERTAIN]
Regulatory Fine Risk: [LOW/MEDIUM/HIGH]
forensic-audit.name in a product model). The Challenge Pass filters these before the final report — do not skip it.file:line. No speculation framed as fact.in_progress when beginning, completed after file verification.%USERPROFILE%\Desktop\_Reports, request it using ask_permission for write_file with the target path, or execute file write operations via the run_command tool in PowerShell.