Skip to content

Commit dadc81e

Browse files
Add warning when verifying with artifact digest (#461)
This discourages using an artifact digest to verify an in-toto attestation, and mentions that it breaks Ed25519 verification. Fixes #444 Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>
1 parent 22f84aa commit dadc81e

File tree

7 files changed

+20
-6
lines changed

7 files changed

+20
-6
lines changed

gen/jsonschema/schemas/Artifact.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"artifactDigest": {
1818
"$ref": "#/definitions/dev.sigstore.common.v1.HashOutput",
1919
"additionalProperties": false,
20-
"description": "Digest of the artifact"
20+
"description": "Digest of the artifact. SHOULD NOT be used when verifying an in-toto attestation as the subject digest cannot be reconstructed. This option will not work with Ed25519 signatures, use Ed25519Ph or another algorithm instead."
2121
}
2222
},
2323
"additionalProperties": false,

gen/jsonschema/schemas/Input.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@
657657
"artifactDigest": {
658658
"$ref": "#/definitions/dev.sigstore.common.v1.HashOutput",
659659
"additionalProperties": false,
660-
"description": "Digest of the artifact"
660+
"description": "Digest of the artifact. SHOULD NOT be used when verifying an in-toto attestation as the subject digest cannot be reconstructed. This option will not work with Ed25519 signatures, use Ed25519Ph or another algorithm instead."
661661
}
662662
},
663663
"additionalProperties": false,

gen/pb-go/verification/v1/sigstore_verification.pb.go

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gen/pb-python/sigstore_protobuf_specs/dev/sigstore/verification/v1/__init__.py

Lines changed: 6 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gen/pb-rust/sigstore-protobuf-specs/src/generated/dev.sigstore.verification.v1.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,10 @@ pub mod artifact {
265265
/// The raw bytes of the artifact
266266
#[prost(bytes, tag = "2")]
267267
Artifact(::prost::alloc::vec::Vec<u8>),
268-
/// Digest of the artifact
268+
/// Digest of the artifact. SHOULD NOT be used when verifying an
269+
/// in-toto attestation as the subject digest cannot be
270+
/// reconstructed. This option will not work with Ed25519
271+
/// signatures, use Ed25519Ph or another algorithm instead.
269272
#[prost(message, tag = "3")]
270273
ArtifactDigest(super::super::super::common::v1::HashOutput),
271274
}
Binary file not shown.

protos/sigstore_verification.proto

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,10 @@ message Artifact {
136136
string artifact_uri = 1;
137137
// The raw bytes of the artifact
138138
bytes artifact = 2;
139-
// Digest of the artifact
139+
// Digest of the artifact. SHOULD NOT be used when verifying an
140+
// in-toto attestation as the subject digest cannot be
141+
// reconstructed. This option will not work with Ed25519
142+
// signatures, use Ed25519Ph or another algorithm instead.
140143
dev.sigstore.common.v1.HashOutput artifact_digest = 3;
141144
}
142145
}

0 commit comments

Comments
 (0)