{"id":24678677,"url":"https://github.com/contrast-security-oss/java-sarif","last_synced_at":"2025-10-08T11:31:20.711Z","repository":{"id":52647925,"uuid":"306606237","full_name":"Contrast-Security-OSS/java-sarif","owner":"Contrast-Security-OSS","description":"POJOs generated from the Static Analysis Results Interchange Format (SARIF) JSON schema.","archived":false,"fork":false,"pushed_at":"2021-04-22T13:36:14.000Z","size":190,"stargazers_count":22,"open_issues_count":1,"forks_count":4,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-01-19T21:37:59.079Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Contrast-Security-OSS.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2020-10-23T10:43:08.000Z","updated_at":"2024-12-10T09:44:54.000Z","dependencies_parsed_at":"2022-08-21T12:10:37.568Z","dependency_job_id":null,"html_url":"https://github.com/Contrast-Security-OSS/java-sarif","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Contrast-Security-OSS%2Fjava-sarif","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Contrast-Security-OSS%2Fjava-sarif/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Contrast-Security-OSS%2Fjava-sarif/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Contrast-Security-OSS%2Fjava-sarif/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Contrast-Security-OSS","download_url":"https://codeload.github.com/Contrast-Security-OSS/java-sarif/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235706306,"owners_count":19032607,"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":"2025-01-26T13:17:56.725Z","updated_at":"2025-10-08T11:31:15.362Z","avatar_url":"https://github.com/Contrast-Security-OSS.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Java SARIF\n\nContains POJOs generated from the [Static Analysis Results Interchange Format \n](https://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html) (SARIF) \n[JSON schema](https://github.com/oasis-tcs/sarif-spec/blob/master/Schemata/sarif-schema-2.1.0.json).\n\nIt uses Jackson for serialising/deserialing from JSON.\n\n## Usage\n\n### Add as a dependency\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.contrastsecurity\u003c/groupId\u003e\n  \u003cartifactId\u003ejava-sarif\u003c/artifactId\u003e\n  \u003cversion\u003e2.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Developing with Java SARIF\n\nAll classes reside in the `com.contrastsecurity.sarif` package. The JSON schema used to generate \nthem is located in `src/main/resources/schema`.\n\n#### Building Objects\n\nBuilding is provided with method chaining, e.g. for Message\n\n```java\nimport com.contrastsecurity.sarif.Message;\n// ...\nMessage message = new Message()\n    .withText(\"SQL Injection\")\n    .withMarkdown(\"# SQL Injection\");\n```\n\nPublic Getters \u0026 Setters are provided.\n\n#### Jackson\n\nClasses are decorated with `@JsonInclude(JsonInclude.Include.NON_DEFAULT)` and `@JsonPropertyOrder`\nwhich dictates the order from the JSON schema.\n\n```java\nimport com.fasterxml.jackson.annotation.JsonInclude;\nimport com.fasterxml.jackson.annotation.JsonProperty;\n// ...\n@JsonInclude(JsonInclude.Include.NON_DEFAULT)\n@JsonPropertyOrder({\n    \"text\",\n    \"markdown\",\n    \"id\",\n    \"arguments\",\n    \"properties\"\n})\npublic class Message {\n    // ...\n}\n```\n\n\u003cbr/\u003e\n\u003chr/\u003e\n\u003cbr/\u003e\n\nThis library uses [jsonschema2pojo](https://github.com/joelittlejohn/jsonschema2pojo) for \ngeneration.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontrast-security-oss%2Fjava-sarif","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcontrast-security-oss%2Fjava-sarif","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontrast-security-oss%2Fjava-sarif/lists"}