Skip to content

Fix incorrect delegation in diamond-shape case - #2978

Open
jku wants to merge 1 commit into
theupdateframework:developfrom
jku:fix-diamond-delegation
Open

Fix incorrect delegation in diamond-shape case#2978
jku wants to merge 1 commit into
theupdateframework:developfrom
jku:fix-diamond-delegation

Conversation

@jku

@jku jku commented Aug 5, 2026

Copy link
Copy Markdown
Member

In a diamond delegation (where a role is delegated to from multiple delegating roles), if client has already verified a delegation through one branch and is now verifying the delegation through the other branch, it should still make sure the delegation is correctly signed with the second set of signers.

The fix could be smaller (and isolated in updater.py) but I added the refactoring with TrustedMetadataSet._add() and TrustedMetadataSet.contains() to make this clearer.

Fixes #2977

Test is ai generated, other code ai assisted.

In a diamond delegation (where a role is delegated to from
multiple delegating roles), if client has already verified a
delegation through one branch and is now verifying the delegation
through the other branch, it should still make sure the delegation
is correctly signed via the second set of signers.

The fix could be smaller and isloated in updater.py but I added the
refactoring with `TrustedMetadataSet._add()` and `TrustedMetadataSet.contains()`
to make this clearer.

Fixes theupdateframework#2977

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
@jku
jku requested a review from a team as a code owner August 5, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Diamond shape delegation can lead to incorrect results

1 participant