Strip a tag's signature before parsing its trailers - #2
Merged
Conversation
A signed annotated tag appends its signature block straight after the message with no blank line between, so the last paragraph became message-plus-signature and did not parse as trailers at all. The tag-annotation check then passed on every signed tag, whatever it carried. capsize already had this; the hook shared by otel-service-reference, kubernetes-platform-reference and bezilla did not. Proved in a throwaway clone with real signed tags rather than by reading: existing tags still pass, a clean signed tag passes, and a signed tag carrying a disallowed trailer is rejected.
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.
A signed annotated tag appends its signature block straight after the message with no blank line, so the last paragraph parsed as message-plus-signature rather than as trailers. The tag-annotation check therefore passed on every signed tag, whatever it carried.
capsizealready had this; the hook shared by this repository,otel-service-referenceandbezilladid not.Proved in a throwaway clone with real signed tags, not by reading the code:
selftest.shremains 13 as expected, 0 unexpected.