Validate snapshot versions in timestamp, targets versions in snapshot#418
Open
erickt wants to merge 3 commits into
Open
Validate snapshot versions in timestamp, targets versions in snapshot#418erickt wants to merge 3 commits into
erickt wants to merge 3 commits into
Conversation
This implements [TUF-1.0.5 §5.3.3.2], which states: > The version number of the targets metadata file, and all > delegated targets metadata files (if any), in the trusted snapshot metadata > file, if any, MUST be less than or equal to its version number in the new > snapshot metadata file. Furthermore, any targets metadata filename that was > listed in the trusted snapshot metadata file, if any, MUST continue to be > listed in the new snapshot metadata file. If any of these conditions are > not met, discard the new snapshot metadadata file, abort the update cycle, > and report the failure. Furthermore, it adds three tests to: * make sure rollbacks are prevented * that trusted target roles cannot be removed in a normal update. * that we can remove a target role with a root roll. Fixes theupdateframework#295. [TUF-1.0.5 §5.3.3.2]: https://github.com/theupdateframework/specification/blob/39c80de07407bd4251ad823976dc4116a4b05043/tuf-spec.md?plain=1#L1210
This implements [TUF-1.0.5 §5.2.2.2], which states: > The version number of the targets metadata file, and all > delegated targets metadata files (if any), in the trusted snapshot metadata > file, if any, MUST be less than or equal to its version number in the new > snapshot metadata file. Furthermore, any targets metadata filename that was > listed in the trusted snapshot metadata file, if any, MUST continue to be > listed in the new snapshot metadata file. If any of these conditions are > not met, discard the new snapshot metadadata file, abort the update cycle, > and report the failure. Furthermore, it adds three tests to: * make sure rollbacks are prevented * that trusted target roles cannot be removed in a normal update. * that we can remove a target role with a root roll. Fixes theupdateframework#294. [TUF-1.0.5 §5.2.2.2]: https://github.com/theupdateframework/specification/blob/39c80de07407bd4251ad823976dc4116a4b05043/tuf-spec.md?plain=1#L1163
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.
This implements:
Furthermore, it adds tests that:
Fixes #294 and #295.