Verify Java and the JVM deployments

Build the application in CI or on the server, and deploy the dependency jars as files in a directory such as lib/ or libs/. Jars are copied from the repository unchanged, so each jar's SHA-256 must be one the build pinned. The attester hashes every jar in each dependency directory and reads its Maven coordinates, and inspects each JVM process. The verifier compares each jar's hash with Gradle's dependency verification metadata or a Maven lockfile at the deployed commit. The application's own jar is build output: compare it with a build the verifier runs, or deploy it in an attested release.

Lockfilegradle/verification-metadata.xml or lockfile.json (maven-lockfile)
ReferencePinned jar SHA-256; Maven Central for unpinned jars
What is verifiedDependency jars in lib/, libs/ and build directories

How it works

The lockfile is read at the deployed commit, from the verifier's own clone of the public repository, never from the server. Every package is compared with the reference the lockfile pins, fetched and checked by hash. Besides the packages, the deployed files are compared with the commit, every process of the service is inspected, and every running executable and library is explained by a reference. A reference that cannot be fetched makes the result inconclusive, never passing.

The Java and the JVM guide

The Java and the JVM guide covers the setup for the project, the attester and the verifier:

Read the Java and the JVM guide

Other languages