{"id":37432194,"url":"https://github.com/javiercanillas/jackson-masker","last_synced_at":"2026-01-16T06:36:13.046Z","repository":{"id":38357869,"uuid":"373603706","full_name":"javiercanillas/jackson-masker","owner":"javiercanillas","description":"Sensitive Data Masker for ObjectMapper","archived":false,"fork":false,"pushed_at":"2024-11-03T03:14:23.000Z","size":315,"stargazers_count":4,"open_issues_count":5,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-31T07:34:09.943Z","etag":null,"topics":["jackson-objectmapper","sensitive","sensitive-data-exposure","sensitive-data-security"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/javiercanillas.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":"2021-06-03T18:22:36.000Z","updated_at":"2024-09-07T12:15:14.000Z","dependencies_parsed_at":"2024-01-02T00:21:58.705Z","dependency_job_id":"47836a70-abac-402f-a774-6177ca7047ca","html_url":"https://github.com/javiercanillas/jackson-masker","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/javiercanillas/jackson-masker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javiercanillas%2Fjackson-masker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javiercanillas%2Fjackson-masker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javiercanillas%2Fjackson-masker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javiercanillas%2Fjackson-masker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/javiercanillas","download_url":"https://codeload.github.com/javiercanillas/jackson-masker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javiercanillas%2Fjackson-masker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477882,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"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":["jackson-objectmapper","sensitive","sensitive-data-exposure","sensitive-data-security"],"created_at":"2026-01-16T06:36:12.974Z","updated_at":"2026-01-16T06:36:13.037Z","avatar_url":"https://github.com/javiercanillas.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jackson-masker\nSensitive information (such us emails, IDs or phone numbers) is a serious problem \nto deal with. If you have objects that are logged or write into files where \nmasking is required, and you are already using Jackson ObjectMapper solution in \nyour application, this library might be of some help.\n\n[![Java CI with Maven](https://github.com/javiercanillas/jackson-masker/actions/workflows/maven-build.yml/badge.svg)](https://github.com/javiercanillas/jackson-masker/actions/workflows/maven-build.yml)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=javiercanillas_jackson-masker\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=javiercanillas_jackson-masker)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=javiercanillas_jackson-masker\u0026metric=coverage)](https://sonarcloud.io/dashboard?id=javiercanillas_jackson-masker)\n---\n## Types supported\n- String\n- List\\\u003cString\\\u003e\n- Set\\\u003cString\\\u003e\n- String[]\n- Map\u003c?, String\u003e\n\n**Note:** If you consider a type might be missing or you like it on this list, feel free to contact [me](https://github.com/javiercanillas/jackson-masker/issues).\n\n## How to use\nLets suppose you have an entity that has an email as part of its attributes:\n```java\nclass EntityA {\n    String email;\n    ...\n}\n```\nWell, with this class you can annotate this attribute as sensitive data like this:\n\n```java\nimport MaskString;\n\nclass EntityA {\n    @MaskString\n    String id;\n\n    public String getId() {\n        return this.id;\n    }\n\n    public void setId(String value) {\n        this.id = value;\n    }\n}\n```\nAnd it will be masked when writing using a Jackson ObjectMapper like this:\n```java\nObjectMapper mapper = new ObjectMapper();\nfinal ObjectWriter maskedWriter = mapper.writerWithView(io.github.javiercanillas.jackson.masker.view.Masked.class);\nfinal EntityA obj = new EntityA();\nobj.setId(\"abcd1234\");\n\nmaskedWriter.writeValueAsString(obj);\n```\nAnd it will produce:\n```json\n{\n  \"id\": \"********\"\n}\n```\nFurthermore, you can customize the masking character and if you want to \nleave some first and last characters. \n```java\n    @MaskString(keepInitialCharacters = 1, keepLastCharacters = 4, maskCharacter = '-')\n    String id;\n```\n\nThe produced json in this case would be:\n```json\n{\n  \"id\": \"a---1234\"\n}\n```\n\nMore examples on test and [wiki](https://github.com/javiercanillas/jackson-masker/wiki)\n\n## How to install\nIf you prefer to use maven central releases, you can find it [here](https://search.maven.org/artifact/io.github.javiercanillas/jackson-masker). Also, if you support [Jitpack.io](https://jitpack.io/) you can find it [here](https://jitpack.io/#javiercanillas/jackson-masker)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaviercanillas%2Fjackson-masker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaviercanillas%2Fjackson-masker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaviercanillas%2Fjackson-masker/lists"}