Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@datazar-cli/core) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
DataZar 📊👋
CLI Database & File Anonymizer
A command-line tool to anonymize and transform sensitive data in databases, files, and datasets without writing a single line of code. Supports various databases types and file formats.
Usage
# npm
npx @datazar-cli/core <command> [options]
# pnpm
pnpm dlx @datazar-cli/core <command> [options]
# yarn
yarn dlx @datazar-cli/core <command> [options]
Examples
PostgresSQL
Mask firstName
column in users
table in test
db:
npx @datazar-cli/core anon-col postgres \
--uri postgresql:/localhost \
--database test \
--table users \
--column firstName \
mask
// { "firstName": "John" } => { "firstName": "****" }
MongoDB
Scramble lastName
column in users
table in test
db:
npx @datazar-cli/core anon-col mongo
--uri mongodb://localhost \
--database test \
--table users \
--column lastName \
scramble
// { "lastName": "Smith" } => { "lastName": "hSmti" }
SQLite
Mask firstName
column in users
table in dev.db
:
npx @datazar-cli/core anon-col sqlite \
--uri /home/dev.db \
--table users \
--column firstName \
mask
CSV
Fake email
column in file.csv
with a fake one:
npx @datazar-cli/core anon-col csv \
--file /home/file.csv \
--column email \
fake email
Anonymizers
- 🎭 Mask - Masks some or all of the letters of the previous value.
- 🔀 Scramble - Scrambles the order of characters inside a string randomly.
- 🍀 Fake - Generate fake data instead of the previous value
Coming Soon:
- 🧽 Remove - removes the entire data
- 🖋️ Constant – Substitutes sensitive words or phrases with placeholders or predefined values.
- 🔐 Hash – Replaces the value with a cryptographic hash, making it irrecoverable.
- 👓 Blur – Adds random variation to numerical values while keeping them within a reasonable range.
Support
Databases
- MongoDB
- PostgresSQL
- MariaDB
- MySQL
- MSSQL
- SQLite
- Neo4J (Coming Soon)
- DynamoDB (Coming Soon)
- Redis (Coming Soon)
- CouchDB (Coming Soon)
Files
- CSV
- JSON (Coming Soon)
- XML (Coming Soon)
- XSLX (Coming Soon)
- Parquet (Coming Soon)
- YAML (Coming Soon)
CLI
anon-col
Anonymize a single column in a table
Usage: anon-col <engine> [engine_options] <anonymizer> [anonymizer_options]
License
DataZar Copyright (C) 2024 Nitzan Ohana
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.