CodesWhat develops and maintains Sockguard at getsockguard.com. This is a separate project from Buildkite's Sockguard, which was archived in 2021.
Note
v3.2.0 is the latest stable release. It adds opt-in operator approvals, header credentials for client profiles, and experimental per-profile owners. Review the migration guide before upgrading and see CHANGELOG.md for the release notes.
- Documentation
- Quick Start
- Why Sockguard
- Features
- Supported Profiles
- Feature Comparison
- Configuration
- CLI
- Migration
- Roadmap
- Star History
- Built With
- Community & Support
- CodesWhat Ecosystem
| Resource | Link |
|---|---|
| Website | getsockguard.com |
| Docs | getsockguard.com/docs |
| Getting Started | Getting Started |
| Configuration | Configuration |
| Multi-Host | Multi-Host |
| Swarm Manager Nodes | Swarm Manager Nodes |
| Presets | Presets |
| Podman | Podman |
| Rootless Podman (Quadlet) | Rootless Podman Quadlet |
| Migration | Migration |
| Roadmap | See Roadmap section below, and the docs roadmap |
| CIS Docker Benchmark | CIS Docker Benchmark |
| Admin API | Admin API |
| Observability | Observability |
| Security Model | Security Model |
| Image Verification | Image Verification |
| Changelog | CHANGELOG.md |
| Contributing | Setup, local website/docs servers, and production routing checks |
| Code of Conduct | CODE_OF_CONDUCT.md |
| Governance | GOVERNANCE.md |
| Security Assurance | SECURITY-ASSURANCE.md |
| Security Policy | SECURITY.md |
| Issues | GitHub Issues |
| Discussions | GitHub Discussions |
Drop sockguard in front of any Docker API consumer. The proxy filters requests, your app stays unchanged.
# docker-compose.yml
services:
sockguard:
image: codeswhat/sockguard:latest
restart: unless-stopped
read_only: true
cap_drop:
- ALL
security_opt:
- no-new-privileges:true
group_add:
- "${DOCKER_SOCK_GID:?set to the GID of /var/run/docker.sock}"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- SOCKGUARD_LISTEN_ADDRESS=:2375
- SOCKGUARD_LISTEN_INSECURE_ALLOW_PLAIN_TCP=true
- SOCKGUARD_LISTEN_INSECURE_ALLOW_UNAUTHENTICATED_CLIENTS=true
- SOCKGUARD_INSECURE_ALLOW_READ_EXFILTRATION=true
- CONTAINERS=1
- IMAGES=1
- EVENTS=1
# Your app talks to tcp://sockguard:2375 over the compose network
# instead of mounting /var/run/docker.sock.
drydock:
image: codeswhat/drydock:latest
depends_on:
- sockguard
environment:
- DD_WATCHER_LOCAL_SOCKET=tcp://sockguard:2375Before docker compose up, set DOCKER_SOCK_GID to the socket's numeric group owner (export DOCKER_SOCK_GID=$(stat -c '%g' /var/run/docker.sock) on Linux; use stat -f '%g' on macOS).
By default sockguard listens on loopback TCP 127.0.0.1:2375, not on all interfaces. Non-loopback TCP now requires mutual TLS via listen.tls by default.
The compose example above opts into legacy plaintext TCP so migration from tecnativa/docker-socket-proxy and linuxserver/socket-proxy still works on a private Docker network. A non-loopback plaintext listener requires two deliberate acknowledgments — SOCKGUARD_LISTEN_INSECURE_ALLOW_PLAIN_TCP=true (unencrypted transport) and SOCKGUARD_LISTEN_INSECURE_ALLOW_UNAUTHENTICATED_CLIENTS=true (any host that can reach the port can impersonate a client) — so a single fat-fingered flag cannot expose it. It also opts into SOCKGUARD_INSECURE_ALLOW_READ_EXFILTRATION=true because broad CONTAINERS=1 / IMAGES=1 compatibility includes container process-list, raw archive/export, and log/attach streaming endpoints. Do not publish that plaintext listener to the host or Internet, and remove the read-exfil opt-in once you migrate to tighter YAML list/inspect rules.
If you run sockguard directly on a host, keep SOCKGUARD_LISTEN_ADDRESS=127.0.0.1:2375, configure listen.tls for remote TCP, or switch to SOCKGUARD_LISTEN_SOCKET to avoid a network listener entirely.
Container runtime hardening
Sockguard runs as UID 65532 (Chainguard nonroot) inside the container. On stock Linux Docker hosts where /var/run/docker.sock is 0660 root:docker, add the container to the socket's numeric group ID with group_add or run Sockguard as a user/group that can open the socket. For this class of tool, the meaningful hardening levers are the proxy policy, a read-only root filesystem, dropped capabilities, no-new-privileges, and the host runtime's seccomp/AppArmor/SELinux confinement.
The examples in this README already opt into the container-level controls sockguard actually benefits from:
read_only: truecap_drop: [ALL]security_opt: ["no-new-privileges:true"]
On Linux, one common pattern is:
group_add:
- "${DOCKER_SOCK_GID:?set this to the numeric group owner of /var/run/docker.sock}"Keep Docker's default seccomp profile or replace it with a stricter custom profile via security_opt. On AppArmor or SELinux hosts, keep the runtime's default confinement enabled or replace it with a stricter host policy. If the host runs rootless dockerd, a compromised Docker API client inherits the daemon's reduced authority instead of full host root.
mTLS TCP mode (recommended for remote TCP)
services:
sockguard:
image: codeswhat/sockguard:latest
restart: unless-stopped
read_only: true
cap_drop:
- ALL
security_opt:
- no-new-privileges:true
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./certs:/certs:ro
environment:
- SOCKGUARD_LISTEN_ADDRESS=:2376
- SOCKGUARD_LISTEN_TLS_CERT_FILE=/certs/server-cert.pem
- SOCKGUARD_LISTEN_TLS_KEY_FILE=/certs/server-key.pem
- SOCKGUARD_LISTEN_TLS_CLIENT_CA_FILE=/certs/client-ca.pem
- SOCKGUARD_INSECURE_ALLOW_READ_EXFILTRATION=true
- CONTAINERS=1Non-loopback TCP without listen.tls fails startup unless you explicitly set SOCKGUARD_LISTEN_INSECURE_ALLOW_PLAIN_TCP=true.
Sockguard's server-side TLS minimum for listen.tls is TLS 1.3, so remote clients must support TLS 1.3.
If one client CA issues multiple workloads, narrow the trusted set further in YAML with listen.tls.common_names, dns_names, ip_addresses, uri_sans, and/or public_key_sha256_pins so any CA-issued client cert is not automatically accepted.
Unix socket mode (filesystem-bounded access)
If you prefer to expose sockguard as a unix socket (no network surface at all), opt in by setting SOCKGUARD_LISTEN_SOCKET and sharing the socket via a named volume:
services:
sockguard:
image: codeswhat/sockguard:latest
read_only: true
cap_drop:
- ALL
security_opt:
- no-new-privileges:true
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- sockguard-socket:/var/run/sockguard
environment:
- SOCKGUARD_LISTEN_SOCKET=/var/run/sockguard/sockguard.sock
- SOCKGUARD_INSECURE_ALLOW_READ_EXFILTRATION=true
- CONTAINERS=1
drydock:
image: codeswhat/drydock:latest
depends_on:
- sockguard
volumes:
- sockguard-socket:/var/run/sockguard:ro
environment:
- DD_WATCHER_LOCAL_SOCKET=/var/run/sockguard/sockguard.sock
volumes:
sockguard-socket:Sockguard hardens its own unix socket to 0600 owner-only permissions by default. listen.socket_mode accepts exactly two values: 0600 (the default, no ownership fields needed) or 0660 with an explicit listen.socket_gid, so a group-shared socket is always a deliberate per-listener choice. Any other mode is rejected at startup instead of being applied.
The named-volume quick start creates that socket and its parent directory as UID/GID 65532. A non-root consumer must therefore run as UID 65532 (as the Portwing examples do); a root consumer can also connect. If an application must keep another UID, run Sockguard with that same UID against a pre-owned bind-mounted directory, share the socket with listen.socket_mode: "0660" plus an explicit listen.socket_gid (and listen.socket_uid to chown the freshly bound socket), or use an authenticated TCP listener instead.
The Docker socket is root access to your host. Every container with socket access can escape containment, mount the host filesystem, and pivot to other containers. Yet tools like Traefik, Portainer, and drydock need socket access to function.
Most existing socket proxies stop at method/path or regex filtering. Tecnativa gates broad Docker API sections; LinuxServer adds explicit Podman/libpod families; wollomatic adds regex allowlists, caller admission, bind-source restrictions, JSON logs, and a watchdog; 11notes ships a fixed allow-most-reads proxy over Unix and TCP; and CetusGuard pairs default-deny regex rules with mTLS, native libpod routes, and multiple listeners. Sockguard goes further on body-aware policy enforcement, per-client profiles, ownership isolation, and read-side visibility/redaction, and as of v1.6.0 also covers native /libpod routes and multiple independently scoped listeners.
| Feature | Description |
|---|---|
| Default-Deny Posture | Everything blocked unless explicitly allowed. No match means deny. |
| Granular Control | Allow start/stop while blocking create/exec. Per-operation POST controls with glob matching. |
| Operator Approvals | Opt-in hold rules wait for a decision. The operator uses sockguard approvals on the dedicated admin listener to review the request method, route and selected body fields. Environment values are redacted. Approval applies once to the exact request, and all other policy checks still apply. |
| YAML Configuration | Declarative rules, glob path patterns, first-match-wins evaluation, and canonical path matching that strips API versions, collapses dot segments, and decodes escaped separators before policy evaluation. 34 bundled workload presets (including CIS Docker Benchmark, self-hosted GitHub Actions runners, GitLab Runner, Jenkins, Portwing with build, Portwing with mediated build, drydock with build, drydock with mediated build, and Podman read-only) plus the default config. |
| Structured Access Logging | JSON access logs with method, raw path, normalized path, decision, matched rule, latency, canonical request ID, W3C traceparent correlation fields, and client info. Untrusted string fields escape CR/LF record delimiters as visible \r/\n sequences before reaching slog, preserving forensic content without allowing forged records even through custom handlers. Use normalized_path for SIEM correlation and policy analysis; raw path is preserved for forensic replay. Canonical request IDs are generated from a buffered pool so request logging does not block on a fresh entropy read per request. |
| mTLS for Remote TCP | Non-loopback TCP listeners require mutual TLS by default. Plaintext TCP is explicit legacy mode only. |
| Client ACL Primitives | Optional source-CIDR admission checks, client-container label ACLs, listener certificate selectors (CN/DNS/IP/URI SAN/SPKI), profile certificate selectors (CN/DNS/IP/URI/SPIFFE/SPKI), unix peer credentials, and header credentials (X-Sockguard-Credential, stored as SHA-256 digests, unix socket or TLS only) let one proxy differentiate callers before the global rule set runs. When mTLS is enabled, certificate selectors follow the verified client leaf certificate rather than an unverified peer slice entry. Clients using the same verified header credential, profile and BuildKit session ID share mediated state across /grpc and /session connections; persistent IDs are bounded and abandoned upload grants expire. |
| Safe Inspect Strategy | Visibility checks reuse a bounded, short-lived singleflight cache, while authorization-critical ownership checks always inspect current Docker state so a deleted/recreated name or retagged image cannot inherit a stale allow decision. |
| Request Inspection | DELETE /containers/** and DELETE /libpod/containers/** query controls, the same remove gates on Podman's DELETE /libpod/pods/* and kube down, plus POST /containers/create, /libpod/containers/create, /containers/*/update, /containers/*/exec, /exec/*/start, /libpod/containers/*/exec, /libpod/exec/*/start, PUT /containers/*/archive, PUT /libpod/containers/*/archive, POST /libpod/containers/*/update, /images/create, /libpod/images/pull, /libpod/images/import, /images/load, /libpod/images/load, /build, /libpod/build, /volumes/create, /libpod/volumes/create, PUT /volumes/*, POST /networks/create, /networks/*/connect, /networks/*/disconnect, /libpod/networks/*/connect, /libpod/networks/*/disconnect, /libpod/networks/*/update, /secrets/create, /libpod/secrets/create, /libpod/pods/create, /configs/create, /services/create, /services/*/update, /swarm/init, /swarm/join, /swarm/update, /swarm/unlock, /nodes/*/update, /plugins/pull, /plugins/*/upgrade, /plugins/*/set, and /plugins/create are inspected before the daemon sees the request. The BuildKit tunnel endpoints POST /session and POST /grpc go through the same admission step once request_body.buildkit is configured, and the bare /moby.buildkit.v1.Control/* probe path is denied there rather than reaching the socket unmediated. The Swarm cluster-volume update reads the same request_body.volume block as volume create and denies every ClusterVolumeSpec field by default: Spec.Secrets needs allow_cluster_volume_secrets on its own, because each entry names a Swarm secret the daemon hands to the CSI plugin, and Availability, Group, AccessMode, CapacityRange and AccessibilityRequirements need allow_cluster_volume_updates. Bare container removal remains available while force, anonymous-volume, and legacy-link deletion require independent opt-ins. Podman's native remove has the same gates for force and anonymous volumes (legacy link isn't read on that route), and depend counts as anonymous-volume deletion because removing a pod with it deletes its containers' anonymous volumes. Removing a pod directly always deletes them, so Podman's DELETE /libpod/pods/* needs the anonymous-volume opt-in on every request and the force opt-in for force, and kube down (DELETE /libpod/play/kube and /libpod/kube/play), which stops and force-removes every pod its YAML names, needs both. Native Podman builds share request_body.build with Docker's classic builder, including every repeated or legacy additional-context definition. Podman's native image pull shares request_body.image_pull with POST /images/create and is read against libpod's own reference query shape, not Docker's fromImage/tag. Image, plugin and manifest pushes can be held to a registry allowlist with request_body.image_push, which fails closed on a destination it cannot read. Podman's native copy-into-container and container-update writes share request_body.container_archive and request_body.container_update with their Docker-compat twins, with update read against libpod's own UpdateEntities body and its restartPolicy query, not Docker's. Host/local/multipart and resource-usage host-file controls require the global blind-write acknowledgment. Archive copy-in requires one unambiguous target, refuses relative targets when allowed_paths is configured, and refuses Podman's post-inspection rename transformation. Native image load shares request_body.image_load; Docker manifest.json tags and the byte-exact effective OCI index.json name are checked, including Podman's higher-priority io.containerd.image.name annotation. Native Podman loads normalize bare archive names to localhost, inspect OCI SHA-256/SHA-384/SHA-512 graphs, keep tar control paths byte-exact before daemon-equivalent path cleaning, and treat Podman-accepted layouts as OCI even when advisory oci-layout, index schema-version, or descriptor media-type metadata is absent. Every reference set in a mixed OCI and Docker archive must be inspectable and pass policy because Podman can reject OCI config or layer content after metadata inspection and then fall back to Docker. A mixed archive whose index.json holds more than one manifest, such as the multi-image tarball docker save a:1 b:2 writes on the containerd image store, loads with its manifest.json repo tags and every index annotation name checked together; a missing or undecodable index.json carries no names, so those are judged on manifest.json alone. Canonical duplicate controls, malformed mixed-format controls, and all outer archive symlink/hardlink entries fail closed because link aliases can replace controls after streaming inspection. allow_untagged cannot bypass any tagged or mixed tagged/untagged archive member. An archive with a top-level repositories file and no manifest.json is refused on POST /images/load unless allow_all_registries is set, because Docker's classic image store before Docker 29 takes image names from that file and Sockguard does not read it. Native image import shares request_body.image_pull.allow_imports; body-form imports are capped at 512 MiB and URL imports retain the coarse opt-in. Podman's local API routes (POST /libpod/local/build, POST /libpod/local/images/load) and its SSH image transfer (POST /libpod/images/scp/*) name their input outside the request, a daemon-host path or an SSH destination, so they are refused rather than inspected, behind the blind-write acknowledgment and, for scp, the read-exfiltration one as well. Sockguard blocks privileged or host-bound workloads, non-allowlisted mounts/devices/commands/remotes, unsafe network/service/swarm/node controls, image archive imports outside registry policy, and unsafe container filesystem archives. POST /plugins/create is inspected as the raw tar upload Docker reads. A request with an application/x-www-form-urlencoded body, or a multipart/form-data body outside Podman's native /libpod/ API, is refused with 400 before any rule or inspector runs: both engines read request parameters out of a form body, and Sockguard evaluates the URL query. Oversized bodies on bounded JSON/tar inspectors are rejected with 413 Payload Too Large, and inspected-body reads have a 30-second deadline through both logging and metrics wrappers. These inspectors intentionally decode only the policy-relevant subset of Docker's schema and still defer full-schema validation to the daemon itself. |
| Protected exec targets | Containers labeled com.sockguard.exec=deny refuse Docker and Podman exec create/start. The official Sockguard image carries this label by default, including when interactive exec is enabled. |
| Image Trust | Container and Swarm-service images can require keyed or keyless cosign signatures before deployment. Registry-controlled discovery is bounded across metadata responses, referrers, signature images, layers, aggregate payload bytes, annotations, and verification candidates; signature references must be direct image manifests, not recursively resolved indexes, and payload layers with alternate URLs are rejected before blob resolution. Legal media-type parameters on direct manifests are accepted. A limit breach aborts discovery; enforce denies the request, while warn logs the failure and forwards it. Verified references are digest-pinned before forwarding. |
| Owner Label Isolation | A proxy instance can stamp label-capable creates plus build-produced images with an owner label, auto-filter labeled list/prune/events calls, and deny cross-owner access across containers, images, networks, volumes, services, tasks, secrets, configs, nodes, and swarm state, including images, named volumes, networks, secrets, and configs referenced inside container/service payloads. An image that resolves with no owner label is still allowed by default, since a base image pulled outside the proxy has nobody to be owned by; set ownership.allow_unowned_images: false to deny that case too. GET /system/df takes no filters parameter, so it is scoped on the response instead: foreign entries and the whole build-cache section drop out, and the aggregates this build cannot recompute (ActiveCount, Reclaimable, TotalSize, legacy LayersSize) are zeroed rather than left describing the host. Podman's native GET /libpod/system/df returns a report whose entries carry no labels at all, so it is refused with 403 (owner_libpod_data_usage_unscopeable) rather than forwarded. Resource names that happen to equal Docker collection actions such as create or prune are still checked according to the request method and exact path. An image retag (POST /images/{name}/tag, POST /libpod/images/{name}/tag) authorizes both the source image and the reference repo and tag name, so a client cannot take a name away from another owner's image by tagging its own image with it. A Podman secret create with replace or ignore set (POST /libpod/secrets/create) is checked against the secret it names, which has to be absent or the caller's own, so a client can't swap its data in under another owner's secret. A Podman container create (POST /libpod/containers/create) is checked against every secret it mounts with secrets, which has to be the caller's own and named by something that can't be read as a secret ID, and is refused when it sets one in the environment with secret_env, which Podman reads again by name at every start, so a client can't get another owner's secret into its own container. A Podman container or pod create (POST /libpod/containers/create, POST /libpod/pods/create) is checked against every container, network, named volume and image volume its body names, so the native API isn't a way to mount another owner's volume or join its network. Four image routes are refused outright rather than owner-checked, because an ordinary image inspect cannot authorize their full effect: per-image removal (DELETE /images/{name}, DELETE /libpod/images/{name}) and Docker-compat export (GET /images/{name}/get, GET /images/get?names=…). Owner-scoped image removal therefore means Podman's DELETE /libpod/images/remove with noprune=true, force=false and lookupManifest=false; on a Docker upstream it means owner-filtered POST /images/prune and nothing targeted. |
| Visibility-Controlled Reads | Redacts env, mount, network, config, plugin, and swarm-sensitive metadata by default, can hide labeled list/inspect plus selected service/task log reads behind per-client visibility rules, and keeps process-list, raw archive/export and stream-style reads behind explicit opt-in. Containers can also be scoped to the networks they are attached to with response.visible_networks. Combined label and name/image visibility checks share one bounded inspect, and keyword-named resources remain covered. GET /system/df is scoped on the response the same way owner isolation scopes it; GET /libpod/system/df has nothing to scope on and is refused with 403 (visibility_libpod_data_usage_unscopeable). On a Podman upstream GET /events and GET /libpod/events send at most one selector to the daemon, which ORs repeated label values, and check every selector against the labels on container, pod and volume events, so multiple selectors and owner isolation combined with visibility are served; a selector on a key Podman overwrites in event attributes is refused with 403 (visibility_podman_events_unscopeable, visibility_libpod_events_unscopeable). When ownership.owner is set, response.visible_resource_labels entries may not select on ownership.label_key: the two layers would collide in the daemon's label filter map, so startup rejects the config instead. |
| Body-Blind Write Guardrail | Any remaining write control Sockguard cannot safely constrain stays behind explicit insecure_allow_body_blind_writes opt-in instead of being silently exposed. Today that guardrail chiefly covers arbitrary exec without request_body.exec.allowed_commands, POST /swarm/join without request_body.swarm.allowed_join_remote_addrs, plugin setting writes without explicit allowed assignment prefixes, Podman build host/local/multipart or resource-usage file controls, the daemon-host POST /libpod/local/build and POST /libpod/local/images/load routes, the SSH image transfer POST /libpod/images/scp/* (which takes insecure_allow_read_exfiltration as well, one acknowledgment per direction), POST /libpod/containers/*/restore, and the documented uninspected libpod writes. Native Podman image load and import are inspected through their Docker-compat policies. For exec and Podman build, the flag lifts only the uninspectable gate; all other configured checks remain active. |
| Tecnativa Compatible | Drop-in replacement for the current Tecnativa env surface, including section vars, ALLOW_RESTARTS, SOCKET_PATH, and LOG_LEVEL. Rule-generating compatibility variables are intentionally rejected when signed-policy mode is active; convert those rules to signed YAML before enabling the trust gate. |
| Rollout Modes | Per-profile mode: enforce|warn|audit lets operators stage a tighter policy without breaking callers. warn/audit pass-through with decision=would_deny on the audit record and a mode label on the deny/throttle counters, so dashboards compare blocked vs. would-have-been-blocked volume side by side. Rollout mode governs rule denials, not every refusal, and the classes that ignore it include the pre-profile admission gates (403 client_ip_not_allowed from clients.allowed_cidrs, 502 client_identity_lookup_failed, and the 401 client_credential_* header credential denials), the listener gate that runs after a profile is resolved (403 listener_profile_not_allowed, from a non-wildcard listener whose allowed_profiles does not list the resolved profile), the client-ACL label failures (502 client_label_acl_lookup_failed and 502 client_label_acl_evaluation_failed), resource-limit hard errors (400 resource_limit_request_invalid, 502 resource_limit_policy_lookup_failed, 409 resource_limit_policy_state_changed), and every response-side control in the ownership and visibility layers. Process-list reads are the one carve-out: without insecure_allow_read_exfiltration, a denied GET /containers/*/top, GET /libpod/containers/*/top or GET /libpod/pods/*/top is refused in every mode instead of passed through. |
| Hot-Reload + Policy Versioning | reload.enabled: true watches the config file via fsnotify (Linux inotify / macOS kqueue) and accepts SIGHUP. The new policy goes through signature verification when enabled, the full validator, and rule compilation before an atomic swap. Immutable listener, upstream, log, health, metrics, and admin fields refuse reload. Signed-policy bootstrap trust stays pinned outside the candidate, while its signature_path can rotate. A monotonic generation counter is exposed at GET /admin/policy/version and via sockguard_policy_version. |
| Admin API | Opt-in POST /admin/validate accepts a candidate YAML body and runs the same parse, compat-expansion, validation and rule-compilation pipeline as the offline sockguard validate command, with every filesystem dereference disabled. The offline validator opens the cert, key, and client CA that listen.tls names and returns the os.PathError verbatim, which over the network would let a caller probe the host filesystem for existence, readability, and PEM-ness, so a candidate that arrives on this endpoint gets structural validation only and its TLS material is never read. Rules, profiles, and the compat-active flag are checked exactly as they are offline. That makes it a CI gate on policy, not a check that the files a config names are present. GET /admin/policy/version reports {version, loaded_at, rules, profiles, compat_active, source, config_sha256?, bundle_source?, bundle_signer?, bundle_digest?}. The ? keys are omitempty and are absent, not zero, when they do not apply. Both endpoints can ride the main listener or move to a dedicated admin.listen.* (socket or TCP, mTLS-aware) firewalled from Docker-API consumers. |
| Policy Diff | Opt-in POST /admin/policy/diff compares a structurally validated candidate with one active generation. Returns changed field paths and change kinds, with values omitted, plus the observed generation and restart requirement. It never applies the candidate or verifies its signature/TLS files. Uses the existing admin access boundary and body limit. |
| Compliance Report | sockguard report -o text|json|markdown maps a config to the CIS Docker Benchmark v1.6.0 controls with a status per control and config-path evidence (booleans, modes and list lengths only, never values). Evaluates the global policy and every client profile, is byte-identical for the same input, and is not a CIS certification. |
| Signed Policy Bundles | sockguard serve --policy-bundle-trust-config <path> pins keyed or keyless trust, Rekor posture, and a cooperative verification deadline in a bootstrap file separate from the signed YAML. Candidate and trust YAML are capped at 16 MiB, and signature bundles at 4 MiB, before parsing; FIFOs, devices, directories, and other non-regular inputs are rejected without blocking. Keyless trust loads initially and refreshes about every 24 hours through a process-wide memoized, read-only-filesystem-compatible TUF client with bounded downloads; startup fails closed if the initial load fails, while a failed background refresh is logged and retains the last valid root. Keyed-only policy-bundle trust loading makes no network call. Verification checks cancellation before beginning and after each synchronous local Sigstore verification attempt and stops signer fallback, but sigstore-go cannot preempt an individual crypto call. The signed candidate carries policy_bundle.signature_path; candidate trust fields cannot disable or redefine the gate. Verification runs before the operational logger or any rule compilation and again on every hot reload. Unsigned, oversized, or tampered bundles abort startup and reject reloads with reject_signature, while rule-generating compatibility variables reject with reject_compat. The verified certificate SAN or keyed fingerprint and YAML digest are stamped on the policy-version snapshot. |
| Minimal Attack Surface | Distroless chainguard/static base (built from Wolfi packages) — no shell, no package manager, runs as UID 65532 from PID 1. Cosign-signed with SBOM and build provenance. |
| Streaming-Safe | Preserves Docker streaming endpoints (logs, attach, events) without breaking timeouts, while reaping idle TCP keep-alive connections after 120s. Attach and exec-start handshakes have a 30-second client/upstream deadline that is cleared after a valid 101 upgrade. Once a connection is hijacked, upstream.hijack_inactivity_timeout (default "10m") is its only deadline: one watchdog covers both directions and refreshes on any byte, so it reaps a forgotten session without capping an active one, and the teardown is logged at warn. There is no "off" spelling: an empty, zero, or negative value fails validation. |
| Health, Watchdog + Readiness | /health endpoint with cached upstream reachability probes, an opt-in active Docker socket watchdog that logs state transitions (health.watchdog.exit_after exits non-zero when the upstream stays down), systemd sd_notify (READY, WATCHDOG, STOPPING) under Type=notify, and an opt-in /ready probe that issues a real GET /containers/json against the Docker API — returning 503 when the daemon accepts connections but has stopped answering, the wedged-daemon case a raw socket dial misses. |
| Upstream Request Timeout | upstream.request_timeout (default 60s) bounds finite proxied requests with a total deadline, so a hung response body or heavy read is aborted rather than pinning the request. The client sees a 504 (reason_code=upstream_request_timeout) only when the deadline fires before the response headers commit; after that the status has already been sent and cannot be replaced, so the client keeps it and gets a truncated body. Streaming and long-lived endpoints are exempt: events, follow logs (container, service and task), streaming stats, image create/pull/build/push/load, GET /images/export and /images/*/get, container export, archive/docker cp in both directions, websocket attach, container wait, plugin create/pull/push/upgrade, the BuildKit POST /session and POST /grpc tunnel, and the /libpod mirror of every one of them. Set "off" to disable. |
| Prometheus Metrics | Opt-in /metrics endpoint with bounded-cardinality request counters, deny counters, latency histograms, active request gauge, throttle counters, per-listener bind/serve state, hot-reload outcome counters, and upstream watchdog + readiness state/check metrics, plus sockguard_build_info and sockguard_start_time_seconds gauges for version panels and uptime alerts. Named series include sockguard_listener_up, sockguard_throttle_requests_total, sockguard_config_reload_total and sockguard_config_reload_last_success_timestamp_seconds; see the observability guide for the full set. Unknown HTTP methods collapse to OTHER and unknown route families to unknown. |
| Trace/Log Correlation | Preserves valid W3C traceparent context or generates local context, forwards a proxy-local span ID, and records trace fields in access, audit, and upstream error logs. Opt-in otlp.enabled exports one span per proxied request to an OTLP/HTTP collector. |
| Battle-Tested | 96%+ statement coverage (enforced by a CI coverage gate), race-detector clean, monthly Gremlins mutation testing with targeted survivor regressions, and 89 fuzz targets across the filter, glob, config, proxy, hijack, ownership, visibility, response-filter, Docker-filters, reload, policy-bundle, upstream-flavor and BuildKit paths and the policy suggest, TLS bootstrap and match body-file parsers, plus the proxy-vs-daemon differential suite, real-dockerd preset conformance, weekly soak testing and TLS edge-case coverage. |
drydock · drydock with self-update · drydock with compose · drydock with build · drydock with mediated build · Portwing · Portwing with exec · Portwing with compose · Portwing with build · Portwing with mediated build · Traefik · Portainer · Watchtower · Homepage · Homarr · Diun · Autoheal · read-only · Podman read-only · CIS Docker Benchmark · GitHub Actions self-hosted runner · GitLab Runner · Dozzle · Dozzle with actions · Dozzle with shell · Uptime Kuma · Beszel · Arcane · Arcane with management · Dockge · Komodo · Komodo with deploy · Jenkins · Woodpecker CI
Portwing and Portwing with exec run against the live consumer in CI through the tri-tool harness. The base Dozzle preset passed all seven hosted checks against Sockguard 3.0.0. Uptime Kuma, Beszel, read-only Arcane and Dockge passed local and CI checks. CI also exercised Komodo monitoring, Jenkins inbound agents and the Woodpecker Docker backend. The per-preset table gives the tested versions and workflows. Consumer conformance status
Two more bundled configs ship alongside the workload presets and are not counted above, because neither one is a policy for a particular client. multi-listener.yaml is a working example of the listeners: surface. discovery.yaml is a deny-everything policy running in mode: audit, for harvesting a real allowlist from a client whose call surface you don't know yet. It forwards every request it logs as would_deny, so it is a bootstrapping aid on a dedicated socket and never a production policy.
drydock · Portwing · Portwing + drydock (tri-tool) · Traefik · Portainer · Watchtower · Homepage · Homarr · Diun · Autoheal · GitHub Actions self-hosted runner · GitLab Runner · CIS Docker Benchmark gate · multi-host failover · Dozzle · Uptime Kuma · Beszel · Arcane · Dockge · Komodo · Jenkins · Woodpecker CI
Each example pairs a downstream Docker API consumer with a sockguard.yaml overlay and a short README covering audience, exposed API surface, and security tradeoffs.
Bind-mount grants use exact daemon-host paths. List each trusted source and keep its path and ancestors under operator control on each eligible host. See the host path grant requirements.
Rules can cover method/path filters, body-aware write inspection, declarative admission mutation (fail-closed label injection and image remapping), read-side redaction and visibility, per-client profile selection, rate limits, concurrency caps, owner-label isolation, rollout modes, hot reload, signed policy bundles, and admin validation.
How does Sockguard compare to other Docker socket proxies?
How we stack up against other Docker socket proxies. Versions checked 2026-12-04: Tecnativa docker-socket-proxy v0.6.0, LinuxServer docker-socket-proxy 3.4.9-r0-ls109, wollomatic socket-proxy 1.14.0, 11notes docker-socket-proxy v2.2.0, hectorm cetusguard v1.2.0, yorvolabs/yorvogate v0.5.0. Each claim was read from that release's source or README on that date; later upstream releases can change it.
| Feature | Tecnativa | LinuxServer | wollomatic | 11notes | CetusGuard | YorvoGate | Sockguard |
|---|---|---|---|---|---|---|---|
| Method + path filtering | ✅ | ✅ | ✅ (regex) | Read-only by default (opt-in containers-only mode) | ✅ (regex) | ✅ (endpoint groups on trusted listeners, per-endpoint rules per scope) | ✅ |
| Granular container write ops | Documented only (POST gate blocks them) | Partial (ALLOW_* vars) | Via regex | Start/stop only (opt-in containers-only mode) | Via regex | ✅ (create rules; other container writes limited to the scope's own containers) | ✅ |
| Request body inspection | ❌ | ❌ | Partial (bind-mount restrictions) | ❌ | ❌ | ✅ (bodies decoded into the Docker Engine's own types, unknown fields refused) | ✅ (container, exec, image, build, volume, network, secret, config, service, swarm, node, plugin) |
| Query-string rule matching | ❌ | ❌ | ❌ | ❌ | ✅ (regex over the sorted query, v1.2.0) | ✅ (per-endpoint query parameter allowlist, any other refused) | ✅ (match.query per key, exact or * values) |
| Per-client policies | ❌ | ❌ | Partial (IP/hostname + labels) | ❌ | ❌ | ✅ (scopes by token, client certificate or own socket, optional peer user) | ✅ (CIDR + labels + cert selectors incl. SPKI + unix peer) |
| Resource owner labels | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ (per-scope owner label and name prefixes) | ✅ (workload + control plane) |
| Remote TCP mTLS (listener) | ❌ | ❌ | ❌ | ❌ | ✅ | ✅ (TLS 1.3, mTLS required off loopback) | ✅ (TLS 1.3) |
| Remote daemon upstream (TLS) | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ (upstream must be a unix socket) | ✅ (active/passive failover) |
| Read-side visibility / redaction | ❌ | ❌ | ❌ | Partial (targets 7 risky GETs; the image-export pattern misses both real shapes; its image-inspect misfire, 11notes #12, was fixed in v2.1.6) | ❌ | Partial (lists limited to the scope's own objects; info and version are allow-lists) | ✅ (visibility + protected JSON redaction) |
| Structured access logs | ❌ | ❌ | ✅ (JSON option) | ❌ | ❌ | ✅ (JSON decisions with request ID) | ✅ (request + trace correlation) |
| Dedicated audit log schema | ❌ | ❌ | ❌ | ❌ | ❌ | Partial (versioned JSON log schema and reason codes, no separate audit log) | ✅ (opt-in, JSON schema + reason codes) |
| Prometheus metrics | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ (admin listener, loopback or unix socket) | ✅ (opt-in, socket-proxy metrics) |
| Active upstream watchdog | ❌ | ❌ | ✅ | ❌ | ❌ | Partial (readiness check pings Docker, at most once a second) | ✅ (opt-in watchdog; /health answers by default) |
| Trace/log correlation | ❌ | ❌ | ❌ | ❌ | ❌ | Partial (forwards traceparent to Docker, logs carry a request ID) | ✅ (W3C traceparent) |
| YAML config | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ | ✅ |
| Tecnativa env compat | N/A | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ |
| Rate limits / concurrency caps | ❌ | ❌ | ❌ | ❌ | ❌ | Partial (per-scope request and connection caps) | ✅ (per-profile token-bucket + global priority gate) |
| Rollout modes (enforce / warn / audit) | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ (none documented at v0.5.0) | ✅ (per-profile shadow + would_deny audit) |
| Operator approval of held requests | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ (bounded scope policy, single-use approvals, Unix admin socket) | ✅ (opt-in: hold rules, digest-bound single-use approvals, CLI) |
| Signed policy bundles | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ (releases are cosign-signed, policy bundles are not documented) | ✅ (cosign keyed + keyless, Rekor inclusion) |
| Container image trust | ❌ | ❌ | ❌ | ❌ | ❌ | Partial (pull registry and platform allowlists, image load name checks, no signature verification documented) | ✅ (cosign keyed + keyless, enforce / warn) |
| Podman native libpod API | ❌ | ✅ | Via manual regex | ❌ | ✅ | ❌ (not documented, certified for Docker Engine 29 only) | ✅ (default-deny /libpod coverage incl. pod lifecycle) |
| Multiple main listeners | ❌ | ❌ | ❌ | ✅ (Unix + TCP) | ✅ | ✅ (trusted and scoped listeners, unix or TCP) | ✅ (Unix and/or TCP, listener-scoped TLS + profiles) |
| Hot-reload + admin API | ❌ | ❌ | ❌ | ❌ | ❌ | Partial (SIGHUP reload and scope rescan, monitoring and Unix-socket approvals on the admin listener) | ✅ (opt-in, fsnotify/SIGHUP, validate endpoint, policy version) |
11notes/docker-socket-proxy takes a deliberately narrow stance: it allows most Docker API reads, targets seven sensitive GET surfaces for blocking (its image-export pattern matches neither real export shape, and the same style of pattern misfired on image inspect in 11notes #12, fixed in v2.1.6), and refuses writes by default. Its opt-in SOCKET_PROXY_CONTAINERS_ONLY mode (v2.2.0) instead allows only container start and stop and refuses reads. Sockguard instead starts from a configurable default deny, offers finer-grained redaction/visibility, and can authorize inspected writes. hectorm/cetusguard is the closest in spirit: default-deny regex rules (matched against the path, or the path plus a sorted query when the pattern contains \?, since v1.2.0) plus frontend/backend mTLS, native libpod families, and multiple frontend addresses. Sockguard is stronger on request-body inspection, per-client profiles, ownership, read filtering, metrics, hot reload, and health-checked upstream failover; v1.6.0 closed the libpod and multi-listener gaps that were CetusGuard's remaining advantages. yorvolabs/yorvogate decodes request bodies into Docker Engine types, scopes each client to a Compose project by credential header, dedicated socket or client certificate, and checks a per-scope query allowlist. Its v0.5.0 release adds single-use approvals through a Unix admin socket for requests within a second, wider policy. It also adds signed webhook notifications and scope expiry with optional cleanup of owned objects. YorvoGate uses a Unix-socket upstream and certifies Docker Engine 29. Its comparison column is based on the release notes, README, configuration guide and support policy. YorvoGate v0.5.0 release notes. The docs comparison guide links the feature matrix, migration guidance and tested client workflows. The full evidence and resulting priorities are in the roadmap.
CONTAINERS=1 # Allow /containers/** (GET/HEAD when POST=0)
IMAGES=0 # Deny /images/**
SERVICES=1 # Allow /services/** (GET/HEAD when POST=0)
EVENTS=1 # Allow /events (default)
POST=0 # Read-only mode
# Granular container writes still work even when POST=0
ALLOW_START=1
ALLOW_STOP=1
ALLOW_RESTARTS=1
# Compat aliases
SOCKET_PATH=/var/run/docker.sock
LOG_LEVEL=warningCompat env vars only generate rules while the effective ruleset still matches Sockguard's built-in defaults. The check is on the rules themselves, not on whether you supplied a config file, so an explicit rules: block that happens to be byte-identical to the default still activates it; a rules: block that differs from the default wins outright and no compat rules are generated. Broad compat reads (CONTAINERS=1, IMAGES=1, POST=0) that pull in process-list, raw archive/export, and log/attach streaming also need SOCKGUARD_INSECURE_ALLOW_READ_EXFILTRATION=true; see the configuration reference for the full env-var surface. Signed-policy mode does not permit rule generation after signature verification, so any section, POST, GRPC/SESSION, or ALLOW_* compatibility variable causes startup to fail. Translate those grants into the signed YAML first.
CONTAINERS=1 with POST=1, or ALLOW_DELETE=1 independently, preserves
the compatibility proxy's full container-removal surface: force removal,
anonymous-volume removal, and legacy link removal. Use YAML plus
request_body.container_remove to narrow those controls.
listen:
address: 127.0.0.1:2375 # loopback TCP; use listen.socket or listen.tls for anything else
rules:
- match: { method: GET, path: "/_ping" }
action: allow
- match: { method: GET, path: "/containers/json" }
action: allow
- match: { method: GET, path: "/containers/*/json" }
action: allow
- match: { method: POST, path: "/containers/*/start" }
action: allow
- match: { method: "*", path: "/**" } # default-deny backstop
action: denyTrailing /** matches both the base path and any deeper path. For example, /containers/** matches /containers and /containers/abc/json.
Multiple independently scoped listeners are also supported — replace listen: with a listeners: list (unix socket and/or mTLS TCP, any combination), each entry naming which clients.profiles it admits via allowed_profiles:
listeners:
- name: ci
socket: /var/run/sockguard-ci.sock
socket_mode: "0600"
allowed_profiles: [ci]
- name: ops
address: 0.0.0.0:8443
tls: { cert_file: ..., key_file: ..., client_ca_file: ... }
allowed_profiles: [ops]A client resolved to a profile outside the listener it connected on's allowed_profiles is denied, even if the base policy would otherwise allow it — see configs/multi-listener.yaml for a complete working example and the configuration reference for the full schema and reload semantics.
upstream.flavor names the engine behind the socket: auto (the default), docker, or podman. Every mode probes GET /version once per configured endpoint before listeners bind. Engine components and a Server: Libpod/... header identify Podman. auto fails startup on a failed or unrecognized probe or a mixed-engine failover set. An explicit flavor remains a fallback for a proxy that cannot identify its engine, but docker is rejected when any endpoint positively identifies Podman. This protects event filtering and Podman's extra localhost/ image-name interpretation from a contradictory override.
Podman volume lists under owner or label-based visibility isolation, and volume prune under owner isolation, allow non-label filters only when every endpoint positively reports a released Podman version of 6.0.0 or later. Visibility isolation does not scope volume prune. Older, unknown and prerelease versions keep the label-only restriction. Only the Podman Engine component's release version enables the volume capability; a Libpod header alone cannot. The probe does not follow redirects. Configuration and derived capabilities are reload-immutable, so restart Sockguard as part of an upstream engine/version change.
Owner isolation refuses native Quadlet and artifact writes. Owner isolation and visibility policies also refuse their inventory, inspect, file and extraction reads because these resource types have no isolation model. This includes per-name operations and namespaced artifact references, as well as batch routes.
Plugin create archives must contain exactly one root configuration. Plugin pull and upgrade apply the same host IPC, host PID and all-device grants as archive creation. Image-inspect environment redaction also covers legacy Docker configurations. Exec-session inspection applies every configured visibility axis to its parent container.
Sockguard inspects allowed writes, including the destructive query controls on DELETE /containers/**, the bodies on containers/create, containers/*/update, exec, build, images/create, services/create, swarm/init, and the rest of the body-bearing write paths. It blocks privileged or host-bound workloads, non-allowlisted mounts, devices, and registries, and unsafe swarm/network controls. Response bodies are redacted (env, mount paths, topology, secrets) by default. None of that needs configuration to switch on.
Beyond these essentials, every knob is documented in full on the docs site rather than duplicated here:
- Configuration reference — full YAML schema, request-body inspection, mTLS client selectors, per-client ACLs and profiles, rate limiting and concurrency caps, owner-label isolation, rollout modes, hot-reload, signed policy bundles,
insecure_*opt-ins, response redaction, and config precedence (CLI flags > env vars > config file > defaults). - Admin API — the
POST /admin/validateCI gate andGET /admin/policy/version. - Observability — Prometheus metrics, access/audit log fields, and trace/log correlation.
- Security model — the defense-in-depth layers and known limitations.
Bundled presets and ready-to-run compose stacks are summarized in Supported Profiles.
The container image is the supported install path; see the getting-started guide. Native binaries are also attached to each GitHub release, with cosign signatures you can verify. Linux archives include riscv64; the container image is amd64 and arm64 only because its base image has no riscv64 build.
Kubernetes users get a Helm chart as a signed OCI artifact for stable releases from the current line, starting with v3.0.0:
helm install sockguard oci://ghcr.io/codeswhat/charts/sockguard --version 3.2.0See Helm in the getting-started guide and chart verification.
sockguard serve # Start proxy (default)
sockguard validate -c sockguard.yaml # Validate + print compiled rule table
sockguard validate --strict -c sockguard.yaml # Also fail on unrecognized config keys
sockguard match -c sockguard.yaml -X GET --path /v1.45/containers/json
# Dry-run a single request through the rules
sockguard verify -c sockguard.yaml # Runtime self-check against a live deployment
sockguard report -o markdown # CIS Docker Benchmark v1.6.0 configuration report
sockguard tls bootstrap --server-name HOST --client NAME
# Create a CA, server cert and client certs plus the listen.tls config
sockguard policy suggest --from access.log # Print a YAML rules: snippet for requests warn/audit mode would have denied
sockguard version # Print versionsockguard match is the offline rule-evaluation probe — point it
at a config and a <method, path> and it prints which rule fires,
what the normalized path looks like, and the reason (if any), so
you can sanity-check a ruleset before any traffic hits the proxy.
It applies the same hard process-list acknowledgment gate as the
running proxy. Output is text by default or JSON via -o json.
--profile NAME or --source-ip IP evaluates against a client profile
and reports its selection, rollout mode, ownership scope and response
policy from the config, plus a not_inspected list of what an offline
run never reads (request body, live resources). --body-file PATH (or -
for stdin) also runs the request-body inspectors on a sample body and reports
their allow or deny verdict and reason, listing the checks that need a live
daemon as not evaluated.
sockguard tls bootstrap writes a CA, a server certificate for --server-name
and one client certificate per --client, then prints the matching listen.tls
config, so a mutual-TLS listener doesn't need hand-run openssl.
sockguard policy suggest --from <access-log> reads an access log and prints a
YAML rules: snippet for the requests that warn or audit mode would have
denied, ready to review and merge into the config.
sockguard verify is the runtime counterpart to validate. It
loads the config the way serve does (flags, environment, file)
and then checks that what it names is reachable right now: the
upstream daemon answers the Docker API and reports its engine
flavor, this sockguard's own health endpoint answers on each
configured listener, the mutual-TLS material on disk loads, and
image trust — when configured with keyless identities — can reach
the Sigstore trust root. One line per check reporting ok, fail,
or skip, with --json for scripting. A skip is a check that
does not apply (an opt-in feature that is off, a listener that is
not up) and never changes the exit code; any fail exits non-zero,
so it works as a container healthcheck or a deploy gate.
Migrating from Tecnativa or LinuxServer socket proxies
Replace the image — your current Tecnativa env surface maps over directly, with two explicit security acknowledgements for the non-loopback plaintext TCP listener plus a third for broad process-list, archive/export, or log/attach streaming parity:
services:
socket-proxy:
- image: tecnativa/docker-socket-proxy
+ image: codeswhat/sockguard
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- SOCKGUARD_LISTEN_ADDRESS=:2375
- SOCKGUARD_LISTEN_INSECURE_ALLOW_PLAIN_TCP=true
+ - SOCKGUARD_LISTEN_INSECURE_ALLOW_UNAUTHENTICATED_CLIENTS=true
- SOCKGUARD_INSECURE_ALLOW_READ_EXFILTRATION=true
- CONTAINERS=1
- SERVICES=1
- POST=0LinuxServer's socket-proxy env surface is already Tecnativa-compatible for the broad section toggles Sockguard consumes. For tighter policies, migrate from broad env vars to YAML rules plus body-inspection settings. Finish that conversion before enabling signed-policy mode, which rejects rule-generating compatibility variables so unsigned environment state cannot change a verified policy.
Version themes & highlights
High-level themes only; see CHANGELOG.md for per-release detail. The full roadmap, with compatibility evidence and scope boundaries, is on the docs roadmap page.
Ordinary Docker requests use the same upstream HTTP authority as metadata checks and upgraded connections.
Policies that allow Podman volume export, artifact extraction, or systemd unit generation require insecure_allow_read_exfiltration: true.
Docker container and Swarm workload responses mask volume driver settings under mount-path or sensitive-data redaction. Sensitive-data redaction also masks logging driver settings.
v3.0.0 promotes v3.0.0-rc.11 unchanged in behavior, after candidate validation: conformance, TLS/security checks and a 4-hour exact-source soak, plus final release checks. It combines the compatibility and completed hardening work. Owner isolation refuses native, Docker-compatible and daemon-host Podman builds in every rollout mode because base-image archive imports can replace names even with pullpolicy=never. Since rc.9, Docker builds and BuildKit solves are refused under owner isolation too, because build sources are not owner-checked yet. The docs compiler's indirect magic-string dependency is updated to 1.4.5 after the 14-day release-age window. Builds use Go 1.27.4 for the standard-library HTTP/1 header-race advisory GO-2026-6859. Builds also link OpenTelemetry 1.47.0 for GHSA-q7gw-24fr-5p69. Static site builds use Next.js 16.4.5 for GHSA-vc7v-qv4w-wrv8 and GHSA-mfr8-8qww-v76h. CI also carries the age-eligible Docker login/setup, CodeQL, Cosign and consistent Harden Runner updates across local workflows from the dependency queue. All five Grype scanner calls use v0.121.0, whose release installer stops on an archive checksum mismatch. Environment redaction hides complete build-argument-prefixed history entries because their command boundary can be ambiguous; ordinary RUN history remains visible. CI checks the shared socket through a UID/GID 65532 consumer and disables container access in six jobs that do not use Docker. The shared offline scanner retains a documented, source-bound runner-access exception. Service host-network regressions cover top-level and nested network fields on both create and update, including the explicit opt-in. The Watchtower preset note distinguishes environment clearing from bind-source redaction. Configuration references distinguish archive-label and destination ownership checks, tiny priority caps, route-specific secret visibility and layer-specific refusal codes. Ownership callbacks reject repeated raw JSON control keys in every rollout mode before inspecting or rewriting the body. Chart publication compares the published package with the locally built files before signing an adopted version. The migration guide covers the move from v2 to v3. Development checks reject emoji commit subjects and workflow names, including block headers with trailing whitespace, preserve the same-repository promotion restriction, detect CR-only conflict markers, compare the full ultra fuzz suite and drain negative-auth probe logs. Service signature-discovery regressions verify that unrestricted registry scope still blocks unlisted private addresses. Registry address checks remove IPv6 zones before classifying destinations, including redirects. The 2.4.x line received security fixes through the v3.0 release cycle. Maintenance releases preserve the current global latest channels. Native API integration CI covers Podman 5 and 6 as well as the distro rootful/rootless jobs, with a live daemon version check and a settled-socket check for each major. Successful socket probes leave permissions untouched so a rebind resets the success streak. An explicitly configured missing engine socket fails the integration run instead of silently skipping it. Native CI preserves failed test status while collecting its result artifacts. Image-history conformance loads a local fixture and checks ENV/ARG redaction through both the Docker-compatible and native APIs. Bounded-file regressions cover zero-byte lookahead and preservation of read errors when close also fails. Inline tmpfs volume regressions cover privilege refusals and the explicit opt-in.
Owner-scoped Podman network deletion on native and Docker-compatible routes requires the canonical network name so the engine's in-use check applies. Image volumes require an inspect that resolves to the same full config ID, rejecting mutable manifest-list aliases.
Image-build and image-load ownership tests cover the exact supported name budgets as well as overflow. Build-context tests also reject an empty zstd skippable frame at its exact eight-byte header boundary. Named-profile engine-flavor tests require the profile to authorize each request and check Podman refusal reasons. gRPC error header tests cover UTF-8 byte escaping. Gateway tests cover build reference and file path length limits. FileSync regressions check that data is released at the exact retained-frame overhead cap.
Network-topology redaction clears task host-IP metadata and ns: host namespace paths while preserving ordinary network selectors. Empty ordinary attach responses retain normal hop-by-hop header stripping. Rate-limit eviction regressions cover exact refill times and millisecond-clock wrap without waiting on wall time.
Lifecycle test failure paths cancel resolvers, finish bridge teardown and join request and limiter workers. Runner regressions cover prompt session-failure cancellation, frontend process failures after Return, configured upgrade authorities and default HTTP/HTTPS ports. The session-failure fixture permits canceled control-request reads after injecting the failure and still requires prompt propagation to the runner. Subprocess tests retain inherited output pipes after command exit and verify bounded cleanup for frontend, inspect and pull commands. Gateway regressions cover scratch-result validation, independent sibling build completion, forwarded image owner-label stamping and the distinction between policy-denial abuse and solve quotas. Mutation regressions cover empty mount options before overlay directory restrictions. Route-analysis tests cover the exact instruction budgets for known-route diagnostics and body-sensitive rule reachability, plus exact shared search budgets for states, transitions and work. Reachability tests also cover long container names outside the preferred witness characters and valid Unicode identifiers around the surrogate block and at the maximum scalar value. Route-language tests include the minimum scalar as a conservative analysis case and verify closure membership and monotonic work accounting. Capability tests check that startup logs agree with verified Podman volume-filter support. The published-image identity harness explicitly opts its private test agent into HTTP enrollment for Portwing 1.2. Graceful tunnel disconnects return without a fault. Denial diagnostics identify the active image-mount policy and consistently order forbidden overlay paths. Pull checks accept owned stored short names and remove computed foreign names found through reported image IDs after a name lookup misses.
OCI image-load ownership checks refuse ambiguous index/manifest config shapes and retain the unreferenced-blob check for blob paths ending in .json. Inline-volume privilege tests cover default and explicit driver selection. Replay-client redaction warnings consider assigned profiles, explain the global settings and run before a validated reload becomes active. Unknown-key diagnostics retain null and empty-map keys, including under strict validation, while preserving known empty values and Viper key normalization. Registry signature discovery checks shared, reserved, documentation, translated IPv4 and local-use NAT64 destinations before dialing, and bypasses environment proxies so redirects stay inside the address guard. Container and Swarm signature discovery use the registries named by their exact image and registry allowlists.
Mutation regressions also cover native named-volume bind options, native and Swarm tmpfs privilege checks, pods without image volumes under an image allowlist, and saturation of unsigned resource limits.
Pull progress checks parse the final line even without a newline and retain exact-limit and split-chunk size bounds. HTTP status boundary tests keep post-checks and tag restoration within successful responses. Pull regressions cover reported-ID and pre-pull snapshot count boundaries, plus digest-only pulls of bare repository names. Native integration tests probe network-name and manifest-list ID stability against the live engine.
Response-topology regressions reject malformed Swarm address pools on direct and nested cluster responses. Canonical network and image-volume ownership checks cover their exact inspect-response byte limits. Container-create tests keep resource kinds distinct when image and pod names match, and check Docker reserved network names against the configured engine flavor. Secret replacement tests permit a new name that matches only another secret’s ID prefix while refusing an exact foreign-owned name.
Native Podman network label decoding accepts only JSON whitespace around inspect objects and arrays, and rejects form feed and Unicode whitespace, with the original failing fuzz input retained as a regression seed. The gRPC frame fuzzer bounds allocations on its unlimited-parser lane while retaining malformed-header and configured-limit rejection coverage.
CLI tests remove their temporary changelog files and release-history repositories when each test finishes. Deployment verification tests preserve command cancellation during live probe checks. Create-policy validation tests check list entry positions for Docker-compatible and native Podman policies. The reload polling regression waits for the event loop to take its initial file snapshot before changing the watched file. Image-trust tests verify that key-based policies initialize without a keyless trust-root download. Cgroup migration tests check the gate state and transition warnings, including quiet repeated probes. The startup retry regression uses the production refresh-loop starter and live runtime callback. Readiness tests verify successful probes reach the metrics endpoint. Runtime concurrency tests use the configured engine flavor for streaming top requests.
The v3 development line carries the published v2.4.6 compression dependency fix for GO-2026-6865 / CVE-2026-116591, the v2.4.7 OpenTelemetry and Go toolchain fixes, and the v2.4.8, v2.4.9 and v2.4.10 security backports.
HTTP/2 capability tests distinguish an exact HTTP status prefix from incomplete or unrelated replies.
The frontend runner waits within a bounded cleanup deadline for Docker to confirm its container is absent, including when automatic removal is already in progress. A timed-out inspection remains a verification error even when an earlier query found the container.
Maintenance patches advance a floating major image tag only from that major's newest minor line recorded in SECURITY.md. A 2.4 patch can keep :2 current after v3 ships, while an older minor cannot move a major tag backward.
Added in 2.2.11: native Podman container and pod creates refuse caller-selected hosts-file paths. The default, image and none selectors remain allowed.
| Version | Theme | Highlights |
|---|---|---|
| v1.0.0 ✅ | Public Proxy Contract | Default-deny proxy with glob path rules and Tecnativa env compatibility, Unix socket and mTLS TCP transport, body inspection across every Docker write surface, container privilege enforcement, per-client policy profiles with enforce / warn / audit rollout modes, read-side visibility filtering, per-client rate limits, Prometheus /metrics, POST /admin/validate and hot reload with cosign-signed policy bundles |
| v1.1.0 ✅ | Image Trust & Security Audit | End-to-end cosign image trust (keyed and keyless, digest-pinned forwarding, also applied to swarm service create/update), 21-finding security audit with plugin, BuildKit # syntax= and gzip-bomb bypasses closed, new allowed_runtimes allowlist, CodeQL actions analysis |
| v1.2.0 ✅ | Operational Resilience | Opt-in readiness probe (health.readiness.*, default /ready), opt-in upstream.request_timeout that turns a hung body into a 504, sockguard_upstream_api_up gauge and readiness counter, drydock preset allowlisting the stock runc runtime, Go 1.26.4 |
| v1.3.0 ✅ | Swarm Posture Parity & Admin Hardening | Service create/update enforces the container-create identity and privilege rails (require_non_root_user, require_no_new_privileges, require_readonly_rootfs, require_drop_all_capabilities), zero-padded-UID root bypass sealed, wide-open admin listener is a validation error, 413 for oversized bodies, native multi-arch cross-compiles |
| v1.4.x ✅ | Remote Upstreams & Failover | upstream.endpoints[] failover set with per-endpoint mTLS and connect-level health probes, DOCKER_HOST-style resolution, SecurityOpt SELinux/seccomp/AppArmor rails for container and service create, fail-closed plugin inspection, scanner remediation in v1.4.4 |
| v1.5.x ✅ | Safer Defaults & Namespace Hardening | upstream.request_timeout defaults to 60s, restrict_namespace_sharing and deny_namespace_path_mode, require_cpu_limit_hard, exec environment policy (allowed_env_vars / denied_env_vars), endpoint-config parity on create, compose presets (15 to 17), Helm pod-level security context |
| v1.6.0 ✅ | Multiple Listeners, Admission Mutation & Podman | Multiple listeners with listener-scoped TLS and profiles (#149), fail-closed admission mutation for mandatory labels and image remapping (#151), memory/CPU/PIDs resource parity on container update and Swarm services (#152), Docker Engine API 1.55 validation (#153), native /libpod default-deny coverage (#148), published three-tool conformance matrix (#150) |
| v1.7.x ✅ | BuildKit gRPC Mediation | Full mediation of the hijacked POST /session / POST /grpc tunnel in six phases (#185), per-field request_body.network.endpoint_config.* gates (#186), insecure_accept_opaque_buildkit_tunnels deprecated |
| v2.0.0 ✅ | Signed-Policy Integrity & Native Podman Builds | Out-of-band bootstrap trust for signed policy bundles that stays pinned across reload, /libpod/build context, host-control and Dockerfile RUN constraints, BuildKit caller identity from verified certificates or Unix peer credentials, atomic Solve admission, finite metric label cardinality, sigstore-bundle-only release blobs |
| v2.1.0 ✅ | Native libpod Write Inspection & Owner Isolation | Copy-into-container, update, restore, checkpoint and mount inspected on the libpod routes, owner isolation fails closed with 404 / 403 / 502 across the prune family, commit and image export/removal, process-list reads need the read-exfiltration acknowledgment, read-side redaction reaches libpod inspect, volume reads and network topology |
| v2.2.x ✅ | Volume-Mount Containment & Read-Side Redaction | local volume driver type/o/device options held to allowed_bind_mounts on container create and Swarm mounts, PUT /volumes/{name} inspection, request-target guard, redaction that survives gzip, HEAD, 304 and image inspect, sockguard verify, server.shutdown_grace, rootless match.path rejected, fewer per-request allocations. Security patches 2.2.1 to 2.2.10 cover Podman/libpod create and body-key hardening, compat create host paths, Dockerfile directive, line-assembly and heredoc forms, a Go toolchain rebuild, owner-isolation image naming, form-body refusal and pod infra PID-file refusal The 2.2.11 patch also closes BUILDKIT_SYNTAX argument overrides on restricted classic and mediated builds. |
| v2.2.11 | Maintenance | Security fixes for native Podman hosts files and restricted frontend overrides, Go 1.27.3 certificate-verification remediation, dependency/CI updates, a compatible Gosec action and isolated static docs builds |
| v2.3.x ✅ | BuildKit Frontend Mediation & Go Module v2 | Promotes v2.3.0-rc.9 after a four-hour soak, a TLS scan and tri-tool conformance, and relicenses Sockguard MIT (2.2.x and earlier remain Apache-2.0). Raw LLB ExecOps are approved individually through request_body.buildkit.control.solve.allowed_exec_digests, and with control.solve.allow_frontend_gateway on, each iterative LLB Solve from a third-party frontend is mediated under the root build's policy while the sockguard frontend companion runner executes a pinned compiler image in an isolated Docker container (frontend runner guide). Interactive container/process RPCs and daemon-resolved nested gateway builds stay denied, and BuildKit job refs and callback session IDs are scoped by client and profile. The module declares github.com/codeswhat/sockguard/v2, so go install github.com/codeswhat/sockguard/v2/app/cmd/sockguard@latest resolves to the v2 line; Docker, deb and rpm installs are unchanged (Homebrew distribution was retired in v3). Also on the line: legacy HostConfig.Tmpfs held to allow_tmpfs_privileged_options, the remote-context grant required for raw LLB remote sources, the reserved BUILDKIT_SYNTAX frontend override rejected on restricted Dockerfile builds, OCI image loads bounded by cumulative logical blob size, and object-shaped secret Driver selection behind allow_custom_drivers. Security patch 2.3.1 refuses a client-supplied container log path on compat and native create unless allow_log_path is on. Security patch 2.3.2 tightens Podman filter scoping under ownership and visibility and keeps a client's own label filters under ownership. 2.3.3 republishes it with signed container images |
| v2.4.0 ✅ | Image Admission & Policy Usability | Promotes v2.4.0-rc.3 unchanged: exact allowed_images policies for Docker/Podman container create and Swarm service create/update, with per-client lists and rollout modes. Also implemented: startup/validate warnings for unknown routes and opt-in environment/command/entrypoint policies for Docker/Podman create, including legacy Docker command strings and safe pooled decoding. Container-create string arrays are checked independently for each request, including null elements. Reproducible binary builds are documented and compared in CI; the formal-spec decision is recorded. Native Podman mount-type checks, explicit mount-source mutation grants, CDI host-device checks and classic-build frontend-override checks are also implemented. Owner-aware BuildKit image exports and explicit Podman RUN-control/private-network checks are implemented too; Docker-native build options retain their existing behavior; Podman numeric OCI isolation modes keep their grant and private-network checks. Unix container-label identity remains a documented limit; use UID/GID profiles. |
| v3.0.0 ✅ | Verified TLS & Security Hardening | Promotes v3.0.0-rc.11 unchanged in behavior: the reviewed compatibility and hardening work, including the v2.4.5 through v2.4.10 security fixes and Go 1.27.4. It rejects the deprecated endpoint skip-verification key and unverified Docker TLS fallback, uses the /v3 Go module, refuses owner-scoped Podman builds and tightens image-history redaction. |
| v3.2.0 ✅ | Per-profile owners (experimental) and operator approvals | Operator approval of held requests: a hold rule waits for a person, who reviews the redacted request and approves it from sockguard approvals on the dedicated admin listener, and the approval is bound to the exact request, single use, audited and re-decided before it forwards. Separate owner identities per validated client profile, strongly selected admin scope with create stamps and service-template support, and bounded create-name serialization. Shared-daemon isolation retains documented lookup/use and external-writer limits. |
| v3.1 | Security Hardening | Mutation-test hardening covers admission, ownership, bounded parsing and runtime limits, including OCI archives, drive-letter mounts, denial formatting and engine-specific CPU and profile policies. The November 6 whole-suite run measured 97.9821% test efficacy across all 43 packages at the source tree merged as 7dbc523f, exceeding the unchanged 97.8% target; timeouts are counted separately. |
| v2.4.0 ✅ | BuildKit Compatibility | Local Dockerfile builds with Buildx v0.33.0 and v0.38.0 are verified against Docker 29.5.2. The built-in compiler is mediated under the existing policy and owner checks; arbitrary daemon frontend images, attestations and filesystem-loaded nested builds remain denied. See the docs roadmap |
| v2.4.1 ✅ | Exec Target Protection & CA Refresh | Protected container labels block Docker and Podman exec create/start, including in the proxy itself. Exec-create pins the inspected ID; the CA bundle is refreshed and published-image Grype no longer sets up a builder. |
| v2.4.2 ✅ | Podman Isolation & Release Reliability | Engine identity checks, version-aware volume filter scoping, unscoped native-route refusals, bounded CI retries and protected maintenance chart pins. |
| v2.4.3 ✅ | Session Cleanup & Pattern Validation | Completed hijacked sessions are dropped from the listener tracker, incomplete keyless subject patterns are rejected, and Podman nightly CI tracks Fedora major tags. |
| v2.4.4 ✅ | Client Compatibility & libpod Hardening | Redaction placeholders no longer break typed Docker clients, preset gaps for Portainer, watchtower and portwing are closed, slow stop and prune calls get the right timeouts, and libpod create bypasses and inspect leaks are closed. |
| v2.4.5 ✅ | Signed Root UID Fix | A numeric user with a sign prefix such as +0 is now treated as root, closing the allow_root_user: false and require_non_root_user bypass on Docker and Podman. |
| v2.4.6 ✅ | zstd Decoder Security Fix | Updates the compression dependency to fix GO-2026-6865 / CVE-2026-116591, a panic on malformed zstd input. |
| v2.4.7 ✅ | OpenTelemetry and Go Security Fixes | Updates OpenTelemetry to 1.47.0 for GHSA-q7gw-24fr-5p69 and builds with Go 1.27.4 for GO-2026-6859. |
| v2.4.8 ✅ | Security Backports | Backports request-filter, owner-isolation, audit-log and shutdown security fixes, and fixes random Buildx build failures. |
| v2.4.9 ✅ | Owner Isolation Fix | Owner isolation now refuses Podman's libpod manifest list writes and the Podman 6.2 volume rename route, which had no owner check. |
| v2.4.10 ✅ | Host Mount Policy | Requires an exact grant for each host mount source. Review existing host-backed resources after upgrading. |
| v2.x | Supply Chain | egress-policy: block with curated allow-lists on high-privilege release jobs |
| v2.x | Policy Refinement | Named rule path aliases and further response-policy refinement |
| v2.x | Internals | Container-create ownership reference collectors are separated into bind, mount and endpoint helpers with the same isolation checks. Code-review backlog: collapse the config → filter-options → policy translation layers behind a single source of truth; profiling-gated JSON redaction fast path |
| v2.x | Compliance | CIS Docker Benchmark control mapping, audit-ready policy templates |
| v2.x+ | Extensibility | Optional plugin extension points (WASM or Go plugins), OPA/Rego policy integration |
Real-time chat and early support: CodesWhat Discord
Bugs and concrete feature requests go to GitHub Issues; open-ended questions, ideas, and show-and-tell go to GitHub Discussions; real-time chat happens on the CodesWhat Discord.
Start with CONTRIBUTING.md before opening a pull request, and use SECURITY.md for private vulnerability disclosure.
For local fuzz triage, run scripts/local-fuzz.sh --suite ci --fuzztime 2m. Use --suite ultra for every fuzzer, --timeout to set the Go watchdog explicitly, and --docker --platform linux/amd64 when you want closer GitHub Actions parity.
Every release image on GHCR, Docker Hub and Quay.io is cosign-signed via GitHub Actions OIDC. Before running a sockguard image in production, verify it with the canonical invocation in the image verification guide.
| Tool | Role |
|---|---|
| drydock | Container update monitoring — web UI and notification engine |
| portwing | Remote Docker agent — secure socket-level access from Drydock or standalone |
| sockguard | Docker socket proxy — default-deny allowlist filter protecting the socket |
These three tools are designed to layer: sockguard filters the socket, portwing exposes it remotely, and drydock monitors and acts on container state.
See portwing's COMPATIBILITY.md for the full compatibility matrix across all three tools.
small, sharp tools from one developer and a lot of agents