{"id":18248028,"url":"https://github.com/kanmu/fluent-plugin-pan-anonymizer","last_synced_at":"2026-03-10T15:03:58.862Z","repository":{"id":56847098,"uuid":"156697202","full_name":"kanmu/fluent-plugin-pan-anonymizer","owner":"kanmu","description":"A Fluent filter plugin to anonymize records which have PAN (Primary Account Number = Credit card number).","archived":false,"fork":false,"pushed_at":"2024-06-17T18:04:57.000Z","size":12,"stargazers_count":10,"open_issues_count":5,"forks_count":1,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-12-01T16:24:55.152Z","etag":null,"topics":["fluentd","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kanmu.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}},"created_at":"2018-11-08T11:33:11.000Z","updated_at":"2022-07-07T07:39:46.000Z","dependencies_parsed_at":"2024-11-05T09:37:06.023Z","dependency_job_id":"a7455d4d-f731-4aff-b90c-3c139eb7af15","html_url":"https://github.com/kanmu/fluent-plugin-pan-anonymizer","commit_stats":{"total_commits":4,"total_committers":2,"mean_commits":2.0,"dds":0.5,"last_synced_commit":"0e021c42dabde885d776330586192777a6b16394"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/kanmu/fluent-plugin-pan-anonymizer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanmu%2Ffluent-plugin-pan-anonymizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanmu%2Ffluent-plugin-pan-anonymizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanmu%2Ffluent-plugin-pan-anonymizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanmu%2Ffluent-plugin-pan-anonymizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kanmu","download_url":"https://codeload.github.com/kanmu/fluent-plugin-pan-anonymizer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanmu%2Ffluent-plugin-pan-anonymizer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30338599,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T15:02:55.010Z","status":"ssl_error","status_checked_at":"2026-03-10T15:02:36.911Z","response_time":106,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["fluentd","ruby"],"created_at":"2024-11-05T09:35:18.975Z","updated_at":"2026-03-10T15:03:58.826Z","avatar_url":"https://github.com/kanmu.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fluent-plugin-pan-anonymizer\n\nA Fluent filter plugin to anonymize records which have PAN (Primary Account Number = Credit card number). The plugin validates PAN using [Luhn algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm) after matching.\n\nInspired by [fluent-plugin-anonymizer](https://github.com/y-ken/fluent-plugin-anonymizer).\n\n# Requirements\n\n- fluentd: v0.14.x or later\n- Ruby: 2.4 or later\n\n# Installation\n\n```\ngem install fluent-plugin-pan-anonymizer\n```\n\n# Configuration\n\nNOTE: Card numbers in the example don't exist in the world.\n\n```\n\u003csource\u003e\n  @type dummy\n  tag dummy\n  dummy [\n    {\"time\": 12345678901234567, \"subject\": \"xxxxxx\", \"user_inquiry\": \"hi, my card number is 4019249331712145 !\"},\n    {\"time\": 12345678901234568, \"subject\": \"xxxxxx\", \"user_inquiry\": \"hello inquiry code is 4567890123456789\"},\n    {\"time\": 12345678901234569, \"subject\": \"I am 4019 2493 3171 2145\", \"user_inquiry\": \"4019-2493-3171-2145 is my number\"},\n    {\"time\": 14019249331712145, \"subject\": \"ユーザーです\", \"user_inquiry\": \"４０１９２４９３３１７１２１４５ のカードを使っています\"}\n  ]\n\u003c/source\u003e\n\n\u003cfilter **\u003e\n  @type pan_anonymizer\n  ignore_keys time\n  \u003cpan\u003e\n    formats /4\\d{15}/, /４[０-９]{15}/\n    checksum_algorithm luhn\n    mask 9999999999999999\n  \u003c/pan\u003e\n  \u003cpan\u003e\n    formats /4\\d{3}-\\d{4}-\\d{4}-\\d{4}/, /4\\d{3}\\s*\\d{4}\\s*\\d{4}\\s*\\d{4}/\n    checksum_algorithm luhn\n    mask xxxx-xxxx-xxxx-xxxx\n  \u003c/pan\u003e\n\u003c/filter\u003e\n\n\u003cmatch **\u003e\n  @type stdout\n\u003c/match\u003e\n```\n\n## The result of the example given above\n\n```\n2018-11-13 22:01:35.074963000 +0900 dummy: {\"time\":12345678901234567,\"subject\":\"xxxxxx\",\"user_inquiry\":\"hi, my card number is 9999999999999999 !\"}\n2018-11-13 22:01:36.001053000 +0900 dummy: {\"time\":12345678901234568,\"subject\":\"xxxxxx\",\"user_inquiry\":\"hello inquiry code is 4567890123456789\"}\n2018-11-13 22:01:37.021032000 +0900 dummy: {\"time\":12345678901234569,\"subject\":\"I am xxxx-xxxx-xxxx-xxxx\",\"user_inquiry\":\"xxxx-xxxx-xxxx-xxxx is my number\"}\n2018-11-13 22:01:38.050578000 +0900 dummy: {\"time\":14019249331712145,\"subject\":\"ユーザーです\",\"user_inquiry\":\"9999999999999999 のカードを使っています\"}\n```\n\nCard numbers were masked with given configuration except `time` key and `4567890123456789` in \"hello inquiry code is 4567890123456789\". `4567890123456789` is not a valid card number.\n\n# License\n\nApache License, Version 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkanmu%2Ffluent-plugin-pan-anonymizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkanmu%2Ffluent-plugin-pan-anonymizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkanmu%2Ffluent-plugin-pan-anonymizer/lists"}