Skip to content

Fix fail-open ingredient hash verification in verify_manifest - #167

Merged
marcelamelara merged 1 commit into
mainfrom
verify_manifest_fix
Oct 27, 2026
Merged

marcelamelara merged 1 commit into
mainfrom
verify_manifest_fix

Conversation

@sandlbn

@sandlbn sandlbn commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

verify_manifest() only enforced the recorded hash for file:// ingredient URLs.
For any other scheme the hash comparison was skipped and verification still returned Ok(()) — an ingredient pointing at https://… with a wrong hash was reported as successfully verified.

The ingredient loop is now a single fail-closed path: file:// URLs and local paths are hashed and compared, anything else is rejected.

Also fixes a related bug in the same path: ArtifactLocation::verify() hardcoded SHA-384.

@marcelamelara marcelamelara left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @sandlbn ! LGTM.

@gittuf-app-beta

Copy link
Copy Markdown

Observed review from marcelamelara+93797898 (@marcelamelara)

@marcelamelara
marcelamelara merged commit d7a9c16 into main Oct 27, 2026
5 checks passed
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