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

[24.0 backport] cli/registry: fix client.pullManifestList not de-referencing manifest, and remove "v1" check #4542

Merged
merged 2 commits into from
Aug 29, 2023

Conversation

thaJeztah
Copy link
Member


cli/registry: fix client.pullManifestList not de-referencing manifest

Kudos to gosec;

cli/registry/client/fetcher.go:205:57: G601: Implicit memory aliasing in for loop. (gosec)
        imageManifest.Descriptor.Platform = types.OCIPlatform(&manifestDescriptor.Platform)
                                                              ^

cli/registry: client.iterateEndpoints: remove check for APIVersion1

registryService.LookupPullEndpoints uses lookupV2Endpoints
https://github.com/moby/moby/blob/v24.0.5/registry/service.go#L137-L142

which, as the name indicates, only returns V2 endpoints;
https://github.com/moby/moby/blob/v24.0.5/registry/service_v2.go#L10-L80

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

Kudos to gosec;

    cli/registry/client/fetcher.go:205:57: G601: Implicit memory aliasing in for loop. (gosec)
            imageManifest.Descriptor.Platform = types.OCIPlatform(&manifestDescriptor.Platform)
                                                                  ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 5250f1b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
registryService.LookupPullEndpoints uses lookupV2Endpoints
https://github.com/moby/moby/blob/v24.0.5/registry/service.go#L137-L142

which, as the name indicates, only returns V2 endpoints;
https://github.com/moby/moby/blob/v24.0.5/registry/service_v2.go#L10-L80

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 22b4bab)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah merged commit 3789f8a into docker:24.0 Aug 29, 2023
74 checks passed
@thaJeztah thaJeztah deleted the 24.0_backport_manifest_deref branch August 29, 2023 09:43
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.

None yet

2 participants