Skip to content

Commit

Permalink
Supply the artifact for the new bundle tests. (#114)
Browse files Browse the repository at this point in the history
Instead of the in-toto statement, which does not have the right hash.

Signed-off-by: Zach Steindler <[email protected]>
  • Loading branch information
steiza authored Dec 11, 2023
1 parent 303dd4b commit c5f5fb2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 53 deletions.
Binary file added test/assets/d.artifact.tgz
Binary file not shown.
47 changes: 0 additions & 47 deletions test/assets/d.stmt.json

This file was deleted.

12 changes: 6 additions & 6 deletions test/test_bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def test_verify_dsse_bundle_with_trust_root(client: SigstoreClient, make_materia
Test the happy path of verification for DSSE bundle w/ custom trust root
"""
materials: BundleMaterials
input_path, materials = make_materials_by_type("d.stmt.json", BundleMaterials)
input_path, materials = make_materials_by_type("d.artifact.tgz", BundleMaterials)
materials.bundle = Path("d.stmt.good.sigstore")
materials.trusted_root = Path("trusted_root.d.json")

Expand Down Expand Up @@ -176,7 +176,7 @@ def test_verify_rejects_expired_certificate(client: SigstoreClient, make_materia
outside the validity window of the trusted root
"""
materials: BundleMaterials
input_path, materials = make_materials_by_type("d.stmt.json", BundleMaterials)
input_path, materials = make_materials_by_type("d.artifact.tgz", BundleMaterials)
materials.bundle = Path("d.stmt.cert-expired.sigstore")
materials.trusted_root = Path("trusted_root.d.json")

Expand All @@ -190,7 +190,7 @@ def test_verify_rejects_missing_inclusion_proof(client: SigstoreClient, make_mat
contain an inclusion proof
"""
materials: BundleMaterials
input_path, materials = make_materials_by_type("d.stmt.json", BundleMaterials)
input_path, materials = make_materials_by_type("d.artifact.tgz", BundleMaterials)
materials.bundle = Path("d.stmt.no-inclusion-proof.sigstore")
materials.trusted_root = Path("trusted_root.d.json")

Expand All @@ -205,7 +205,7 @@ def test_verify_rejects_bad_tlog_timestamp(client: SigstoreClient, make_material
certificate.
"""
materials: BundleMaterials
input_path, materials = make_materials_by_type("d.stmt.json", BundleMaterials)
input_path, materials = make_materials_by_type("d.artifact.tgz", BundleMaterials)
materials.bundle = Path("d.stmt.tlog-timestamp-error.sigstore")
materials.trusted_root = Path("trusted_root.d.json")

Expand All @@ -219,7 +219,7 @@ def test_verify_rejects_bad_tlog_entry(client: SigstoreClient, make_materials_by
not match the signed artifact.
"""
materials: BundleMaterials
input_path, materials = make_materials_by_type("d.stmt.json", BundleMaterials)
input_path, materials = make_materials_by_type("d.artifact.tgz", BundleMaterials)
materials.bundle = Path("d.stmt.tlog-body-error.sigstore")
materials.trusted_root = Path("trusted_root.d.json")

Expand All @@ -233,7 +233,7 @@ def test_verify_rejects_bad_tsa_timestamp(client: SigstoreClient, make_materials
the validity window of the signing certificate.
"""
materials: BundleMaterials
input_path, materials = make_materials_by_type("d.stmt.json", BundleMaterials)
input_path, materials = make_materials_by_type("d.artifact.tgz", BundleMaterials)
materials.bundle = Path("d.stmt.tsa-timestamp-error.sigstore")
materials.trusted_root = Path("trusted_root.d.json")

Expand Down

0 comments on commit c5f5fb2

Please sign in to comment.