{"id":40783396,"url":"https://github.com/malvfr/zap","last_synced_at":"2026-01-21T19:37:13.490Z","repository":{"id":39285060,"uuid":"324250892","full_name":"malvfr/zap","owner":"malvfr","description":"Fill your database with fake data.","archived":false,"fork":false,"pushed_at":"2023-01-01T08:02:05.000Z","size":1021,"stargazers_count":1,"open_issues_count":14,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-09T13:13:27.535Z","etag":null,"topics":["cli","csv","data","database","generator","hacktoberfest","mock","node","populate","populate-database","seed","sql"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/malvfr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-24T23:14:18.000Z","updated_at":"2022-01-22T01:17:29.000Z","dependencies_parsed_at":"2023-01-31T21:16:27.763Z","dependency_job_id":null,"html_url":"https://github.com/malvfr/zap","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/malvfr/zap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malvfr%2Fzap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malvfr%2Fzap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malvfr%2Fzap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malvfr%2Fzap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/malvfr","download_url":"https://codeload.github.com/malvfr/zap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malvfr%2Fzap/sbom","scorecard":{"id":614451,"data":{"date":"2025-08-11","repo":{"name":"github.com/malvfr/zap","commit":"61c8e91accde9e485c55d8f4960a5f38f119d9eb"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/1 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/NPM.yml:1","Warn: no topLevel permission defined: .github/workflows/NodeCI.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":2,"reason":"dependency not pinned by hash detected -- score normalized to 2","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/NPM.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/malvfr/zap/NPM.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/NPM.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/malvfr/zap/NPM.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/NPM.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/malvfr/zap/NPM.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/NodeCI.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/malvfr/zap/NodeCI.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/NodeCI.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/malvfr/zap/NodeCI.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/NodeCI.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/malvfr/zap/NodeCI.yml/master?enable=pin","Warn: downloadThenRun not pinned by hash: .github/workflows/NPM.yml:38","Warn: downloadThenRun not pinned by hash: .github/workflows/NodeCI.yml:37","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   2 out of   2 npmCommand dependencies pinned","Info:   0 out of   2 downloadThenRun dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"26 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-px4h-xg32-q955","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T03:31:07.776Z","repository_id":39285060,"created_at":"2025-08-21T03:31:07.776Z","updated_at":"2025-08-21T03:31:07.776Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28641279,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T18:04:35.752Z","status":"ssl_error","status_checked_at":"2026-01-21T18:03:55.054Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","csv","data","database","generator","hacktoberfest","mock","node","populate","populate-database","seed","sql"],"created_at":"2026-01-21T19:37:12.844Z","updated_at":"2026-01-21T19:37:13.485Z","avatar_url":"https://github.com/malvfr.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm version](https://badge.fury.io/js/%40malvfr%2Fzap.svg)](https://badge.fury.io/js/%40malvfr%2Fzap)\n![npm](https://img.shields.io/npm/dt/@malvfr/zap?style=plastic)\n[![codecov](https://codecov.io/gh/malvfr/zap/branch/master/graph/badge.svg?token=9YKLT5WKFU)](https://codecov.io/gh/malvfr/zap)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=malvfr_zap\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=malvfr_zap)\n[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=malvfr_zap\u0026metric=sqale_rating)](https://sonarcloud.io/dashboard?id=malvfr_zap)\n[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=malvfr_zap\u0026metric=reliability_rating)](https://sonarcloud.io/dashboard?id=malvfr_zap)\n\n# ZAP - Seed your database with realistic data\n\nZap is a realistic data seeding CLI, supporting CSV and SQL format. You can choose among many categories of data to create a large quantities of realistic data to populate your database.\n\n## Installation\n\nUse NPM to perform a global installation of Zap CLI.\n\n```bash\nnpm install -g @malvfr/zap\n```\n\n## Usage\n\nIn your working directory, create a **YAML** file containing the desired database schema. After the CLI usage, the SQL or CSV files will be created at your working directory.\n\nYou can display information about Zap CLI through the **\"h\"** flag:\n\n```bash\nzap -h\n```\n\nGiven your schema file is named **schema.yml**\n\n```bash\nzap -f schema.yml\n```\n\nIf you want to specify a locale, use the **\"l\"** flag (See the supported locales below)\n\n```bash\nzap -f schema.yml -l 'en_US'\n```\n\nIf you want to generate a CSV output, use the **\"c\"** flag\n\n```bash\nzap -c -f schema.yml\n```\n\n## Supported generator categories\n\nSo far, Zap CLI supports a few types of generators, soon more will be added:\n\n- Address\n- Date\n- Enum (You can bring your own values to be randomly selected)\n- ID\n- Git\n- Person\n- Random\n- Vehicle\n\n## Supported locales\n\nZap support the locales supported by Faker.js. If a generator data is not provided in the desired language, it will fallback to **English**.\n\n\u003cdetails\u003e\n\u003csummary\u003eLocales\u003c/summary\u003e\n\n- az\n- ar\n- cz\n- de\n- de_AT\n- de_CH\n- en\n- en_AU\n- en_AU_ocker\n- en_BORK\n- en_CA\n- en_GB\n- en_IE\n- en_IND\n- en_US\n- en_ZA\n- es\n- es_MX\n- fa\n- fi\n- fr\n- fr_CA\n- fr_CH\n- ge\n- hy\n- hr\n- id_ID\n- it\n- ja\n- ko\n- nb_NO\n- ne\n- nl\n- nl_BE\n- pl\n- pt_BR\n- pt_PT\n- ro\n- ru\n- sk\n- sv\n- tr\n- uk\n- vi\n- zh_CN\n- zh_TW\n\n\u003c/details\u003e\n\n## Building the schema\n\nZap is a schema based generators, so you will need to provide a schema with your tables definitions.\n\nTo build your schema you will need to create a YAML file in the following format:\n\n```yml\ntables:\n  - name: 'YOUR_TABLE' # Name of the table\n    quantity: 10 # The amount of records to be generated.\n    fields: # Definition of the columns and their values generators.\n      - name: 'COLUMN_1_NAME'\n        category:\n          # pick of one of the supported categories:\n          # additional options\n      - name: 'COLUMN_2_NAME'\n        category:\n          # pick of one of the supported categories:\n          # additional options\n```\n\n## Generator options\n\nEach category may have it's own options to produce data. Place the options in the desired \\*category\" object (Such as ID, Address, Person...)\n\n### Address\n\nAvailable types:\n\n- city\n- state\n- country\n- streetName\n- streetAddress\n- countryCode\n- zipCode\n\nOptions:\n\n```yml\ncategory:\n  address:\n    type: state\n    abbr: true | false # Abbreviates the state\n```\n\n### Date\n\nAvailable types:\n\n- weekday\n- future\n- between\n- past\n- month\n\nOptions:\n\n```yml\ncategory:\n  date:\n    type: weekday\n    abbr: true | false # Abbreviates the weekday\n    # ---------------------------------------------------------\n    type: month\n    abbr: true | false # Abbreviates the month\n    # ---------------------------------------------------------\n    type: past\n    dateLocale: 'en-gb, pt-br, en-us...' # Outputs date in the desired format. The locale should be a Javascript compatible locale string.\n    # ---------------------------------------------------------\n    type: between\n    start: 'YYYY-MM-DD' #the starting date in 'YYYY-MM-DD' format\n    end: 'YYYY-MM-DD'   #the limit date in 'YYYY-MM-DD' format\n    dateLocale: 'en-gb, pt-br, en-us...'\n    # ---------------------------------------------------------\n    type: future\n    dateLocale: 'en-gb, pt-br, en-us...'\n```\n\n### Enum\n\nYou can bring your own data in the _values_ array to be randomly selected.\n\n```yml\ncategory:\n  enum:\n    values:\n      - an array\n      - containing\n      - data\n      - to be randomly\n      - selected\n```\n\n### Git\n\nAvailable types:\n\n- branch\n- commitEntry\n- commitMessage\n- commitSha\n- shortSha\n\n```yml\ncategory:\n  git:\n    type: one of the available types\n```\n\n### ID\n\nAvailable types:\n\n- uuid\n- sequentialInteger\n- randomInteger\n\nOptions:\n\n```yml\ncategory:\n  ID:\n    type: sequentialInteger\n    start: 20 # The starting number of the generated data. Increments 1 at each iteration.\n    # ---------------------------------------------------------\n    type: randomInteger\n    min: 100 # The minimum number to be randomized\n    max: 100 # The maximum number to be randomized\n```\n\n### Person\n\nAvailable types:\n\n- firstName\n- lastName\n- middleName\n- jobTitle\n- prefix\n- suffix\n- title\n- jobDescriptor\n- jobArea\n- jobType\n\nOptions:\n\n```yml\ncategory:\n  person:\n    type: firstName\n    gender: M | F # Determines the gender to be generated\n    # ---------------------------------------------------------\n    type: middleName\n    gender: M | F\n    # ---------------------------------------------------------\n    type: lastName\n    gender: M | F\n```\n\n### Random\n\nAvailable types:\n\n- string\n- integer\n- boolean\n- float\n- hexaDecimal\n- word\n- words\n- image\n\nOptions:\n\n```yml\ncategory:\n  person:\n    type: string\n    length: 40 # Determines the string's length to be generated\n    # ---------------------------------------------------------\n    type: float\n    precision: 3 # The number's precision after separator.\n    min: 100 # The minimum number to be randomized\n    max: 100 # The maximum number to be randomized\n    # ---------------------------------------------------------\n    type: integer\n    precision: 3 # The number's precision after separator.\n    min: 100 # The minimum number to be randomized\n    max: 100 # The maximum number to be randomized\n\n```\n\n### Random\n\nAvailable types:\n\n- vehicle\n- color\n- manufacturer\n- model\n- type\n- vin\n- fuel\n\nOptions:\n\n```yml\ncategory:\n  vehicle:\n    type: one of the available types\n```\n\n## Schema Example\n\nExample of a two tables schema with two columns outputting 25 and 30 records respectively.\n\n```yaml\ntables:\n  - name: 'CARS'\n    quantity: 25\n    fields:\n      - name: 'CAR_ID'\n        category:\n          ID:\n            type: sequentialInteger\n            start: 100\n      - name: 'PRICE'\n        category:\n          random:\n            type: float\n            min: 10000\n            max: 20000\n            precision: 4\n      - name: 'MODEL'\n        category:\n          vehicle:\n            type: vehicle\n      - name: 'COLOR'\n        category:\n          vehicle:\n            type: color\n      - name: 'ACQUISITION_DATE'\n        category:\n          date:\n            type: between\n            start: '2010-03-01'\n            end: '2020-05-01'\n            dateLocale: 'en-gb'\n  - name: 'USER'\n    quantity: 30\n    fields:\n      - name: 'USER_ID'\n        category:\n          ID:\n            type: uuid\n      - name: 'PASSWORD'\n        category:\n          random:\n            type: string\n            length: 100\n      - name: 'USER_TYPE'\n        category:\n          enum:\n            values:\n              - admin\n              - regular\n              - temporary\n      - name: 'FIRST_NAME'\n        category:\n          person:\n            type: firstName\n            gender: F\n      - name: 'LAST_NAME'\n        category:\n          person:\n            type: lastName\n      - name: 'ADDRESS'\n        category:\n          address:\n            type: streetAddress\n      - name: 'BIRTHDAY'\n        category:\n          date:\n            type: past\n```\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\nPlease make sure to update tests as appropriate.\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalvfr%2Fzap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmalvfr%2Fzap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalvfr%2Fzap/lists"}