|
37 | 37 | - [Verification for Google Cloud Build](#verification-for-google-cloud-build)
|
38 | 38 | - [Artifacts](#artifacts-1)
|
39 | 39 | - [Containers](#containers-1)
|
| 40 | +- [Verification Summary Attestations (VSA)](#verification-summary-attestations-vsa) |
| 41 | + - [Caveats](#caveats) |
| 42 | + - [Sigstore](#sigstore) |
| 43 | + - [Subject Resource Descriptors](#subject-resource-descriptors) |
40 | 44 | - [Known Issues](#known-issues)
|
41 | 45 | - [tuf: invalid key](#tuf-invalid-key)
|
42 | 46 | - [panic: assignment to entry in nil map](#panic-assignment-to-entry-in-nil-map)
|
@@ -481,6 +485,68 @@ The verified in-toto statement may be written to stdout with the
|
481 | 485 |
|
482 | 486 | Note that `--source-uri` supports GitHub repository URIs like `github.com/$OWNER/$REPO` when the build was enabled with a Cloud Build [GitHub trigger](https://cloud.google.com/build/docs/automating-builds/github/build-repos-from-github). Otherwise, the build provenance will contain the name of the Cloud Storage bucket used to host the source files, usually of the form `gs://[PROJECT_ID]_cloudbuild/source` (see [Running build](https://cloud.google.com/build/docs/running-builds/submit-build-via-cli-api#running_builds)). We recommend using GitHub triggers in order to preserve the source provenance and valiate that the source came from an expected, version-controlled repository. You _may_ match on the fully-qualified tar like `gs://[PROJECT_ID]_cloudbuild/source/1665165360.279777-955d1904741e4bbeb3461080299e929a.tgz`.
|
483 | 487 |
|
| 488 | +## Verification Summary Attestations (VSA) |
| 489 | + |
| 490 | +We have support for [verifying](https://slsa.dev/spec/v1.1/verification_summary#how-to-verify) VSAs. |
| 491 | +Rather than passing in filepaths as arguments, we allow passing in mulitple `--subject-digest` cli options, to |
| 492 | +accomodate subjects that are not simple-files. |
| 493 | + |
| 494 | + |
| 495 | +The verify-vsa command |
| 496 | + |
| 497 | +```shell |
| 498 | +$ slsa-verifier verify-vsa --help |
| 499 | +Verifies SLSA VSAs for the given subject-digests |
| 500 | + |
| 501 | +Usage: |
| 502 | + slsa-verifier verify-vsa [flags] subject-digest [subject-digest...] |
| 503 | + |
| 504 | +Flags: |
| 505 | + --attestation-path string path to a file containing the attestation |
| 506 | + -h, --help help for verify-vsa |
| 507 | + --print-attestation [optional] print the contents of attestation to stdout |
| 508 | + --public-key-id string [optional] the ID of the public key, defaults to the SHA256 digest of the base64-encoded public key |
| 509 | + --public-key-path string path to a public key file |
| 510 | + --resource-uri string the resource URI to be verified |
| 511 | + --subject-digest stringArray the digests to be verified. Pass multiple digests by repeating the flag. e.g. --subject-digest <digest type>:<digest value> --subject-digest <digest type>:<digest value> |
| 512 | + --verified-level stringArray [optional] the levels of verification to be performed. Pass multiple digests by repeating the flag, e.g., --verified-level SLSA_BUILD_LEVEL_2 --verified-level FEDRAMP_LOW' |
| 513 | + --verifier-id string the unique verifier ID who created the attestation |
| 514 | +``` |
| 515 | +
|
| 516 | +To verify VSAs, invoke like this |
| 517 | +
|
| 518 | +```shell |
| 519 | +$ slsa-verifier verify-vsa \ |
| 520 | +--subject-digest gce_image_id:8970095005306000053 \ |
| 521 | +--attestation-path ./cli/slsa-verifier/testdata/vsa/gce/v1/gke-gce-pre.bcid-vsa.jsonl \ |
| 522 | +--verifier-id https://bcid.corp.google.com/verifier/bcid_package_enforcer/v0.1 \ |
| 523 | +--resource-uri gce_image://gke-node-images:gke-12615-gke1418000-cos-101-17162-463-29-c-cgpv1-pre \ |
| 524 | +--verified-level BCID_L1 \ |
| 525 | +--verified-level SLSA_BUILD_LEVEL_2 \ |
| 526 | +--public-key-path ./cli/slsa-verifier/testdata/vsa/gce/v1/vsa_signing_public_key.pem \ |
| 527 | +--public-key-id keystore://76574:prod:vsa_signing_public_key \ |
| 528 | +--print-attestation |
| 529 | +``` |
| 530 | +
|
| 531 | +For multiple subjects, use: |
| 532 | +
|
| 533 | +``` |
| 534 | +--subject-digest sha256:abc123 |
| 535 | +--subject-digest sha256:xyz456 |
| 536 | +``` |
| 537 | +
|
| 538 | +### Caveats |
| 539 | +
|
| 540 | +#### Sigstore |
| 541 | +
|
| 542 | +This support does not work yet with VSAs wrapped in Sigstore bundles, only with simple DSSE envelopes. |
| 543 | +With that, we allow the user to pass in the public key. |
| 544 | +Note that if the DSSE Envelope `signatures` specifies a `keyid` that is not a unpadded base64 encoded sha256 hash the key, like `sha256:abc123...` (not a well-known identifier, e.g, `my-kms:prod-vsa-key`), then you must supply the `--public-key-id` cli option. |
| 545 | +
|
| 546 | +#### Subject Resource Descriptors |
| 547 | +
|
| 548 | +According to slsa.dev's [VSA schema](https://slsa.dev/spec/v1.1/verification_summary#schema), we only support the Subject's `Name` and `Digest`, not the full in_toto [Statement](https://pkg.go.dev/github.com/in-toto/attestation/go/v1#Statement)'s [ResourceDescriptor](https://github.com/in-toto/attestation/blob/main/spec/v1/resource_descriptor.md). |
| 549 | + |
484 | 550 | ## Known Issues
|
485 | 551 |
|
486 | 552 | ### tuf: invalid key
|
|
0 commit comments