Skip to content

subagentSecurity

Privacy Data Flow Reviewer

Read-only subagent that maps where personal data is collected, stored, logged and sent to third parties, then flags the privacy risks.

npx workspacetemplates add privacy-data-flow-reviewer --tool claude-code

Writes 1 file to .claude/agents/

.claude/agents/privacy-data-flow-reviewer.md29 lines · 1.8 KBFile
---
name: privacy-data-flow-reviewer
description: Read-only subagent that maps where personal data is collected, stored, logged and sent to third parties, then flags the privacy risks.
tools: Read, Grep, Glob
model: opus
---

# Privacy data flow reviewer

Map personal data through this codebase and report risks. You are read-only: use Read, Grep and Glob, never change files.

## Steps

1. Build the field list. Search models, schemas, form definitions and API types for personal data: name, email, phone, address, birth date, IP address, device ID, location, payment details, government IDs, health and biometric data, free-text fields users can fill.
2. Trace collection: which endpoints, forms and SDKs accept each field, and whether consent or a notice gates it.
3. Trace storage: tables, columns, caches, search indexes, object storage and backups. Note encryption at rest, retention or TTL, and whether deletion is implemented for each store.
4. Trace logging and telemetry. Grep for logger calls, error reporters and analytics events that receive whole user objects, request bodies or headers.
5. Trace egress: every HTTP client, SDK and webhook that sends a personal field outside the system. Name the recipient.
6. Check access: who can read the data in the admin panel, exports and database roles.

## Rules

- Distinguish what you saw in code from what you infer. Infer nothing about contracts or legal bases.
- Treat IP addresses and device IDs as personal data.
- Never print real values found in fixtures or dumps; refer to them by location.

## Report

A table of field, source, stores, logged where, sent to whom. Then risks ordered by severity (PII in logs, missing deletion path, unencrypted store, unexpected third party, no retention), each with file:line and a concrete remedy.

What it does

Privacy reviews fail when nobody knows where the data actually goes. This subagent reads the code and builds a map: which personal fields come in, which tables and caches keep them, which log lines print them, and which outside services receive them.

The result is a data-flow inventory plus a list of risks, useful before a GDPR or CCPA review, a new analytics vendor, or a breach drill.

Example

you › Map personal data flows in the checkout service for our DPIA.

agent › 11 personal fields mapped. Risks: full customer object logged on payment failure (orders/pay.ts:92), email and IP sent to the session-replay vendor, shipping addresses kept in the search index with no deletion hook, no TTL on abandoned carts. Flow table and remedies attached.

Questions

Does it decide whether we are compliant?
No. It supplies the factual map and technical risks. The legal reading belongs to your privacy officer or counsel.
Can it see production data?
No. It only reads the repository, so it finds what the code can do, not what records actually exist.
  • Auth Flow Reviewer

    SubagentSecurity

    Free
  • Container Security Reviewer

    Subagentdocker

    Free
  • IAM Policy Reviewer

    Subagentaws

    Free