Skip to content
Back to skills

Security

ASecurity

PII detection, data flow mapping, GDPR/CCPA/HIPAA compliance verification

  • 24 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added October 14, 2026
ai-agentsgobashsqlawsapidatabasesecurity

Works with

  • api

Security analysis

A100/100

Pro scans all 21 files and shows the line behind each finding

Scanned November 22, 2026

npx -y skills add andreibesleaga/GABBE --skill security --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Security?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Security
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/andreibesleaga-security-7ec89f9f/badge)](https://www.skillsdirectory.com/skills/andreibesleaga-security-7ec89f9f)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: privacy-audit
description: PII detection, data flow mapping, GDPR/CCPA/HIPAA compliance verification
triggers: [privacy, PII, GDPR, CCPA, HIPAA, personal data, data flow, consent, data protection]
tags: [security]
context_cost: medium
---
# Privacy Audit Skill

## Goal
Ensure no PII leaks, all data flows are documented, and the codebase complies with applicable data protection regulations (GDPR, CCPA, HIPAA). Produce a data flow map and violation list.

## Where it fits
Phase and gate: S02 (data flows), S07 (review), S13 (disposal). Evidence: the data flow map `docs/privacy/data-flow-map.md` and the audit report.

## Steps

1. **Identify applicable regulations**
   - Ask if unclear: "Which regulations apply to this project?" (GDPR, CCPA, HIPAA, PIPEDA, LGPD)
   - GDPR: European users or EU data processing
   - CCPA: California users
   - HIPAA: US healthcare data (PHI)

2. **Scan codebase for PII exposure**

   **Automated scanning:**
   ```bash
   # No Semgrep registry ruleset named p/pii exists (the URL returned 404 on 2026-11-21).
   # Use the grep below, and write project rules if the human wants a scanner.

   # Search for common PII patterns in logs/error handlers
   grep -rn "console.log\|logger\." src/ | grep -i "email\|name\|phone\|address\|ssn\|dob"
   ```

   **Manual checks — scan for these patterns:**
   ```
   In log statements: email, name, phone number, IP address, user ID with PII
   In error messages: SQL errors with PII data, stack traces with user context
   In analytics events: user identifiers beyond anonymized IDs
   In API responses: unnecessary PII fields (returning full user object when only ID needed)
   ```

3. **Map all data flows**

   Create a data flow inventory:
   ```markdown
   | Data Element | Collected At | Stored In | Processed By | Transmitted To | Deleted When |
   |---|---|---|---|---|---|
   | Email address | Registration form | users table | Auth service | SendGrid (email delivery) | Account deletion |
   | IP address | Every request | access_logs table | Rate limiter | None | 90 days |
   | Payment card | Checkout | NEVER (tokenized) | Stripe | Stripe only | N/A (tokenized) |
   ```

4. **Check consent mechanisms**
   - Is explicit consent obtained before collecting any personal data?
   - Is consent granular? (can users opt out of marketing while keeping functional data?)
   - Is consent recorded? (timestamp, what was consented to, which version of privacy policy)
   - Can consent be withdrawn? Is there a clear opt-out mechanism?

5. **Check data minimization**
   - Is only the minimum necessary data collected?
   - Are there fields in the database that are collected but never used?
   - Are analytics events capturing unnecessary user identifiers?

6. **Check data retention**
   - Are there defined retention periods for all data categories?
   - Is there an automated deletion process for expired data?
   - Does the system support "right to erasure" (GDPR Article 17)?
   - Are backups excluded from the erasure process? (This is a common gap)

7. **Check data subject rights** (GDPR/CCPA)
   - Right to access: can users export their data?
   - Right to erasure: can users delete their account and data?
   - Right to portability: can data be exported in machine-readable format?
   - Right to rectification: can users correct their data?

8. **Check encryption**
   - PII encrypted at rest in database? (column-level encryption for sensitive fields)
   - PII encrypted in transit? (TLS everywhere)
   - Are database backups encrypted?
   - Are any PII fields stored in plaintext where they shouldn't be?

9. **Check third-party data sharing**
   - Is a data processing agreement (DPA) in place with each third party that receives PII?
   - Are users informed of third-party data sharing in the privacy policy?
   - Is there a list of all sub-processors maintained?

10. **Generate privacy audit report**
    ```markdown
    ## Privacy Audit Report

    ### Regulations Applicable: [GDPR / CCPA / HIPAA]

    ### PII Exposure Findings
    - [CRITICAL] Email address logged at src/middleware/logger.ts:42
    - [HIGH] API response includes full user object — filter to minimum needed fields

    ### Data Flow Map
    [see attached or inline table]

    ### Consent Mechanism: [COMPLIANT / NON-COMPLIANT]
    - Issue: No consent recorded for marketing emails

    ### Data Retention: [COMPLIANT / NON-COMPLIANT]
    - Issue: access_logs never deleted (retention policy not implemented)

    ### Encryption: [COMPLIANT / NON-COMPLIANT]
    - Issue: phone_number stored in plaintext — should use field encryption

    ### Data Subject Rights: [COMPLIANT / NON-COMPLIANT]
    - Issue: No data export endpoint (required by GDPR Article 20)

    ### Recommended Actions (priority order)
    1. [CRITICAL] Remove email from log statements
    2. [HIGH] Implement data retention cleanup job
    3. [HIGH] Add data export endpoint
    ```

## Constraints
- Critical PII exposure findings are always blocking for regulated industries
- Data flow map must be maintained and updated as the codebase evolves
- Any new feature handling PII must trigger a privacy review before implementation
- Do not add privacy controls without documenting why (regulatory requirement or privacy-by-design)

## Output Format
Privacy audit report + data flow map document at `docs/privacy/data-flow-map.md`.

## Limits and safety
- Report the type and place of personal data (file, line, `[EMAIL]`), never the value. Do not send raw matches to external services.
- Check encoded values (for example base64) in schema and config candidates before calling them clean.
- Name only laws you can cite. Which law applies is for the human or counsel to decide.
- For tracking or marketing, design recorded consent. Do not write a compliance approval for a bypass.
- The erasure design covers backups and logs.

Files in this skill

  • access-control.skill.md3.2 KB
  • agent-sandboxing.skill.md8.3 KB
  • ai-ethics-compliance.skill.md3.4 KB
  • ai-red-teaming.skill.md7.9 KB
  • ai-safety-guardrails.skill.md6.1 KB
  • api-security.skill.md1.9 KB
  • backup-recovery.skill.md3.5 KB
  • compliance-review.skill.md7.6 KB
  • cryptography-standards.skill.md1.9 KB
  • dependency-security.skill.md3.4 KB
  • hazard-analysis.skill.md3.4 KB
  • legal-review.skill.md3.3 KB
  • log-analysis.skill.md3.9 KB
  • network-security.skill.md3.8 KB
  • privacy-audit.skill.md7.3 KB
  • privacy-data-protection.skill.md1.9 KB
  • prompt-injection-defense.skill.md6.8 KB
  • reliability-engineering.skill.md3.9 KB
  • safety-scan.skill.md3.4 KB
  • secrets-management.skill.md3.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.