Skip to content

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

Merged
thaJeztah merged 2 commits into
docker:24.0from
thaJeztah:24.0_backport_manifest_deref
Aug 29, 2023
Merged

[24.0 backport] cli/registry: fix client.pullManifestList not de-referencing manifest, and remove "v1" check#4542
thaJeztah merged 2 commits into
docker:24.0from
thaJeztah:24.0_backport_manifest_deref

Conversation

@thaJeztah

Copy link
Copy Markdown
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
@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.

2 participants