{"id":37021217,"url":"https://github.com/tvinke/bulletproof","last_synced_at":"2026-01-14T02:29:58.268Z","repository":{"id":57723749,"uuid":"92955372","full_name":"tvinke/bulletproof","owner":"tvinke","description":"Groovy AST transformations, such as @ValueObject and @NonNull, which makes constructing an instance more bullet-proof.","archived":false,"fork":false,"pushed_at":"2017-09-08T08:06:34.000Z","size":221,"stargazers_count":11,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-08-05T20:51:26.507Z","etag":null,"topics":["ast","groovy","groovy-language","lombok"],"latest_commit_sha":null,"homepage":"","language":"Groovy","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/tvinke.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}},"created_at":"2017-05-31T14:35:59.000Z","updated_at":"2020-10-05T09:20:18.000Z","dependencies_parsed_at":"2022-08-25T11:01:44.440Z","dependency_job_id":null,"html_url":"https://github.com/tvinke/bulletproof","commit_stats":null,"previous_names":[],"tags_count":2,"template":null,"template_full_name":null,"purl":"pkg:github/tvinke/bulletproof","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvinke%2Fbulletproof","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvinke%2Fbulletproof/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvinke%2Fbulletproof/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvinke%2Fbulletproof/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tvinke","download_url":"https://codeload.github.com/tvinke/bulletproof/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvinke%2Fbulletproof/sbom","scorecard":{"id":903376,"data":{"date":"2025-08-11","repo":{"name":"github.com/tvinke/bulletproof","commit":"4c99502d012bf2c630a31f1902d05947292f8057"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/22 approved changesets -- score normalized to 0","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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"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":"Binary-Artifacts","score":8,"reason":"binaries present in source code","details":["Warn: binary detected: bulletproof-core/bin/tvinke/bulletproof/transform/NonNull.class:1","Warn: binary detected: gradle/wrapper/gradle-wrapper.jar:1"],"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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"}}]},"last_synced_at":"2025-08-24T16:29:02.397Z","repository_id":57723749,"created_at":"2025-08-24T16:29:02.398Z","updated_at":"2025-08-24T16:29:02.398Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["ast","groovy","groovy-language","lombok"],"created_at":"2026-01-14T02:29:57.755Z","updated_at":"2026-01-14T02:29:58.262Z","avatar_url":"https://github.com/tvinke.png","language":"Groovy","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Travis CI](https://img.shields.io/travis/tvinke/bulletproof.svg)](https://travis-ci.org/tvinke/bulletproof)\n[![Maven Central](https://img.shields.io/maven-central/v/com.github.tvinke/bulletproof.svg)](http://repo1.maven.org/maven2/com/github/tvinke/bulletproof/0.2/bulletproof-0.2.jar)\n[![GitHub release](https://img.shields.io/github/tag/tvinke/bulletproof.svg)](https://github.com/tvinke/bulletproof/releases/tag/v0.2)\n# Bulletproof\n*Groovy AST transformations, such as @ValueObject and @NonNull, which makes constructing an instance more bullet-proof.*\n\n![bulletproof logo](https://raw.githubusercontent.com/tvinke/bulletproof/master/logo.png)\n\nGroovy has the `Immutable` annotation which allows to create immutable classes, which is a prerequisite for creating [value objects](https://en.wikipedia.org/wiki/Value_object). Unfortunately, when a class has been annotated with `Immutable` it's no longer possible to add your own constructor to verify if provided parameters are not `null`, making our value objects really bullet-proof.\n\n*See [Ted Vinke Blog: Make Your Groovy Objects More Bullet-Proof](https://tedvinke.wordpress.com/2017/08/30/make-your-groovy-objects-more-bullet-proof/)*\n\nBulletproof helps to fill this gap by adding a few AST transformations.\n * The `NonNull` annotation which modifies every constructor to perform null-checks. Add this to an `Immutable` class and no `null` slips past your constructor.\n * The `ValueObject` meta-annotation which puts both `NonNull` and `Immutable` on your class as a convenience to do above step with one annotation.\n\n## Contents\n * [Prerequisites](#prerequisites)\n * [Installation](#installation)\n * [Annotations](#annotations)\n   * [@NonNull](#nonnull)\n   * [@ValueObject](#value-object)\n * [Future Changes](#future-changes)\n\n## Prerequisites\n\nBulletproof requires Java 7 or later.\n\n## Installation\n\nAdd the bulletproof jar to the classpath in your preferred way and you're set.\n\n### Grape\n```groovy\n@Grab('com.github.tvinke:bulletproof:0.2') \n```\n\n### Gradle\n```groovy\ncompile group: 'com.github.tvinke', name: 'bulletproof', version: '0.2'\n```\n\n### Maven\n```xml\n \u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.tvinke\u003c/groupId\u003e\n    \u003cartifactId\u003ebulletproof\u003c/artifactId\u003e\n    \u003cversion\u003e0.2\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Annotations\n\nConsult the [bulletproof 0.2 Groovydocs](http://tvinke.github.io/bulletproof/v0.2/groovydoc/) for complete API information.\n\n### NonNull\n\nThe `NonNull` annotation on the class-level triggers an AST transformation which modifies every constructor to perform a null-check.\n\n```groovy\n@groovy.transform.Immutable\n@tvinke.bulletproof.transform.NonNull\nclass Person {\n    String name\n}\nnew Person() // throws IllegalArgumentException: \"Name can not be null\"\n```\n\n### Value Object\n\nThe `ValueObject` meta-annotation combines the `Immutable` and `NonNull` annotations, which is used to assist in the creation of [value objects](https://en.wikipedia.org/wiki/Value_object).\n\n```groovy\n@tvinke.bulletproof.transform.ValueObject\nclass Money {\n    BigDecimal amount\n}\n\nnew Money(amount: null) // throws IllegalArgumentException because of NonNull\n\ndef money = new Money(2.95)\nmoney.amount = 3.0 // throws ReadOnlyPropertyException because of Immutable\n```\n\n## Future Changes\n\n * Consider allowing a _mutable_ object (e.g. default Map constructor, or with `TupleConstructor`) also to have null-checks performed. In this case probably also through the setters.\n * In above case, then probably you need you want to specify which properties need to be null-checked instead of just everything.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftvinke%2Fbulletproof","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftvinke%2Fbulletproof","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftvinke%2Fbulletproof/lists"}