{"id":19561539,"url":"https://github.com/sweet-delights/delightful-anonymization","last_synced_at":"2026-02-11T19:35:11.098Z","repository":{"id":39851252,"uuid":"307220718","full_name":"sweet-delights/delightful-anonymization","owner":"sweet-delights","description":"A Scala library for anonymizing case classes","archived":false,"fork":false,"pushed_at":"2025-08-20T02:34:03.000Z","size":95,"stargazers_count":2,"open_issues_count":7,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-20T04:42:02.463Z","etag":null,"topics":["anonymization","case-class","case-classes","hashing-algorithms","lgpl","scala","shapeless"],"latest_commit_sha":null,"homepage":"","language":"Scala","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/sweet-delights.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":"CODE_OF_CONDUCT","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":"2020-10-26T00:21:09.000Z","updated_at":"2025-08-20T02:34:07.000Z","dependencies_parsed_at":"2024-01-15T00:42:43.178Z","dependency_job_id":"bcfc1619-ba86-4a3c-8195-4b11f5dbaf19","html_url":"https://github.com/sweet-delights/delightful-anonymization","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/sweet-delights/delightful-anonymization","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sweet-delights%2Fdelightful-anonymization","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sweet-delights%2Fdelightful-anonymization/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sweet-delights%2Fdelightful-anonymization/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sweet-delights%2Fdelightful-anonymization/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sweet-delights","download_url":"https://codeload.github.com/sweet-delights/delightful-anonymization/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sweet-delights%2Fdelightful-anonymization/sbom","scorecard":{"id":861777,"data":{"date":"2025-08-11","repo":{"name":"github.com/sweet-delights/delightful-anonymization","commit":"06f052c431d098e153834a87e29b5b0ecb57d57a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":6.4,"checks":[{"name":"Code-Review","score":8,"reason":"Found 22/25 approved changesets -- score normalized to 8","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":8,"reason":"10 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 8","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"Token-Permissions","score":10,"reason":"GitHub workflow tokens follow principle of least privilege","details":["Info: topLevel 'contents' permission set to 'read': .github/workflows/scala.yml:10","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":"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/scala.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/sweet-delights/delightful-anonymization/scala.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/scala.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/sweet-delights/delightful-anonymization/scala.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/scala.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/sweet-delights/delightful-anonymization/scala.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction 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":"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 27 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"}}]},"last_synced_at":"2025-08-24T01:30:22.986Z","repository_id":39851252,"created_at":"2025-08-24T01:30:22.986Z","updated_at":"2025-08-24T01:30:22.986Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29342121,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T18:58:20.535Z","status":"ssl_error","status_checked_at":"2026-02-11T18:56:44.814Z","response_time":97,"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":["anonymization","case-class","case-classes","hashing-algorithms","lgpl","scala","shapeless"],"created_at":"2024-11-11T05:11:52.019Z","updated_at":"2026-02-11T19:35:11.093Z","avatar_url":"https://github.com/sweet-delights.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build status](https://github.com/sweet-delights/delightful-anonymization/actions/workflows/scala.yml/badge.svg)](https://github.com/sweet-delights/delightful-anonymization/actions/workflows/scala.yml)\r\n[![Maven Central](https://img.shields.io/maven-central/v/org.sweet-delights/delightful-anonymization_2.13.svg)](https://maven-badges.herokuapp.com/maven-central/org.sweet-delights/delightful-anonymization_2.13)\r\n\r\n`delightful-anonymization` is a library for anonymizing case classes on-the-fly.\r\n\r\nThis library is built for Scala 2.12 and 2.13.\r\n\r\n### SBT\r\n```scala\r\nlibraryDependencies += \"org.sweet-delights\" %% \"delightful-anonymization\" % \"0.1.1\"\r\n```\r\n\r\n### Maven\r\n```xml\r\n\u003cdependency\u003e\r\n  \u003cgroupId\u003eorg.sweet-delights\u003c/groupId\u003e\r\n  \u003cartifactId\u003edelightful-anonymization_2.12\u003c/artifactId\u003e\r\n  \u003cversion\u003e0.0.1\u003c/version\u003e\r\n\u003c/dependency\u003e\r\n```\r\n\r\n## [License](LICENSE.md)\r\n\r\nAll files in `delightful-anonymization` are under the GNU Lesser General Public License version 3.\r\nPlease read files [`COPYING`](COPYING) and [`COPYING.LESSER`](COPYING.LESSER) for details.\r\n\r\n## How to anonymize a case class ?\r\n\r\n*Step 1*: decorate a case class with [`@PII`](src/main/scala-2/sweet/delights/anonymization/PII.scala) annotations.\r\nExample:\r\n```scala\r\nimport sweet.delights.anonymization.{Hash, PII}\r\n\r\ncase class Foo(\r\n  opt: Option[String] @PII(Hash.MD5),\r\n  str: String         @PII(Hash.SHA512),\r\n  integer: Int\r\n)\r\n```\r\n\r\n*Step 2*: apply the `anonymize` function on an instance of `Foo`:\r\n\r\n```scala\r\n\r\n\r\nval foo = Foo(\r\n  Some(\"opt\"),\r\n  \"str\",\r\n  1\r\n)\r\n\r\nval anonymized == Foo(\r\nopt = Some(\"@-A9WeZjwa+awzqZSdEZNQWg==\")\r\n,\r\nstr = \"@-Ms3snktf//qQkCS0pxCFDuLhtNPxn/2PJImMPoQBmZes+h+d3Q39yiEojcksp2agyxDgzXstaSbe/+zMWSOVAg==\"\r\n,\r\ninteger = 1\r\n)\r\n//\u003e true\r\n```\r\n\r\n## Supported types\r\n\r\nBy default, [`Anonymizer`](src/main/scala-2/sweet/delights/anonymization/Anonymizer.scala) hashes arrays of bytes. But\r\nany type `T` - other than products and co-products - that can be transformed into an array of bytes can be hashed.\r\n\r\nThe support for additional types is done via [`Injections`](src/main/scala-2/sweet/delights/anonymization/Injection.scala),\r\na mechanism borrowed from the [`frameless`](https://github.com/typelevel/frameless) library.\r\n\r\nFor example, support for strings is added with the following:\r\n\r\n```scala\r\nimport org.apache.commons.codec.binary.Base64\r\nimport sweet.delights.anonymization.Injection\r\n\r\nlazy val anonymizedPrefix = \"@:\"\r\n\r\nimplicit lazy val stringInjection: Injection[String, Array[Byte]] = new Injection[String, Array[Byte]] {\r\n  override def isAnonymized(t: String): Boolean = t.startsWith(anonymizedPrefix)\r\n\r\n  override def apply(t: String): Array[Byte] = t.getBytes(\"UTF-8\")\r\n\r\n  override def invert(u: Array[Byte]): String = anonymizedPrefix + Base64.encodeBase64String(u)\r\n}\r\n```\r\n\r\nComments:\r\n- idempotence is achieved by calling the `isAnonymized` function. If it returns true then the value `t` is not\r\n  re-hashed. Otherwise the specified hashing algorithm is applied. \r\n- it is up to the user to decide which injections are to be idempotent or not\r\n- the default hashing implementation of strings is idempotent\r\n\r\n## Supported hashing algorithms\r\n\r\nThe hashing algorithms are those supported by\r\n[Java 8](https://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#MessageDigest):\r\n- MD5\r\n- SHA-1\r\n- SHA-256\r\n- SHA-384\r\n- SHA-512\r\n\r\nOther algorithms, not necessarly hashing algorithms, could be implemented. For instance, the anonymization \r\nmethod `FirstLetter`-of-a-string could be added. Contributions welcome!\r\n\r\n## Acknowledgments\r\n- the [`shapeless`](https://github.com/milessabin/shapeless) library\r\n- the [`frameless`](https://github.com/typelevel/frameless) library for the `Injection` mechanism\r\n- the [`Apache Commons Codec`](https://commons.apache.org/proper/commons-codec/) library\r\n- the [The Type Astronaut's Guide to Shapeless](https://underscore.io/books/shapeless-guide/) book\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsweet-delights%2Fdelightful-anonymization","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsweet-delights%2Fdelightful-anonymization","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsweet-delights%2Fdelightful-anonymization/lists"}