CtrlK
BlogDocsLog inGet started
Tessl Logo
PluginPublic

trysac/personal-data-map

Map personal data in SQL schemas: parse CREATE TABLE, classify columns by name, flag special categories and tables linked to people by foreign keys. Use when the user asks for a personal data inventory or privacy review of a schema.

Quality

94%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Low

Low-risk findings worth noting

Overview
Quality
Evals
Security
Files

rules.mdreferences/

Classification rules

Categories

Rules are checked in this priority order; the first match wins for a column.

CategoryName tokens (phrases match contiguous tokens of the column name)
special_categoryhealth, diagnosis, religion, ethnicity, sexual orientation, biometric, political, union member, genetic
direct_identifieremail, phone, mobile, ssn, national id, passport, tax id, dni
namefirst name, last name, full name, surname, given name
date_of_birthdob, birth date, date of birth, birthdate
contact_addressaddress, street, city, postal code, zip, zipcode
online_identifierip, ip address, device id, cookie id, user agent
financialiban, card number, account number, salary
locationlatitude, longitude, lat, lng

How names are matched

  • A column name is split into lower-case tokens at _, -, spaces and camelCase boundaries: FirstName and first_name both give first name.
  • A phrase matches when its tokens appear contiguously in the column tokens: user_email_verified matches email; emailing does not.
  • Because of the priority order, a name with tokens from several categories takes the first one in the table: ip_address is classified contact_address (it contains address) before online_identifier is considered.

Table roles

RoleMeaning
subjectThe table has at least one direct_identifier or name column: it describes people.
linkedNot a subject, but its foreign keys reach a subject table. via lists the shortest reference path ending at that subject, for example orders via users.
noneNo reachable subject table.

Foreign keys are followed through column-level REFERENCES and table-level FOREIGN KEY (...) REFERENCES t. Table names are compared case-insensitively; a schema prefix is ignored.

Special-category tables

Any table with a special_category column is listed in special_category_tables, whatever its role.

Output

  • markdown: one row per classified column with Table | Column | Category | Role, tables in order of appearance. Unclassified columns are not listed.
  • json: columns (every column, category may be null), roles (role and via per table) and special_category_tables; sorted keys, two-space indent.

Limits

  • Name-based only: a personal-data column whose name matches no token is not found, and a column can match by coincidence.
  • Library overrides (overrides in classify) exist in the Python API; the bundled command line does not expose them.
  • Statements other than CREATE TABLE (for example ALTER TABLE ... ADD COLUMN) are not applied.

SKILL.md

tile.json