Newline in cosign generate
payload results in differing sha256sum
#3392
Labels
bug
Something isn't working
cosign generate
payload results in differing sha256sum
#3392
Description
The newline appended to the end of the payload with
cosign generate
results in a sha256sum that differs from the sha produced bycosign sign --output-payload ...
and the sha that is embedded in ahashedrekord
object'shashedrekordobj.data.hash.value
field. These should be consistent as they aid in verification and in understanding the relationships between the image and its uploaded metadata.Steps to reproduce:
Note that after signing the image with tlog upload enabled, the hash in the
hashedrekordobj.data.hash.value
field matches the hash of theoutput_payload
. Even though including the newline in thegenerated_payload
looks cleaner, I think it should be removed in order to match what is visible in the rekor object.Version
This uses cosign version 2.2.1 (it should be reproducible with any version 2.0.2 or higher).
The text was updated successfully, but these errors were encountered: