Repository navigation
Fix VerifyBlob target descriptor decoding and skipped verification handling - #601
Conversation
cshung
left a comment
There was a problem hiding this comment.
LGTM. I reproduced the empty-descriptor bug through an instrumented CLI and confirmed that this fix returns the correct digest, size, media type, and annotations from the original signature, without re-signing.
Validated JWS and COSE signatures, unchanged rejection behavior for invalid inputs and untrusted certificates, and correct handling of explicit skip. Existing OCI verification remained unchanged. Both CLI and SDK race-enabled regression suites passed.
No blocking findings. Approve.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #601 +/- ##
==========================================
+ Coverage 82.76% 82.80% +0.03%
==========================================
Files 36 36
Lines 2629 2635 +6
==========================================
+ Hits 2176 2182 +6
Misses 311 311
Partials 142 142 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
cshung
left a comment
There was a problem hiding this comment.
Suggested tests for the patch-coverage gate. No production changes.
cshung
left a comment
There was a problem hiding this comment.
Thanks for adding the verifier-outcome tests. I pulled this revision and ran the complete race-enabled make test suite; it passes. The generated coverage profile shows 8 of 9 changed executable lines fully covered (88.89%), above the 80% patch target. Both new defensive error paths are now exercised, and no production code changed since the earlier review.
No blocking findings. GitHub Actions is currently awaiting maintainer approval, so this is independent local validation rather than a fresh Codecov result.
yizha1
left a comment
There was a problem hiding this comment.
LGTM. Thanks @rene-founder
|
Hi @rene-founder can you sign the commit, check out the guide here: https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits |
985fbe3 to
6e875d5
Compare
|
Hi @yizha1, thanks for the heads-up. I have signed the commits on this branch (both commits now show René Atencio Roa |
Signed-off-by: René Atencio Roa <rene@alekore.ai>
Signed-off-by: René Atencio Roa <rene@alekore.ai>
VerifyBlobcurrently decodes the signed payload directly into an OCI descriptor. The descriptor is nested undertargetArtifactin the Notation envelope payload, so this can return an empty descriptor despite successful verification.Decode the content as
envelope.Payloadand return itsTargetArtifact. Also handle theskipverification level consistently withVerify: when verification is skipped and no envelope content is available, return the zero descriptor and verification outcome without dereferencing nil. Return a controlled error if the verifier supplies no outcome or omits envelope content outside the skip case.The tests cover the returned target descriptor, the skip path, and rejection when the requested content media type differs from the signed artifact.
Validation: the focused tests pass on Windows.
go test -count=1 ./...reports four failures innotation-go/diron this Windows host because those tests expect Unix-style paths; the other reported packages pass. No changes were made todir/.René Atencio Roa | Alekore Systems Inc. (rene@alekore.ai)