Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Precisely determine the ID of a pulled image #2209

Merged
merged 2 commits into from
Nov 6, 2024

Conversation

mtrmac
Copy link
Contributor

@mtrmac mtrmac commented Oct 21, 2024

This depends on unmerged containers/image#2609 and #2202 .

Instead of computing the manifest digest of the pulled image and looking up an image by digest (which can have several matches with different contents when under attack), obtain the exact image ID directly, using a new c/image API.

Absolutely untested at this point.

mtrmac added a commit to mtrmac/libpod that referenced this pull request Nov 4, 2024
> go mod edit -replace github.com/containers/common=github.com/mtrmac/common@precise-pull-id

Signed-off-by: Miloslav Trmač <[email protected]>
mtrmac added a commit to mtrmac/libpod that referenced this pull request Nov 4, 2024
> go mod edit -replace github.com/containers/common=github.com/mtrmac/common@precise-pull-id

Signed-off-by: Miloslav Trmač <[email protected]>
@mtrmac mtrmac mentioned this pull request Nov 4, 2024
@mtrmac
Copy link
Contributor Author

mtrmac commented Nov 4, 2024

This was manually tested using containers/podman#24447 (comment) , and a Podman test is running in containers/podman#24462 . Please review.

Cc: @Luap99

@mtrmac
Copy link
Contributor Author

mtrmac commented Nov 5, 2024

The c/image PR has been merged, this is ready for review.

@mtrmac mtrmac marked this pull request as ready for review November 5, 2024 18:44
@mtrmac mtrmac changed the title DO NOT MERGE: Precisely determine the ID of a pulled image Precisely determine the ID of a pulled image Nov 5, 2024
@mheon
Copy link
Member

mheon commented Nov 5, 2024

LGTM

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

Love it!
/lgtm

Copy link
Contributor

openshift-ci bot commented Nov 6, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mtrmac, vrothberg

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit de9c6ad into containers:main Nov 6, 2024
16 checks passed
@rhatdan
Copy link
Member

rhatdan commented Nov 6, 2024

Does this fix the zstd:chunked id changing problem?

@mtrmac
Copy link
Contributor Author

mtrmac commented Nov 6, 2024

No

@mtrmac mtrmac deleted the precise-pull-id branch November 6, 2024 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants