This repository has been archived by the owner on Apr 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove builder * Update readme
- Loading branch information
Showing
5 changed files
with
51 additions
and
231 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Verifying provenances | ||
|
||
The [`verifier`](/internal/verifier/) package provides functionality for verifying an input | ||
provenance file. The provenance file should follow the | ||
[Amber provenance](./../pkg/amber/schema/v1/provenance.json) format and provide a list of materials | ||
(including the source code and the build toolchain), and steps for building a binary from the listed | ||
materials. The verification logic uses the provenance file to build a binary, and checks that the | ||
binary has a SHA256 hash equal to the expected digest given in the provenance file. | ||
|
||
Note that the Amber provenance format will soon be deprecated (see | ||
[issue #224](https://github.com/project-oak/transparent-release/issues/224)), and replaced with | ||
[SLSA v1.0 format](https://slsa.dev/provenance/v1). | ||
|
||
To verify a SLSA provenance of the Amber build type run: | ||
|
||
```console | ||
$ go run cmd/verifier/main.go -provenance_path schema/provenance/v1/example.json | ||
``` | ||
|
||
This fetches the sources from the Git repository specified in the SLSA statement file, re-runs the | ||
build, and verifies that it yields the expected hash. | ||
|
||
Check the [`development guidelines`](./../docs/development-guidelines.md) for a quick start to | ||
[`verifying provenances`](./../docs/development-guidelines.md#verifying-provenances). | ||
|
||
To use a local repository you can specify `-git_root_dir`. In this case, the binary will be built | ||
from the repo, only if the latest commit matches the one specified in the config file fail with an | ||
error otherwise. | ||
|
||
```console | ||
$ go run cmd/verifier/main.go \ | ||
-provenance_path schema/provenance/v1/example.json \ | ||
-git_root_dir <path-to-git-repo-root> | ||
``` |
This file was deleted.
Oops, something went wrong.