Skip to content

goSprinto/compliance-skills / pii-detector

pii-detector

Verified

Proactive PII add-on — augments the main response with PII guidance. Auto-trigger on any form, schema, migration, model, API route, GraphQL resolver, auth flow, or data design discussion. Also fires on: middleware, webhooks, workers, seed/fixture/factory files, delete/export/purge/anonymize functions, cron jobs, HTTP clients, controllers, services, resolvers. Trigger phrases: "build a form", "collect X data", "what fields should I include", "how should I design the schema", "POC / lead / contact / user / customer information", "store / save / persist X", "sign up / login / auth / registration", "share thoughts on how to build". Trigger on field names: email, phone, name, dob, ssn, card, cvv, password, token, secret, api_key, health, biometric, ip_address, salary, session, device_id, notes, metadata (on user-facing models).

FileKindSize
README.mdmarkdown3.6 KB
SKILL.mdskill md6.3 KB
layers/api-layer.mdmarkdown8.9 KB
layers/auth-sessions.mdmarkdown6.6 KB
layers/data-in-transit.mdmarkdown7.1 KB
layers/data-lifecycle.mdmarkdown9.3 KB
layers/frontend.mdmarkdown5.8 KB
layers/legal-consent.mdmarkdown3.9 KB
layers/testing-seeding.mdmarkdown6.0 KB
modes/inline.mdmarkdown5.7 KB
modes/planning.mdmarkdown4.7 KB
modes/repo-scan.mdmarkdown6.5 KB
patterns/fields.mdmarkdown3.8 KB
rules/leakage-vectors.mdmarkdown5.7 KB
rules/non-negotiables.mdmarkdown3.5 KB

patterns/fields.md

View on GitHub
# PII Field Patterns

Scan all field names, types, and surrounding context against these.
Flag on exact match OR semantic approximation.

---

## Critical Sensitivity — Always Flag, Always Fix

```
# Auth / Secrets
password, passwd, pwd, pass, passphrase
password_hash, hashed_password, encrypted_password
secret, client_secret, app_secret
api_key, api_secret, private_key, signing_key
token, auth_token, access_token, refresh_token, bearer_token
session_id, session_token
security_question, security_answer, hint

# Abbreviated / indirect — flag when on auth/user model
p, pw, cred, creds, credential, credentials
auth, auth_data, auth_info
key, k  (if on user/auth model)

# Payment Card — PCI-DSS
card_number, card_num, credit_card, debit_card, pan
cvv, cvv2, cvc, cvc2, card_code, security_code
account_number, routing_number, bank_account, iban, swift

# Government IDs
ssn, social_security, social_security_number
tax_id, taxpayer_id, itin, ein
passport, passport_number, passport_no
drivers_license, license_number, dl_number, dl_num
national_id, national_id_number, id_number

# Health / Medical — HIPAA
diagnosis, condition, medical_condition
medication, prescription, rx
health_record, medical_record, medical_history, ehr, phi
insurance, insurance_id, insurance_number, policy_number
icd_code, cpt_code, npi
mental_health, psychiatric, therapy_notes

# Biometric — BIPA
fingerprint, fingerprint_data, biometric
face_id, face_data, facial_recognition, face_scan
retina, retina_scan, iris, iris_scan
voice_print, voice_data, voice_recognition
dna, genetic_data
```

---

## High Sensitivity — Flag, Check Storage + Handling

```
# Identity
first_name, last_name, full_name, legal_name, maiden_name
middle_name, display_name
date_of_birth, dob, birth_date, birthdate, birthday
age (exact integer), gender, sex, race, ethnicity, nationality
photo, avatar, profile_picture, selfie

# Contact
email, email_address, email_addr
phone, phone_number, mobile, mobile_number, cell, telephone
address, street_address, street, addr
city, state, zip, zipcode, zip_code, postal_code
country, mailing_address, billing_address, shipping_address

# Financial (non-card)
salary, wage, income, compensation, pay_rate
balance, account_balance, net_worth
credit_score, fico, credit_rating
transaction_history, purchase_history, spending_data

# Location / Tracking
location, coordinates, lat, lng, latitude, longitude
gps, geo, geolocation
ip_address, ip_addr, ip, client_ip, remote_ip
```

---

## Lower Sensitivity — Flag in Context

```
# Behavioral
device_id, device_identifier, device_fingerprint
ad_id, idfa, gaid, advertising_id
browser_fingerprint, user_agent
search_history, browsing_history, click_history
session_data, activity_log

# Ambiguous — check what they actually store
notes, metadata, extra, data, info, details, misc, other
profile, profile_data, user_data, user_info, user_details
preferences, settings
```

---

## Indirect / Abbreviated Name Detection

Flag these based on context — they don't look like PII but frequently store it:

| Field | When to Flag | Risk |
|-------|-------------|------|
| `p`, `pw`, `k` | Any user/auth model | Almost always password or key |
| `creds`, `credential` | Anywhere | Auth credentials |
| `data`, `info`, `details` | User/customer models | PII blobs |
| `notes` | Patient/customer models | Unstructured PII |
| `metadata` | User models | Fingerprinting data |
| `token` | Anywhere | Raw auth tokens |
| `secret` | Anywhere | Should never be in DB |
| `code` | Auth/payment models | OTP, CVV, verification codes |
| `number` | User/payment models | Card, SSN, or phone |
| `value` | Sensitive models | Generic PII container |
| `raw`, `original` | Next to hashed fields | Plaintext alongside hash |

Rule: Ambiguous field name + user-facing/financial/health model = flag it.
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall