fix(backend): move Docker client to the maintained moby client module (#1935)
github.com/docker/docker is frozen at v28.5.2 — moby publishes v29+ under
github.com/moby/moby/v2, with the API client split out into the standalone
github.com/moby/moby/client and github.com/moby/moby/api modules. That leaves
five Dependabot alerts on the old module path with no reachable fix version:
CVE-2026-42306 high docker cp bind mount redirection <= 28.5.2
CVE-2026-41567 high PUT /containers/{id}/archive <= 28.5.2
CVE-2026-41568 medium docker cp symlink swap <= 28.5.2
CVE-2026-34040 high AuthZ plugin bypass < 29.3.1
CVE-2026-33997 medium plugin privilege off-by-one < 29.3.1
All five are daemon-side defects, and we only ever imported the client. Moving
to the split client module drops the daemon source out of the module graph
entirely, so these alerts resolve and future daemon advisories will not flag us
at all. It also trims six transitive dependencies.
The new client takes an options struct per call and returns a result struct, so
this is a mechanical rewrite of the wrapper. Behavioural notes:
- Ports moved from docker/go-connections/nat to moby/api/types/network, where
Port is opaque and PortBinding.HostIP is a netip.Addr. buildDockerPortBindings
now returns an error for out-of-range ports and unparseable host IPs instead
of handing the daemon a malformed request. An empty HostIP still maps to the
zero address, preserving "publish on all interfaces".
- DiskUsage needs Verbose to get per-image and per-container records; the
aggregate LayersSize is now Images.TotalSize.
- BuildCachePrune no longer takes KeepStorage — the client derives the legacy
keep-storage parameter from ReservedSpace for daemons on API <= 1.47.
- ImagesPrune is now ImagePrune.
- Container state and health are typed string enums, and InspectResponse.Config
and .State are pointers, so inspect mapping guards for nil.
Also corrects the RUSTSEC-2024-0429 note in the cargo-audit ignore list. It
claimed the advisory resolves once Tauri moves to webkit2gtk-4.1, but Tauri v2
is already on those bindings and still resolves glib to 0.18.5; the real
blocker is that gtk3-rs is archived. Backport submitted upstream.
Co-authored-by: Kandev Agent <agent@kandev.dev>
This commit is contained in:
@@ -19,8 +19,18 @@ ignore = [
|
||||
# Fix: upgrade rand to >= 0.8.6 (semver-breaking; requires coordinating dependents).
|
||||
"RUSTSEC-2026-0097",
|
||||
|
||||
# glib 0.18.5 — unsound VariantStrIter::impl_get, Linux-only via webkit2gtk chain.
|
||||
# No known exploit in the wild; will resolve when Tauri migrates to webkit2gtk-4.1
|
||||
# which pulls glib >= 0.20.0.
|
||||
# glib 0.18.5 — unsound VariantStrIter::impl_get, Linux-only via the gtk 0.18
|
||||
# chain that Tauri v2 uses for its Linux backend.
|
||||
#
|
||||
# The advisory's fix version (0.20.0) is not reachable: gtk-rs/gtk3-rs, which
|
||||
# publishes gtk/gdk/webkit2gtk, was archived in March 2024 and will never
|
||||
# release a version depending on glib >= 0.20. Tauri closed its own tracking
|
||||
# issue as not_planned and targets the GTK4 migration at Tauri v3
|
||||
# (tauri-apps/tauri#12564).
|
||||
#
|
||||
# A glib 0.18.6 patch release would fix this for us automatically, since
|
||||
# gtk 0.18.2 depends on glib with a caret requirement. Backport submitted
|
||||
# upstream: gtk-rs/gtk-rs-core#2009, release request #2010. Drop this entry
|
||||
# once 0.18.6 ships.
|
||||
"RUSTSEC-2024-0429",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user