Skip to content

fix(security): migrate docker/docker to moby/moby modules (BlackDuck Polaris findings)#1402

Open
fzl-22 wants to merge 4 commits into
golang-migrate:masterfrom
fzl-22:master
Open

fix(security): migrate docker/docker to moby/moby modules (BlackDuck Polaris findings)#1402
fzl-22 wants to merge 4 commits into
golang-migrate:masterfrom
fzl-22:master

Conversation

@fzl-22

@fzl-22 fzl-22 commented Jun 14, 2026

Copy link
Copy Markdown

Motivation

BlackDuck Polaris flagged docker v28.3.3 with 3 high-severity CVEs:

Recommended target (long-term): docker-v29.5.3 (no known vulnerabilities).

Changes

github.com/docker/docker is deprecated since v29 ([1], [2]). This PR
replaces all direct imports with github.com/moby/moby/client and
github.com/moby/moby/api, and adapts to the following v29 breaking changes:

  • ContainerCreate, ContainerStart, etc. now use option structs
  • client.IsErrNotFound removed — replaced with error string check
  • Port.Int() replaced by Port.Num() (returns uint16)
  • PortBinding.HostIP changed from string to netip.Addr

Additionally:

  • fixes a pre-existing bug where image cleanup failed in -short
    mode for images that were never pulled.

Limitation

Related Links

@coveralls

coveralls commented Jun 14, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 54.338% (-0.09%) from 54.432% — fzl-22:master into golang-migrate:master

@fzl-22

fzl-22 commented Jun 15, 2026

Copy link
Copy Markdown
Author

@dhui @Fontinalis Could you review this when you get a chance? It addresses a high-severity SCA finding by migrating the docker/docker imports to moby/moby.

All CI checks are passing.

Comment thread go.mod

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

remove approval

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@jhasrasuri Can you clarify what needs fixing in go.mod? Thanks

jhasrasuri

This comment was marked as duplicate.

@fzl-22

fzl-22 commented Jun 17, 2026

Copy link
Copy Markdown
Author

Currently, github.com/docker/docker@v28.3.3 introduces 2 new security findings with HIGH severity:

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.

3 participants