Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
@db-faker/cli
Advanced tools
[![GitHub license](https://img.shields.io/github/license/syneki/db-faker)](https://github.com/syneki/db-faker/blob/main/LICENSE)
DB Faker is a CLI to easily dump your production databases for development ones.
Use it at your own risks !
Help us to make this library Production ready by Contributing.
# Install the CLI
npm install -g @db-faker/cli
# And install your SQL client
$ npm install pg
$ npm install pg-native
$ npm install sqlite3
$ npm install better-sqlite3
$ npm install mysql
$ npm install mysql2
$ npm install oracledb
$ npm install tedious
# Connection to the source database
# Must be a valid Knex configuration
# https://knexjs.org/guide/#configuration-options
source:
connection:
client: 'pg' # Make sure that you have this dependency installed globally
connection: postgres://root:root@localhost:5432/public
dumper:
# List of tables to be sampled
tables:
- name: users
subset:
limit: 1000
# Dump rows related to the sample
# (automatic schema detection not yet implemented)
relations:
- name: profiles
from: id
to: user_id
relations:
- name: accounts
from: id
to: user_id
- name: products
subset:
limit: 100 # Number of rows to subset
anonymizer:
# Anonymize columns to a specific table
tables:
- name: users
columns:
- name: firstname
engine: name.firstName # The FakerJS function to fake the data
- name: lastname
engine: name.lastName
# Columns to anonymize over every file
columns:
- name: email
engine: internet.email
dumpDirectory: tmp
anonymizedDirectory: tmp/anonymized
WIP
If you only want to sample your database, you can directly use Dumper.
And if you only want to anonymize your data, you can use Anonymizer
WIP
FAQs
[![GitHub license](https://img.shields.io/github/license/syneki/db-faker)](https://github.com/syneki/db-faker/blob/main/LICENSE)
We found that @db-faker/cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.