diff --git a/test/assets/d.artifact.tgz b/test/assets/d.artifact.tgz new file mode 100644 index 0000000..390b823 Binary files /dev/null and b/test/assets/d.artifact.tgz differ diff --git a/test/assets/d.stmt.json b/test/assets/d.stmt.json deleted file mode 100644 index 8ca8cb0..0000000 --- a/test/assets/d.stmt.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "_type": "https://in-toto.io/Statement/v1", - "subject": [ - { - "name": "pkg:npm/sigstore@2.1.0", - "digest": { - "sha512": "90f223f992e4c88dd068cd2a5fc57f9d2b30798343dd6e38f29c240e04ba090ef831f84490847c4e82b9232c78e8a258463b1e55c0f7469f730265008fa6633f" - } - } - ], - "predicateType": "https://slsa.dev/provenance/v1", - "predicate": { - "buildDefinition": { - "buildType": "https://slsa-framework.github.io/github-actions-buildtypes/workflow/v1", - "externalParameters": { - "workflow": { - "ref": "refs/heads/main", - "repository": "https://github.com/sigstore/sigstore-js", - "path": ".github/workflows/release.yml" - } - }, - "internalParameters": { - "github": { - "event_name": "push", - "repository_id": "495574555", - "repository_owner_id": "71096353" - } - }, - "resolvedDependencies": [ - { - "uri": "git+https://github.com/sigstore/sigstore-js@refs/heads/main", - "digest": { - "gitCommit": "26d16513386ffaa790b1c32f927544f1322e4194" - } - } - ] - }, - "runDetails": { - "builder": { - "id": "https://github.com/actions/runner/github-hosted" - }, - "metadata": { - "invocationId": "https://github.com/sigstore/sigstore-js/actions/runs/6014488666/attempts/1" - } - } - } -} diff --git a/test/test_bundle.py b/test/test_bundle.py index 8a52f6e..ae1f556 100644 --- a/test/test_bundle.py +++ b/test/test_bundle.py @@ -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") @@ -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") @@ -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") @@ -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") @@ -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") @@ -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")