Skip to content

primelib/osv4j

Folders and files

NameName
Last commit message
Last commit date
Feb 4, 2024
Feb 4, 2024
Jan 19, 2024
Sep 2, 2023
Sep 2, 2023
Sep 2, 2023
Feb 4, 2024
Nov 15, 2023
Sep 2, 2023
Sep 2, 2023
Sep 13, 2023
Sep 2, 2023
Sep 2, 2023

Repository files navigation

OSV4J

Maven Central javadoc

A java library for the OSV API.

Installation

implementation("io.github.primelib:osv4j:<latestVersion>")

Click to view instructions for other build tools.

Usage

Consumer Specification Approach

OSVConsumerApi client = OSVFactory.create(spec -> {
    spec.api(OSVConsumerApi.class);
});

client.getVulnById(spec -> spec.id("GHSA-jfh8-c2jp-5v3q"));

Parameter Approach

OSVApi client = OSVFactory.create(spec -> {
    spec.api(OSVApi.class);
});

client.getVulnById("GHSA-jfh8-c2jp-5v3q");

NOTE: The Parameter Approach can break if the API changes. The Consumer Specification Approach is more resilient to API changes.

Links

License

Released under the MIT License.