Skip to content

Commit

Permalink
Correct the type used for attest (#2128)
Browse files Browse the repository at this point in the history
* Correct the type used for attest

Signed-off-by: Matt Moore <[email protected]>

* Add buildType to slsaprovenance attestation

Signed-off-by: Matt Moore <[email protected]>
  • Loading branch information
mattmoor authored Aug 4, 2022
1 parent c5fda01 commit a39ce91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,7 @@ func TestSaveLoadAttestation(t *testing.T) {
must(verify(pubKeyPath, imgName, true, nil, ""), t)

// now, append an attestation to the image
slsaAttestation := `{ "builder": { "id": "2" }, "recipe": {} }`
slsaAttestation := `{ "buildType": "x", "builder": { "id": "2" }, "recipe": {} }`
slsaAttestationPath := filepath.Join(td, "attestation.slsa.json")
if err := os.WriteFile(slsaAttestationPath, []byte(slsaAttestation), 0600); err != nil {
t.Fatal(err)
Expand All @@ -1001,7 +1001,7 @@ func TestSaveLoadAttestation(t *testing.T) {
// Now attest the image
ko = options.KeyOpts{KeyRef: privKeyPath, PassFunc: passFunc}
must(attest.AttestCmd(ctx, ko, options.RegistryOptions{}, imgName, "", "", false, slsaAttestationPath, false,
"custom", false, 30*time.Second, false), t)
"slsaprovenance", false, 30*time.Second, false), t)

// save the image to a temp dir
imageDir := t.TempDir()
Expand Down

0 comments on commit a39ce91

Please sign in to comment.