Verify Go deployments

A Go service is one static binary. Its hash is what proves what it is, and it can be checked in two ways: the verifier builds the same commit itself and compares the bytes, or CI builds the binary, writes a release manifest and attests it. In both cases the verifier also reads the build information Go records in the binary (module, commit, vcs.modified, and every dependency with its go.sum hash) and compares it with go.mod and go.sum at the deployed commit.

Lockfilego.sum
ReferenceA build by the verifier, or an attested release
What is verifiedThe binary, and its recorded module, commit and dependencies

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 Go guide

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

Read the Go guide

Other languages