/cybersecurity-skills:privacy-engineeringfrom cybersecurity-skills
Implements and audits privacy controls at code, data, and infrastructure layers — GDPR, CCPA, LGPD, PIPEDA. Covers data minimization, consent, DSARs, DPIA, breach notification, and right-to-be-forgotten across backups and third parties.
Ships in cybersecurity-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Implement privacy controls at the code, data, and infrastructure layers. This skill is not legal compliance theater — it is the engineering work that turns the legal requirements into systems that actually do what they claim.
Privacy and security overlap but are not the same. Security protects against unauthorized access; privacy protects against authorized-but-improper use. A perfectly secure system that logs every keystroke and shares the log with vendors is a privacy disaster. This skill covers the privacy half of that distinction.
Cross-references: owasp-audit for the security side, iam-audit for access control to personal data, secrets-audit for credential handling, incident-triage for the response side of a privacy breach (72-hour GDPR notification clock starts when you find out, not when you finish investigating), security-comms for the customer-disclosure draft.
Review systems the user's organization owns or has engaged them to review. Trace data flows through schemas, code, configs and synthetic records, not by pulling real personal data. If you find personal data where it shouldn't be, record the location and category without copying the values. Legal conclusions (lawful basis, whether a breach is notifiable) belong to the DPO and counsel.
The skill produces compliant technical implementations. Final compliance determinations stay with counsel; this skill is the technical execution layer.
| Regulation | Scope | Key engineering hooks |
|---|---|---|
| GDPR (EU) | Any processing of personal data of EU/EEA residents | Articles 5 (principles), 6 (lawful basis), 7 (consent), 15-22 (data subject rights), 25 (privacy by design), 30 (records of processing), 32 (security), 33 (breach notification — 72 hours), 35 (DPIA) |
| CCPA / CPRA (California) | Businesses processing CA resident data above thresholds | Right to know, delete, correct, opt out of sale / share. Sensitive PI category. Annual privacy notice. Service-provider contracts |
| LGPD (Brazil) | Brazilian residents | Similar shape to GDPR with local twists |
| PIPEDA (Canada) | Federal commercial | Consent-based with reasonable expectation, breach notification |
| State laws (US) | Varies — VA, CO, CT, UT, etc. | Roughly CCPA-shaped; engineering practices that meet GDPR + CCPA usually cover state laws |
Engineering reality: build for the strictest regime that applies and stop worrying about the rest. GDPR is the strictest in most dimensions; CCPA adds the "opt out of sale / share" and sensitive-PI category.
You cannot enforce privacy on data you have not classified. Every data store needs a classification.
A minimal classification (more is fine, less is not):
| Class | Definition | Engineering treatment |
|---|---|---|
| Public | Information published or freely sharable | No special handling |
| Internal | Internal business data, no PI | Standard access controls |
| Personal | Data identifying a natural person (email, name, IP, device ID, account ID) | Access logging, retention limits, deletion path |
| Sensitive personal | GDPR Art 9 special categories (health, biometric, political, sexual orientation, race, religion), CCPA SPI (precise location, race, religion, biometric, genetic, sex life, mail content, government ID, financial account, citizenship, union membership) | Stricter access (need-to-know), encryption at rest with separate KMS key, audit on every read |
| Regulated | PHI under HIPAA, PCI cardholder data, NPI under GLBA | Regulation-specific controls; out of scope here, see hipaa-audit and pci-audit |
Audit step: for each data store (database, S3 bucket, BigQuery dataset, etc.), confirm classification is documented and matches the actual data. Many systems start "internal" and quietly become "personal" because someone added an email column.
Collect the minimum to deliver the service; retain the minimum to deliver value; share the minimum with vendors.
Common minimization findings:
Audit grep patterns:
email, phone, name, address, ssn, dob, birth, gender, ip, user_agent, device_id, ip_addresslog\..*\$\{user\.email\}, console\.log\(.*user\., logger\.info\(.*emailanalytics\.identify\(.*email, full-page URL parametersEvery processing activity needs a documented lawful basis under GDPR Article 6. CCPA requires purpose-of-use disclosure.
Common bases and where they fit:
Engineering hook: the application logs every processing activity (insert into data_processing_log or equivalent) with the lawful basis. When DSARs arrive, this is the source of truth for what to disclose.
Consent is the most over-engineered and under-built part of privacy. The skill is keeping it simple and provable.
The consent record:
Withdrawal of consent must be as easy as granting it (GDPR Art 7(3)). If "accept all" is one click on the cookie banner, "reject all" must also be one click. Banners that require traversing five panels to refuse are non-compliant.
Common audit findings:
Users have rights under GDPR Articles 15-22 and CCPA. The technical implementation often falls down in the same places.
Right to access (Art 15 / CCPA "right to know"): The user gets a copy of personal data held about them. Implementation:
Right to deletion (Art 17 / CCPA "right to delete"): The user gets data deleted. The technical reality is harder than it looks.
Audit grep patterns:
analytics\.track, segment\.identify, sentry\.setUser, mixpanel\.people\.set, datadog.*user, posthog\.identifySentry\.init, analytics\.load, LogRocket\.init, FullStory\.initRight to portability (Art 20): Machine-readable export of data the user provided. Distinct from access — only covers data they gave you, in a structured format. JSON / CSV is fine.
Right to rectification (Art 16 / CCPA "right to correct"): Update incorrect data. Engineering hook: build the correction path into the product; do not require email-to-support.
Right to object (Art 21): Stop processing for direct marketing / specific other purposes. Engineering hook: a suppression list / opt-out flag honored everywhere processing happens.
Audit step: simulate a DSAR end to end against your own account before a real user does. Most teams find broken parts on first try.
Every vendor processing personal data is a sub-processor. GDPR requires a Data Processing Agreement (DPA) with each one and a documented sub-processor list available to users.
Engineering audit:
Common findings:
GDPR Article 33: notify supervisory authority within 72 hours of becoming aware of a personal data breach. Article 34: notify affected individuals without undue delay if breach poses high risk.
Engineering hooks (this skill is for the technical detection / scoping side; legal handles the actual notification):
siem-detection)secrets-audit, incident-triage)Required for high-risk processing (Art 35) — large-scale processing of sensitive data, systematic monitoring, automated decision-making affecting individuals.
Engineering input to a DPIA:
threat-modeling artifact)owasp-audit, iam-audit, crypto-audit outputs)This skill produces the engineering inputs; legal / privacy counsel produces the DPIA itself.
A gap against a mandatory obligation (an Art 17 erasure path that misses a store, tracking that fires before consent,
personal data sent to a vendor beyond the stated purpose) is a finding: the obligation is the intended control. Rate
it by the exposure it creates for the personal data, not by the size of a possible fine. A gap with no exposure (a
record of processing that doesn't list a basis, a retention period that isn't written down but is enforced) is a
documentation gap, and a defense-in-depth gap is a hardening note. Neither goes in findings.json. Close every
candidate with one verdict, as defined in references/findings-format.md:
confirmed: a trace from where personal data enters to where it ends up in breach of the obligation, with no
control on the way. Examples: DELETE /account removes the users row, but nothing calls the Segment deletion API
or removes the Algolia record, so the user's profile stays searchable; Sentry.init({ sendDefaultPii: true }) plus
setUser({ email }) ships every user's email and IP to the error tracker; the analytics snippet loads in the page
head, before the consent banner records a choice.needs_validation: the code supports the claim but one fact lives with legal or in a console. Examples: whether
a DPA is on file for a vendor that receives personal data; the vendor's retention setting, set in its dashboard;
backup retention, set in the cloud console; whether the CDN caches authenticated profile pages. A DSAR or cookie
check you describe but don't run is also needs_validation.rejected: a named control at a named location covers every path. Examples: jobs/erase-user.ts fans out to
every vendor SDK the inventory found; a Sentry beforeSend hook strips user.email and cookies before any event
leaves. A control inside a dependency counts: for an SDK whose default is sendDefaultPii: false and is never
overridden, ruled_out_by.location is the lockfile line that pins the SDK, and control names the default and the
version. "Not reachable" (a vendor SDK that's installed but never initialized) points at the dependency declaration.Run the refutation pass in references/verification.md before confirming anything. A privacy notice, a DPA, or "legal approved it" does not rule out a data flow the code performs; a documented retention period doesn't rule out a store that never purges.
Calibrate severity with references/severity-calibration.md. The affected
principal is the data subject. Sensitive personal data (Practice 1) reaching an ad vendor sits higher than an email
in an error tracker under a DPA. A static trace caps confidence at medium; high needs a reproduced check
("reproduced": true), such as a test-account DSAR whose export or deletion you inspected.
Fingerprint as privacy-engineering/<class>/<file or resource>/<symbol or name>, with <class> one of
classification, minimization, logging-pii, consent, lawful-basis, dsar-access, deletion-fanout,
retention, vendor-sharing, transfer, breach-scoping. Examples:
privacy-engineering/deletion-fanout/src/routes/account.ts/deleteAccount,
privacy-engineering/vendor-sharing/src/lib/sentry.ts/Sentry.init,
privacy-engineering/retention/aws/rds/prod-users-db/backup-retention. No line numbers; write ARNs and host:port
with slashes. Use cwe where one fits (CWE-359 exposure of private personal information, CWE-532 personal data
in logs, CWE-212 data not removed before transfer).
Put domain fields under ext:
ext key | Value | Example |
|---|---|---|
obligation | Regulation and article or section the gap is against | "GDPR Art. 17(1)", "CCPA 1798.105", "GDPR Art. 7(3)" |
data_class | Classification from Practice 1 | "personal", "sensitive_personal" |
processor | The vendor or sub-processor involved, when there is one | "Segment", "Sentry" |
Findings about deployed resources rather than files (a cloud backup policy, a vendor dashboard setting, the cookies
a staging page sets before consent): save the read-only output, redacted, to <audit dir>/evidence/<name>.json or
.txt and point location and evidence[] at that file and line. Never save a personal data value or a secret;
record field names and categories, not contents.
Write findings.json sorted by fingerprint and validate it:
node references/validate-findings.mjs findings.json
Optionally export SARIF: node references/to-sarif.mjs findings.json -o findings.sarif.
Write findings.json first and validate it. The report is rendered from it and never changes a verdict or severity
the JSON doesn't already say.
# Privacy Engineering Audit / Implementation Report
## Scope: [system / product / data flow] ## Regulation context: [GDPR / CCPA / both / other] ## Date: [date]
## findings.json: [path] — validated: [yes]
### Summary
- Confirmed: [N] (Critical [n] | High [n] | Medium [n] | Low [n]) Needs validation: [N] Rejected: [N]
### Confirmed findings
#### [SEVERITY] [Title] `fingerprint`
**Location:** `path:line` **Obligation:** [ext.obligation] **Data class:** [ext.data_class] **Processor:** [ext.processor]
**Confidence:** [medium | high (reproduced)]
**Data flow:** [where the personal data enters → where it ends up]
**Exposure:** [whose data, which fields, who can now see or keep it]
**Fix:** [concrete change]
**Verify the fix:** [the DSAR, deletion or consent check that proves it]
### Needs validation
| Finding | Blockers | Check for the owner (engineering or legal) to run |
|---|---|---|
### Hardening notes (not findings)
- [gap] — [why it isn't a finding] — [effort]
### Documentation gaps (not findings)
- [record of processing, retention schedule, or DPIA input that's missing, with no exposure in the code]
### Rejected (do not re-raise)
| Fingerprint | Ruled out by | Location |
|---|---|---|
### Data inventory
| Data store | Classification | Categories of PI | Lawful basis | Retention |
|------------|----------------|------------------|--------------|-----------|
### DSAR pipeline status
- [ ] Access — implemented and tested end-to-end
- [ ] Deletion — implemented with full fan-out (DBs, caches, search, analytics, vendors)
- [ ] Portability — implemented in machine-readable format
- [ ] Rectification — self-service path exists
- [ ] Objection / opt-out — honored in all processing paths
### Vendor / sub-processor inventory
| Vendor | Purpose | Data shared | DPA | Deletion path | Data residency |
|--------|---------|-------------|-----|---------------|----------------|
### Consent records (if applicable)
[State: present / partial / missing. Storage location. Fields captured.]
### Remediation plan
| Priority | Item | Owner | Deadline |
|---|---|---|---|
Dispositions for confirmed findings (set later, usually by finding-triage): Fixed / Deferred / Accepted Risk /
Mitigated (platform/config) / Requires major migration. Accepted-risk decisions for privacy findings often need legal
sign-off as well as engineering; note this in the writeup.
security-commseur-lex.europa.eu/eli/reg/2016/679ico.org.ukoag.ca.gov/privacy/ccpareferences/ at build time): findings-format.md, findings.schema.json,
validate-findings.mjs, to-sarif.mjs, severity-calibration.md, verification.mdreferences/findings-format.md (opens in a new tab)references/findings.schema.json (opens in a new tab)references/severity-calibration.md (opens in a new tab)references/to-sarif.mjs (opens in a new tab)references/validate-findings.mjs (opens in a new tab)references/verification.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
gdpr, ccpa, data-privacy, privacy-engineering, consent-management, dsar
npx claudepluginhub briiirussell/cybersecurity-skills --plugin cybersecurity-skills42 skills in this plugin
/agent-supply-chain-auditAudit the extensions AI coding agents load and trust (skills, plugins, marketplaces, hooks, settings, MCP servers, and instruction files like CLAUDE.md, AGENTS.md and .cursor/rules) across Claude Code, Cursor, Codex, Gemini CLI and GitHub Copilot. Read-only: inventories each item with its source and pin, greps for hidden instructions, exfiltration, credential reads, persistence, curl|bash and over-broad tool grants, reviews hooks and MCP pinning and tool poisoning, and gives each item a SAFE / CAUTION / DO-NOT-INSTALL verdict. Use when the user mentions 'audit my skills,' 'is this skill malicious,' 'is this skill safe,' 'is this MCP server safe,' 'review CLAUDE.md,' 'review AGENTS.md,' 'plugin security,' 'check my hooks,' 'CODEOWNERS for .claude,' 'audit my MCP servers,' 'agent supply chain,' 'SkillSpector,' 'tool poisoning,' 'rug pull,' 'audit my IDE extensions,' 'is this VS Code extension safe,' 'is this repo safe to open,' or is about to install a skill, plugin, MCP server, or IDE extension./ai-risk-managementApply the NIST AI Risk Management Framework (AI RMF 1.0) and adjacent guidance to AI / ML systems — model lifecycle governance, fairness and bias evaluation, robustness, transparency, accountability, third-party model risk, monitoring for drift, and AI incident response. Broader than prompt-injection (which is the security slice). Use when the user mentions 'AI risk,' 'AI governance,' 'NIST AI RMF,' 'AI compliance,' 'ML governance,' 'model risk management,' 'AI fairness,' 'AI bias,' 'algorithmic accountability,' 'AI Bill of Rights,' 'EU AI Act,' 'AI transparency,' 'model card,' 'AI red-team program,' 'AI safety,' 'responsible AI,' 'model drift,' 'concept drift,' 'AI monitoring,' 'AI incident,' or needs to assess or govern an AI / ML system./api-auditAudit REST, GraphQL, and RPC APIs against the OWASP API Security Top 10 (2023). Use when the user mentions 'API security,' 'API audit,' 'BOLA,' 'broken object level authorization,' 'BFLA,' 'function-level authorization,' 'mass assignment,' 'API rate limiting,' 'GraphQL security,' 'REST security,' 'API authentication,' 'API authorization,' 'excessive data exposure,' 'redact the API transcript,' 'structured identities for a BOLA test,' or needs to review API endpoints for security weaknesses./breach-patternsLearn from public breach disclosures — extract the audit question each one implies and turn it into a checklist for your own stack. Capital One IMDS abuse, LastPass vault exfiltration, Okta Lapsus$, Snowflake credential reuse, MOVEit, SolarWinds, Equifax, Target POS, Codecov, Uber, Twilio, Polymarket's compromised DebugBear script, the OPTIMJACK Optimizely snippet injection — what would you check now if your boss said 'could that happen to us?' Use when the user mentions 'breach analysis,' 'lessons learned,' 'security postmortem,' 'breach patterns,' 'breach lessons,' 'has this happened to us,' 'apply breach lessons,' 'preempt breaches,' 'security retrospective,' 'real-world security incidents,' 'Optimizely compromise,' 'tag manager hacked,' or wants to harden against known attacker playbooks./business-logic-testingTest an authorized web application for business-logic flaws and race conditions — the classes scanners cannot find. Model invariants (conservation of value, uniqueness, monotonicity, exclusivity), build an Actor x Action x Resource matrix, abuse state machines (skip/reorder/replay steps, limit-slicing), find numeric bugs (float-vs-decimal rounding, cross-currency refund arbitrage, negative amounts), stale feature gates, and saga gaps; prove concurrency bugs (double-spend, lost update, idempotency-key reuse) with controlled parallel requests. Use when the user mentions 'business logic testing,' 'race condition,' 'double spend,' 'TOCTOU,' 'concurrency bug,' 'idempotency,' 'coupon reuse,' 'workflow bypass,' 'limit bypass,' 'negative amount,' 'refund arbitrage,' 'parallel request attack,' or 'logic flaw.'/cicd-securityAudit CI/CD pipelines (GitHub Actions; GitLab CI and CircleCI briefly) for paths giving an outsider code execution, secrets or a write token: pull_request_target and workflow_run running untrusted code, expression injection, missing or broad permissions, third-party actions not pinned to a SHA or lockfile, OIDC trust with wildcard subjects, self-hosted runners on public repos, secrets reaching forks, cache and artifact trust, and AI agents in CI reading issue or PR text with a write token, sandbox or not. Runs zizmor and actionlint read-only, writes findings.json. Use when the user mentions 'pull_request_target,' 'pwn request,' 'workflow injection,' 'zizmor,' 'actionlint,' 'pin actions to SHA,' 'actions.lock,' 'workflow lockfile,' 'GITHUB_TOKEN permissions,' 'self-hosted runner,' 'ACTIONS_RUNTIME_TOKEN,' 'stolen write token,' 'bot bypasses branch protection,' 'claude-code-action,' 'AI agent in CI,' 'GitLab CI security,' 'CircleCI security,' 'is this workflow safe,' or needs to secure a build pipeline.Other plugins' skills for the same job