Skip to content

Fix in-toto statement verification (GHSA-mhg6-2q2v-9h2c)#300

Merged
bobcallaway merged 2 commits intomainfrom
bugfix
Mar 9, 2026
Merged

Fix in-toto statement verification (GHSA-mhg6-2q2v-9h2c)#300
bobcallaway merged 2 commits intomainfrom
bugfix

Conversation

@Hayden-IO
Copy link
Contributor

This patch fixes four problems in in-toto statement verification.

  • The result of in-toto statement verification was not used at all, so otherwise legitimate bundle passes verification for any inputs.
  • When the in-toto statement contains multiple subjects, the bundle was mistakenly considered as invalid.
  • When the in-toto statement contains subject digests of multiple hash algorithms, the statement might be mistakenly rejected.
  • When comparing subject digests, it did not check the algorithm matches (hash collision with different algorithm is unlikely though).

* verifier: properly verify in-toto statement

This patch fixes four problems in in-toto statement verification.

- The result of in-toto statement verification was not used at all,
  so otherwise legitimate bundle passes verification for any inputs.

- When the in-toto statement contains multiple subjects,
  the bundle was mistakenly considered as invalid.

- When the in-toto statement contains subject digests of multiple
  hash algorithms, the statement might be mistakenly rejected.

- When comparing subject digests, it did not check the algorithm
  matches (hash collision with different algorithm is unlikely
  though).

* run rubocop

Signed-off-by: Bob Callaway <bcallaway@google.com>

---------

Signed-off-by: Bob Callaway <bcallaway@google.com>
Co-authored-by: Kasumi Hanazuki <kasumi@rollingapple.net>
Co-authored-by: Bob Callaway <bcallaway@google.com>
bobcallaway
bobcallaway previously approved these changes Mar 9, 2026
Signed-off-by: Hayden <8418760+Hayden-IO@users.noreply.github.com>
@bobcallaway bobcallaway merged commit 2d7dfa2 into main Mar 9, 2026
41 of 42 checks passed
@bobcallaway bobcallaway deleted the bugfix branch March 9, 2026 22:59
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.

2 participants