Repository navigation
Read all certificates in a notation PEM bundle - #2247
Open
Adham-Kiwan wants to merge 1 commit into
Open
Adham-Kiwan wants to merge 1 commit into
Adham-Kiwan wants to merge 1 commit into
Conversation
The notation trust store decoded only the first PEM block of each entry and silently dropped the rest, so signatures chaining to a later CA in a bundle failed verification. Assisted-by: claude-code/claude-sonnet-5-5 Signed-off-by: Adham Kiwan <adhamkiwan@outlook.com>
Adham-Kiwan
force-pushed
the
fix/notation-pem-bundle
branch
from
November 26, 2026 18:28
69fad74 to
83f503e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The notation trust store called
pem.Decodeonce per entry and ignored the rest of the data. If a Secret key held a bundle with several certificates, every certificate after the first was dropped, so signatures chaining to a later CA failed verification.All PEM blocks in each entry are now parsed. Raw DER input is handled as before. A bundle with an invalid later block now returns an error instead of silently ignoring it.
This addresses the first problem in #2246. The second one (
storeTypeandnamedStorebeing ignored) needs a design decision, so I left it out.Testing
Added
TestTrustStoreGetCertificates. I did not run the fullmake testlocally; these ran in a GitHub Actions run on my fork:go test -race ./internal/oci/notation/passes with the fix.notation.go, the new test fails.gofmtandgo vetpass. golangci-lint reported oneerrcheckfinding innotation_test.go, a file this PR does not change.AI disclosure: written with Claude Code, as noted in the
Assisted-bycommit trailer.Relates to #2246
🤖 Generated with Claude Code