Install
Download the binary for your system from the Vilopa Scan page, unpack it, and put dpdp-scan on your PATH. Or build from source (Go 1.26+):
$ go install github.com/vnigoated/dpdp_scanner/cmd/dpdp-scan@latestCheck it works:
$ dpdp-scan versionConnect a database
Vilopa Scan takes a URL-style connection string:
postgres://user:pass@host:5432/db?sslmode=requiremysql://user:pass@host:3306/dbsqlite://path/to/file.db
Pass it with --dsn, or better, set DPDP_DSN so the password does not land in your shell history. For Postgres schemas other than public, add --schema name.
Use a read-only user. Vilopa Scan only runs SELECT and schema queries. In Postgres, for example:
CREATE ROLE vilopa_scan LOGIN PASSWORD '…'; GRANT CONNECT ON DATABASE app TO vilopa_scan; GRANT USAGE ON SCHEMA public TO vilopa_scan; GRANT SELECT ON ALL TABLES IN SCHEMA public TO vilopa_scan;
Scan and the data map
$ dpdp-scan scanThe scanner:
- reads every table’s columns, primary key and foreign keys;
- samples up to 200 values per text-like column (change with
--sample), in memory only; - classifies each column by value patterns, checksums and column names;
- picks the table that identifies a person (usually
users); - works out how every other table links to it: foreign keys,
user_id-style names (marked guessed), and chains such asorder_items → orders → users; - writes
datamap.yamland prints a summary.
If it picks the wrong user table, tell it: --subject-table customers --subject-key customer_id.
Review the map
A table in datamap.yaml looks like this:
support_tickets:
link:
column: customer_id
guessed: true # found by name, not a foreign key: check it
erase: delete
columns:
message:
category: free_text
contains: [phone]
source: free_text
match: 0.5- Check guessed links with whoever owns the table, then remove
guessed: true. - Remove false matches and add columns the scan missed.
- Choose an erase mode per table:
delete,anonymize,softorskip. Vilopa Scan only records it; Vilopa Proof acts on it. - When it’s right, set
confirmed: true, and validate it against the database:
$ dpdp-scan map checkThe readiness report
$ dpdp-scan report --map datamap.yamlWithout --map it scans fresh. It writes dpdp-readiness-report.html (add --json report.json for machine-readable output). Each checklist item is one of:
- OK nothing to do from what the database shows;
- Check worth a look: guessed links, government IDs, free text, soft deletes;
- Gap an erasure or breach response would miss something;
- Can’t tell a question the database cannot answer: retention, SaaS copies, logs, user requests.
Row counts stop at 10,00,000 per table so large databases stay quick.
Commands and flags
| scan | Find personal data, write datamap.yaml | --out, --sample, --subject-table, --subject-key, --force |
| report | Write the readiness report | --out, --json, --map, --sample |
| map check | Validate a map; with --dsn, check it against the database | --map, --dsn |
| demo-db | Create the fake demo shop | --dsn, --reset |
| version | Print the version |
Every command also takes --dsn and --schema.
FAQ
Does any personal data leave my machine?
No. Sampled values are classified in memory and discarded. The map and report contain table names, column names, categories and counts. Vilopa Scan makes no network calls except to your database.
Can it break my database?
It only reads. Use a read-only role and it cannot write even by mistake. The one exception is demo-db, which creates demo tables where you point it.
How accurate is it?
Checksums make Aadhaar and card detection strict, and patterns cover the rest, but detection is automatic: it can miss a column or flag one wrongly. That is why the map is reviewed and confirmed by a person.
MongoDB, BigQuery, Snowflake?
Not yet. Postgres, MySQL and SQLite today. Tell us what you run on the pilot form.
Is this legal advice?
No. Vilopa is an engineering tool. It describes obligations in plain words; confirm exact requirements with the official text of the Act and Rules, and with counsel.
Where is the source?
github.com/vnigoated/dpdp_scanner, under Apache-2.0.