{"id":36252659,"url":"https://github.com/linkorb/anonymizer","last_synced_at":"2026-01-11T07:02:02.303Z","repository":{"id":57015227,"uuid":"102100587","full_name":"linkorb/anonymizer","owner":"linkorb","description":"Anonymizer: scrambles your confidential production data for use in test environments","archived":false,"fork":false,"pushed_at":"2025-05-05T13:11:59.000Z","size":25,"stargazers_count":3,"open_issues_count":1,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-05T14:28:54.237Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/linkorb.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-09-01T10:07:14.000Z","updated_at":"2025-05-05T13:11:18.000Z","dependencies_parsed_at":"2025-05-05T14:26:09.686Z","dependency_job_id":"00b8542b-cd9e-4da1-a95b-dd93c27a2949","html_url":"https://github.com/linkorb/anonymizer","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/linkorb/anonymizer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkorb%2Fanonymizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkorb%2Fanonymizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkorb%2Fanonymizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkorb%2Fanonymizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linkorb","download_url":"https://codeload.github.com/linkorb/anonymizer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkorb%2Fanonymizer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28296941,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T04:44:51.577Z","status":"ssl_error","status_checked_at":"2026-01-11T04:44:44.232Z","response_time":60,"last_error":"SSL_read: 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":[],"created_at":"2026-01-11T07:02:01.667Z","updated_at":"2026-01-11T07:02:02.298Z","avatar_url":"https://github.com/linkorb.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Anonymizer\n==========\nAnonymizer is a toolkit to help you to automate production data anonymization for test environments and compliancy.\n\n## Features:\n\n* Scramble data by column\n* Maintains referential integrity\n* Consistent output state on multiple runs of same source data\n* Truncate entire tables\n* Drop tables or individual columns\n* Store configuration (DSN + Filename) in a .env file\n\n## Usage\n\n1. Scan your application's database schema and decide which columns contain sensitive information. For example: `user.email` or `request.ip`, etc.\n2. Create a configuration file (example below) for your application that lists all the sensitive columns with a method for anonymization.\n3. Run anonymizer on your test database:\n\n    vendor/bin/anonymizer\n\n## anonymizer.yml format\n\nThis file defines which columns needs to be anonymized, and using which method. Additionally you truncate or drop entire tables or columns.\n\nHere's an example:\n\n```yml\n---\ncolumns:\n    user.email:\n      method: faker\n      arguments:\n        formatter: email\n      cascades:\n        - user_email.address\n        - comment.email\n\n    request.ip:\n      method: faker\n      arguments:\n        formatter: ipv5\n      cascades:\n        - exception.ip\ntruncate:\n  - table1\n  - table2\n\ndrop:\n  - user.ip\n  - request.agent\n  - tmp*\n  - *.password\n```\n\nAll columns are listed in `tableName.columnName` format. For each column a `method` is defined, with some optional `arguments`. Most common is the `faker` method, that takes a `formatter` as an argument (i.e. email, userName, city, ipv4, etc - see the faker docs for more)\n\nIf you have any columns in other tables that reference this column, you can list them in the `cascades` key (optional). This will ensure that the external columns are updated with the same new value so their references still work.\n\n## Wildcards\n\nYou can use wildcards (*, ?) in tablenames of the `drop` list.\n\n## Configuration\n\nYou can use the environment (or a .env file) to pass ANONYMIZER_DSN (or PDO) and ANONYMIZER_FILENAME values to the `anonymizer run` command. These values will be used to connect to the database, and read the specified configuration yaml file.\n\nOptionally: configure `ANONYMIZER_CONFIG_PATH` to point to a directory of `.conf` files containing database connection details. This will be registered as an INI Backend to the Connector service to resolve db connections from config files.\n\n## About the \"randomly\" generated data\n\n* The faker is initialized with the same seed every run (0). This ensures that multiple runs of anonymizer on the same source data result in the same anonymized data.\n* The faker method ensures all generated values are unique within a single table. This prevents problems with references etc\n* If you list cascades that contain values that are not defined in the source table, they will be updated to NULL. This prevents sensitive data lingering around in cascades accidentally. In a properly integrity-checked database this scenario would not happen.\n\n## Verbosity / schema\n\nanonymizer analyzes the schema (tablenames + columnnames) before running. This information is used by the wildcard functionality.\nYou can run anonymizer with `-v` to increase the verbosity to view this data. This can help you to verify if you're not seeing any tables or columns that should be dropped.\n\n## License\n\nMIT. Please refer to the [license file](LICENSE) for details.\n\n## Brought to you by the LinkORB Engineering team\n\n\u003cimg src=\"http://www.linkorb.com/d/meta/tier1/images/linkorbengineering-logo.png\" width=\"200px\" /\u003e\u003cbr /\u003e\nCheck out our other projects at [linkorb.com/engineering](http://www.linkorb.com/engineering).\n\nBtw, we're hiring!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinkorb%2Fanonymizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinkorb%2Fanonymizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinkorb%2Fanonymizer/lists"}