{"id":22870891,"url":"https://github.com/percona-lab/sanitizer","last_synced_at":"2025-03-31T11:27:11.861Z","repository":{"id":64307495,"uuid":"123912976","full_name":"Percona-Lab/sanitizer","owner":"Percona-Lab","description":"POC for a log sanitizer for pt-stalk, pt-mysql-summary, pt-summary","archived":false,"fork":false,"pushed_at":"2018-04-17T16:31:32.000Z","size":71,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-06T16:59:08.462Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Percona-Lab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-05T11:58:54.000Z","updated_at":"2018-09-03T14:48:22.000Z","dependencies_parsed_at":"2023-01-15T11:00:53.743Z","dependency_job_id":null,"html_url":"https://github.com/Percona-Lab/sanitizer","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Percona-Lab%2Fsanitizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Percona-Lab%2Fsanitizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Percona-Lab%2Fsanitizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Percona-Lab%2Fsanitizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Percona-Lab","download_url":"https://codeload.github.com/Percona-Lab/sanitizer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246460569,"owners_count":20781153,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-12-13T13:16:30.746Z","updated_at":"2025-03-31T11:27:11.839Z","avatar_url":"https://github.com/Percona-Lab.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pt-secure-data\r\nCollect, sanitize, pack and encrypt data. By default, this program will collect the output of:\r\n\r\n- `pt-stalk --no-stalk --iterations=2 --sleep=30 --host=$mysql-host --dest=$temp-dir --port=$mysql-port --user=$mysql-user --password=$mysql-pass`\r\n- `pt-summary`\r\n- `pt-mysql-summary --host=$mysql-host --port=$mysql-port --user=$mysql-user --password=$mysql-pass`\r\n\r\n\r\n\r\nUsage:  \r\n```\r\npt-secure-data [\u003cflags\u003e] \u003ccommand\u003e [\u003cargs\u003e ...]\r\n```\r\n\r\n\r\n### Global flags\r\n|Flag|Description|\r\n|-----|-----|\r\n|--help|Show context-sensitive help (also try --help-long and --help-man).|\r\n|--debug|Enable debug log level.|\r\n\r\n### **Commands**\r\n#### **Help command**\r\nShow help\r\n\r\n#### **Collect command**\r\nCollect, sanitize, pack and encrypt data from pt-tools.\r\nUsage:\r\n```\r\nsanitizer collect \u003cflags\u003e\r\n```\r\n\r\n|Flag|Description|\r\n|-----|-----|\r\n|--bin-dir|Directory having the Percona Toolkit binaries (if they are not in PATH).|\r\n|--temp-dir|Temporary directory used for the data collection. Default: ${HOME}/data_collection\\_{timestamp}| \r\n|--include-dir|Include this dir into the sanitized tar file|\r\n|--config-file|Path to the config file. Default: `~/.my.cnf`|\r\n|--mysql-host|MySQL host. Default: `127.0.0.1`|\r\n|--mysql-port|MySQL port. Default: `3306`|\r\n|--mysql-user|MySQL user name.|\r\n|--mysql-password|MySQL password.|\r\n|--ask-mysql-pass|Ask MySQL password.|\r\n|--extra-cmd|Also run this command as part of the data collection. This parameter can be used more than once.|\r\n|--encrypt-password|Encrypt the output file using this password.\u003cbr\u003eIf ommited, it will be asked in the command line.|\r\n|--no-collect|Do not collect data|\r\n|--no-sanitize|Do not sanitize data|\r\n|--no-encrypt|Do not encrypt the output file.|\r\n|--no-sanitize-hostnames|Do not sanitize host names.|\r\n|--no-sanitize-queries|Do not replace queries by their fingerprints.|\r\n|--no-remove-temp-files|Do not remove temporary files.|\r\n\r\n#### **Decrypt command**\r\nDecrypt an encrypted file. The password will be requested from the terminal.  \r\nUsage: \r\n```\r\nsanitizer decrypt \u003cinput file\u003e \u003coutput file\u003e\r\n```\r\n\r\n#### **Encrypt command**\r\nEncrypt a file. The password will be requested from the terminal.  \r\nUsage: \r\n```\r\nsanitizer encrypt \u003cinput file\u003e \u003coutput file\u003e\r\n```  \r\n\r\n#### **Sanitize command**\r\nReplace queries in a file by their fingerprints and obfuscate hostnames.  \r\nUsage:\r\n```\r\nsanitizer sanitize [flags]\r\n```\r\n  \r\n|Flag|Description|\r\n|-----|-----|\r\n|--input-file| Input file. If not specified, the input will be Stdin.|\r\n|--output-file|Output file. If not specified, the input will be Stdout.|\r\n|--no-sanitize-hostnames|Do not sanitize host names.|\r\n|--no-sanitize-queries|Do not replace queries by their fingerprints.|\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpercona-lab%2Fsanitizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpercona-lab%2Fsanitizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpercona-lab%2Fsanitizer/lists"}