Repository navigation
✨ feat(config): tri-repo integration — compose presets, conformance suite, example fixes - #122
Merged
Merged
Conversation
Compose deploys through portwing/drydock need network/volume create+delete (and disconnect) that the existing portwing.yaml/drydock.yaml presets deny. - portwing-with-compose.yaml: portwing.yaml + networks/create,connect, disconnect,delete + volumes/create,delete. /build stays denied (BuildKit fallback needs /session + /grpc, not modeled here). Adds networks/*/connect, which portwing.yaml itself never had, for multi-network service attach. - drydock-with-compose.yaml: same additions on top of drydock.yaml, for symmetry (drydock's own compose deploys hit the identical gap). - portwing_compose_preset_conformance_test.go: full compose round trip (network create/connect/disconnect/delete, volume create/delete) admitted on both new presets; custom drivers and /build stay denied.
Mirrors drydock_preset_conformance_test.go's table-driven pattern against portwing's actual internal/docker/client.go call surface, on both portwing.yaml and portwing-with-exec.yaml. Found (not fixed, out of scope here): portwing-with-exec.yaml ships with request_body.exec.allowed_commands empty. sockguard's exec policy unconditionally denies exec creation whenever allowed_commands is empty (confirmed by the repo's own TestMiddlewareDeniesUnallowlistedExecCreateCommand); insecure_allow_body_blind_writes only satisfies a startup validator and is never wired into filter.ExecOptions. So exec creation is denied on portwing-with-exec.yaml today, contrary to its header comment's "blind exec" claim. This test asserts that true current behavior rather than the aspirational one so the suite stays honest — see the test's doc comment.
…pose
Every docker-compose.yml that mounts /var/run/docker.sock into the sockguard
service (root dev compose plus all 9 examples/compose/*/) was missing
group_add, matching the gap already fixed in portwing's own
examples/docker-compose.with-sockguard.yml. Sockguard's image runs as UID
65532 (non-root); without group_add the container can never open a
root:docker 0660 socket on a stock host.
Add group_add: ["${DOCKER_SOCK_GID:?...}"] to each affected sockguard
service, and a one-line DOCKER_SOCK_GID export prerequisite (Linux stat -c,
macOS stat -f) to each example's README before its docker compose up step.
Verified with `docker compose config` on all nine plus the root file.
Mirrors TestDrydockComposeExampleInSync: compares app/configs/portwing.yaml against examples/compose/portwing/sockguard.yaml on rules, request_body, and response policy. examples/compose/portwing/docker-compose.yml runs portwing standalone (no nested compose stack), so portwing.yaml — not portwing-with-compose.yaml — is the correct comparison target.
…match The portwing service bound host+container port 4000:4000 but portwing's image default PORT is 3000 — nothing inside the container was listening on 4000. Add an explicit PORT=4000 env var so the container actually listens where the compose file and README both say it does (keeping 4000 rather than portwing's 3000 default avoids churning the README's existing http://localhost:4000 references). Also bring the portwing service in line with portwing's own hardening baseline (examples/docker-compose.with-sockguard.yml): read_only, cap_drop: ALL, no-new-privileges, explicit non-root user "65532:65532", and a real auth token via TOKEN_FILE + a Docker secret instead of running with no auth.
- Rename lookout -> portwing in the ecosystem table and its link (drydock was renamed to portwing a while back; drydock's own README already had this fix, sockguard's didn't). - Add the pinned compat-matrix pointer line to the ecosystem section, linking portwing's new COMPATIBILITY.md.
The DaemonSet's existing securityContext is container-level only, so there
was no chart-native way to add a supplementalGroups GID for the host's
/var/run/docker.sock — the same gap portwing's kubernetes/standard.yaml
already documents at the pod level (fsGroup + commented supplementalGroups
placeholder).
Add values.yaml podSecurityContext (default {}, documented with the
supplementalGroups pattern) and template it into the pod spec in
daemonset.yaml alongside the existing nodeSelector/affinity/tolerations
with-blocks. Verified with `helm lint` and `helm template` both with and
without podSecurityContext set.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Jul 4, 2026
3 tasks done
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sockguard side of the three-repo integration pass (companion PRs in portwing and drydock).
What's here
portwing-with-compose.yaml+drydock-with-compose.yamlpresets: network/volume lifecycle for compose stack deploys,/buildstill denied.app/internal/filter/): asserts what the presets actually allow/deny against a live filter.examples/compose/portwing/sockguard.yamlmust load to the same rules/request-body/response policy as the canonicalapp/configs/portwing.yaml. The example had silently drifted (that's fixed here too, and portwing's copy is synced in its companion PR).group_addadded to every bundled compose (10 files) — without it the proxied socket is unreachable on hosts where the socket GID isn't the image's group.securityContext.supplementalGroupsplaceholder for the socket GID.COMPATIBILITY.md. CHANGELOG entries added.Found along the way (not fixed here — needs a product decision)
allowed_commandsdeny ALL exec, andinsecure_allow_body_blind_writesis never wired intofilter.ExecOptions(only the startup validator reads it).portwing-with-exec.yaml's header promises interactive exec it can't deliver; github-actions-runner/gitlab-runner/watchtower/portainer presets likely share the pattern. The new conformance test asserts the TRUE (deny) behavior so the gap is at least pinned down.DOCKER_GIDin prose where the composes useDOCKER_SOCK_GID.All 32 packages green on this branch.