Repository navigation
🔧 chore(release): promote v1.5.0 to GA - #145
Conversation
- setLoadDefaults's ~199-line hand-written v.SetDefault block is replaced
with registerDefaults, a small recursive reflect walker driven by
Config's mapstructure tags, so a new config field can never again
silently miss its Viper registration (and with it its SOCKGUARD_* env
var override) — this exact bug class has already shipped three times
(allow_sysctls, four service-hardening rails, the SELinux/
deny_unconfined_system_paths trio)
- auditing the walker's output against the old hand-written list surfaced
two more, previously-unknown instances of the same gap, now closed as a
side effect: request_body.{container_create,service}.image_trust.
{mode,allowed_signing_keys,allowed_keyless} and request_body.
container_create.{allowed_device_cgroup_rules,allowed_device_requests}
had no v.SetDefault registration either
- adds load_defaults_completeness_test.go: TestLoadDefaultsCoversEvery
MapstructureLeaf (Load("") deep-equals Defaults(), field by field),
TestLoadDefaultsEnvOverrideSweep (generalizes the one-off regression
tests in load_env_defaults_test.go into an exhaustive SOCKGUARD_<PATH>
sweep), and TestConfigFieldsHaveMapstructureTags (fails CI if any
Config field, at any depth, lacks a mapstructure tag)
- clients.global_concurrency and clients.profiles[].limits.rate/
concurrency stay deliberately non-env-configurable: nil pointer leaves
are skipped rather than registered, and Profiles is a slice leaf the
walker never recurses into
- no YAML key, env var, CLI flag, or default value changes otherwise;
documents the new registration path in CONTRIBUTING.md and README.md
- config.Defaults().Upstream.RequestTimeout now "60s" (was "" / unlimited);
a wedged daemon that hangs the response body is now caught by default
instead of pinning a request indefinitely.
- Add the "off" sentinel (exact-lowercase) to explicitly disable the
deadline; legacy empty string "" still works for backward compat.
Centralized in UpstreamConfig.RequestTimeoutDisabled(), the single
source of truth used by both validate.go and cmd/serve.go.
- Add GET/PUT /containers/{id}/archive (docker cp, both directions) to
proxy/timeout.go's long-lived exemption list, closing the large-copy
regression the new default would otherwise introduce.
- Log the effective value ("off" or the duration) as
upstream_request_timeout on the "sockguard started" INFO line.
- CHANGELOG: migration note under a new [Unreleased] heading — who's
affected, and how to opt back out with request_timeout: "off" (env var
callers must use "off", not an empty string, per Viper's empty-env
semantics).
- Update README feature table + roadmap, and configuration.mdx /
multi-host.mdx docs to match the new default and "off" opt-out.
✨ feat(v1.5): config-defaults reflection + default upstream request_timeout
- New opt-in bool `request_body.container_create.require_cpu_limit_hard` (default false), independent of the existing `require_cpu_limit` which stays byte-for-byte unchanged. - New predicate `hasHardCPULimit`: NanoCpus > 0 OR CpuQuota > 0 counts as a hard cap; CpuShares and a lone CpuPeriod do not (relative priority, not an absolute ceiling). CpuQuota is accepted without a paired CpuPeriod — confirmed against Docker's docs that the CFS period defaults to 100000us when omitted. - Enforced in containerCreatePolicy.denyResourceLimitReason independently of the base knob; when both are enabled and only CpuShares is set, the stricter hard-cap denial message wins. - Wired through config.go, filter_options.go/ToFilterOptions, and filter/container_create.go (Options + policy struct); no manual v.SetDefault needed — the reflection-based Viper defaults walker (load.go) picks up the new mapstructure-tagged field automatically. - Table-driven tests mirroring the existing require_cpu_limit cases (NanoCpus, CpuQuota-alone, CpuShares-alone rejection, CpuPeriod-alone rejection, both-knobs interaction, boundary mutation coverage) plus a filter_options_test.go propagation check. - Docs: configuration.mdx (YAML example, policy reference table, env var table) and a CIS-benchmark callout explaining why the preset deliberately leaves the hard cap off (CIS 5.11 is satisfied by CpuShares). - README roadmap: closes the CpuShares-vs-hard-cap backlog item; adds container-update re-validation and swarm-service CPU-limit parity as named follow-ups (out of scope here). - CHANGELOG: Unreleased/Added + Tests entries.
- ✨ add `request_body.exec.allowed_env_vars`/`denied_env_vars` config fields, both opt-in and empty-by-default (no restriction), unlike `allowed_commands`' deny-all-when-empty - ✨ enforce name-only, exact, case-sensitive matching on exec-create `Env` entries; denylist checked first and always wins; values are never inspected or logged - ✨ fail closed on wrong-shaped `Env` JSON via a strictly-typed field (whole-body decode fails, same as other malformed exec bodies) - 🧪 table-driven middleware/unit tests for deny-by-denylist precedence, allowlist rejection, passthrough when both empty, name-extraction edge cases, exec-start unaffected (Env never re-checked), config load/validate/YAML-override/per-profile/env-var coverage - 🧪 extend FuzzExec seed corpus + harness with Env-bearing payloads - 📝 document the new fields in configuration.mdx and security.mdx, including an example denylist (LD_PRELOAD, LD_LIBRARY_PATH, LD_AUDIT, DYLD_INSERT_LIBRARIES, PYTHONPATH, PATH) and the create-time-only enforcement boundary - 📝 update CHANGELOG (Unreleased/Added) and README roadmap/feature rows
✨ feat(v1.5): require_cpu_limit_hard + exec-create Env allowlisting
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.
✨ feat(config): tri-repo integration — compose presets, conformance suite, example fixes
The exec body-inspection policy had no idea the top-level insecure_allow_body_blind_writes flag existed: an empty request_body.exec.allowed_commands unconditionally denied every exec with "no commands are allowlisted", regardless of the flag. The flag only ever satisfied the startup validator (internal/cmd/rules.go), so every preset that documents "set this flag to allow unpinned exec" was silently non-functional for exec at request time. - ExecOptions.AllowBlindWrites (filter/exec.go) lifts ONLY the "no commands are allowlisted" gate when AllowedCommands is empty; allow_privileged, allow_root_user, and allowed_env_vars/denied_env_vars still apply exactly as configured. The field has no effect once a real allowlist is pinned. - attachRuntimeInspectors (cmd/serve.go) wires the global insecure_allow_body_blind_writes config value into it for both the default policy and every named client profile. - withFilter now logs a startup warning (once per process, surviving hot-reload) naming exactly what the flag loosens, matching the existing warnIfLabelACLEnabled pattern. Default-deny is unchanged: the flag must still be set explicitly.
Both drydock preset headers said "current Drydock does not spawn a separate helper container" for self-update. As of drydock dev/v1.6 (SelfUpdateTransitionShared.ts / self-update-controller.ts, read via ref-only git show against origin/dev/v1.6), that changed: drydock now spawns a separate ephemeral AutoRemove helper container that itself issues the stop-old/start-new/health-poll/finalize-exec/remove-old sequence over the same bind-mounted socket, rather than drydock's own process doing so directly. The pinned allowed_commands argv in drydock-with-selfupdate.yaml (["node", "dist/triggers/providers/docker/self-update-finalize-entrypoint.js"]) was independently verified against the current source and is still exactly correct — only the "who calls exec" narrative needed updating.
- exec_test.go: flag off keeps the unchanged default-deny; flag on allows a clean exec but still denies privileged/root/denylisted-env execs; flag has no effect once AllowedCommands is pinned; a full-middleware HTTP case. - portwing_preset_conformance_test.go: portwing-with-exec.yaml's exec-create assertion flips from denied to allowed now that the flag actually works, plus a new case proving the flag only lifts the allowlist gate (privileged exec still denies). TestMiddlewareDeniesUnallowlistedExecCreateCommand keeps the flag-off default-deny covered independently of any preset. - drydock_preset_conformance_test.go: added a case with the full finalize exec-create body (AttachStdout/AttachStderr/Cmd/Env with the real DD_SELF_UPDATE_* names) proving Env doesn't affect the verdict. - github/gitlab runner integration test helpers now wire insecure_allow_body_blind_writes the same way production does, so those presets' own opt-in takes effect in the integration harness too. - serve_test.go/serve_warn_test.go/coverage_gaps_test.go: servePolicyConfig and buildServeClientProfiles both propagate the flag into PolicyConfig.Exec.AllowBlindWrites for the default policy and every named client profile; the new startup warning fires once per process and survives a simulated hot-reload.
- README's "Container runtime hardening" group_add snippet still used the pre-rename DOCKER_GID variable after every compose example switched to DOCKER_SOCK_GID — now consistent. - security.mdx, configuration.mdx, and the README feature table now state that insecure_allow_body_blind_writes changes exec request-time behavior (not just startup validation): an unpinned exec is admitted instead of denied, but allow_privileged/allow_root_user/allowed_env_vars/ denied_env_vars still gate it exactly as configured. - presets.mdx's drydock-with-selfupdate.yaml summary said allow_root_user=false; the shipped preset (and its own YAML header) has always set it true — corrected, with the reasoning (empty exec User reads as root) restored. - CHANGELOG entries for all of the above plus the new tests.
…LF_UPDATE_* set drydock-with-selfupdate.yaml pinned exec Cmd via allowed_commands but left exec Env completely unrestricted (exec.go's empty allowed/denied env lists mean "no restriction"). For an interpreter command like node, Env can change what the pinned argv actually executes — NODE_OPTIONS can --require arbitrary code before the script runs, NODE_PATH can redirect module resolution — so the "exact-argv pin keeps it safe" claim was overstated. - 🔧 add allowed_env_vars to request_body.exec, scoped to exactly the DD_SELF_UPDATE_* names drydock's buildFinalizeExecEnv() sends (self-update-controller.ts), verified against drydock dev/v1.6 source - 📝 update header/inline comments to describe the Env attack surface and why the argv pin alone doesn't close it - 🧪 add a conformance case proving the same allowlisted Cmd with an extra NODE_OPTIONS Env entry is now denied, and correct a stale test comment that said Env was intentionally unrestricted
…ndle Full three-tool topology in examples/compose/tri-tool/: sockguard filters the Docker socket, Portwing reads sockguard's proxied socket instead of mounting /var/run/docker.sock, and drydock connects to Portwing over HTTP in Standard Mode (DD_AGENT_PORTWING_*, DD_LOCAL_WATCHER=false) rather than touching Docker directly at all. Shared Portwing<->drydock secret is a single Docker secret mounted into both containers. Defaults to no exec; README points at the portwing-with-exec.yaml preset and drydock's Edge Mode as the variants this bundle deliberately doesn't ship, and calls out that Portwing's Standard Mode agent doesn't implement remote update triggers yet (POST /api/triggers/* returns 501). Fixes: PICKUP item 5
✨ feat(filter): wire insecure_allow_body_blind_writes into runtime exec policy
✨ feat(examples): add tri-tool compose bundle (sockguard → portwing → drydock)
…figs with canonical presets
Both examples/compose/{github-actions-runner,gitlab-runner}/sockguard.yaml were
stale hand-copies of the canonical app/configs/*.yaml presets — they were
missing insecure_allow_body_blind_writes/insecure_allow_read_exfiltration,
which the canonical presets carry. sockguard serve --config <example> failed
startup validation, so docker compose up crash-looped for both stacks.
Add the two missing acknowledgment flags to each example, matching the
canonical policy exactly (rules/request_body/response were already in sync).
…esets PR#122 added app/configs/portwing-with-compose.yaml and drydock-with-compose.yaml (17 tool presets total), but README.md's "Bundled presets (15)" heading/list and docs/content/docs/presets.mdx never caught up. Bump the README count and add both presets to its list; add a matching ## section for each to presets.mdx, following the sibling entries' format.
commit dac2f31 actually touched 8 examples/compose/*/docker-compose.yml files plus the root compose (multi-host correctly has none — it dials a remote Docker daemon over tcp:// + TLS and never mounts the socket).
…ith-compose header The header comment cited request_body.network_create / request_body.volume_create, neither of which exists. The real mapstructure keys are request_body.network and request_body.volume (see app/internal/config/config.go).
…-docs 🐛 fix(examples): repair crash-looping compose examples + preset-docs drift
Brings main's [1.4.0] CHANGELOG heading, README release-status flip to v1.4.0, and the coderabbit/greptile config into dev/v1.5. CHANGELOG conflict resolved by keeping the v1.5 [Unreleased] block on top with [1.4.0] slotted below it.
The highlights bullet still enumerated 15 presets after the two compose presets (portwing-with-compose, drydock-with-compose) landed; the canonical list at 'Bundled presets (17)' already had them. Adds both to the bullet.
Apply a root catch-all Vercel policy for the marketing and copied docs exports, preserving static Next.js and same-origin analytics compatibility without enabling unsafe-eval or external script origins. gate_status: skill
Render the actual DaemonSet and require non-root identity, runtime-default seccomp, read-only filesystem, no escalation, dropped capabilities, and supplemental socket-group compatibility. gate_status: skill
Default the pod to Chainguard UID/GID 65532 with runAsNonRoot and RuntimeDefault seccomp while preserving the documented supplemental Docker-socket group override. gate_status: skill
Document the embedded ownership boundary, fresh authorization semantics, push exfiltration acknowledgement, Vercel policy, Helm hardening, migration impact, regression evidence, and scanner disposition in Sockguard’s established release-note voice. gate_status: exempt
# Conflicts: # CHANGELOG.md # app/internal/cmd/serve.go # app/internal/cmd/serve_test.go # app/internal/cmd/serve_warn_test.go # app/internal/filter/exec.go # app/internal/filter/portwing_preset_conformance_test.go # app/internal/ownership/middleware.go # app/internal/ownership/middleware_test.go # chart/sockguard/values.yaml # docs/content/docs/configuration.mdx # docs/content/docs/security.mdx # security_best_practices_report.md
Record the released stable history and SEC-004 production verification on the release-candidate track. gate_status: exempt
🔒 security(v1.5): carry remediation pass into rc.2
…on-v1.5 🔒 security(v1.5): forward-port scanner remediation
…sed-v1.5 🔒 security(v1.5): fail closed on invalid plugin config
Forward-merge v1.4.4 security remediations and prepare the v1.5.0-rc.3 prerelease, including roadmap and release metadata updates.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Next review available in: 18 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (28)
📝 WalkthroughWalkthroughThe v1.5.0 update adds configuration-driven container and exec request-body controls, reflection-based default registration, stricter validation, ownership checks for namespace sharing, and Docker-compatible upstream timeout handling. It adds compose presets and examples, updates runner and self-update policies, expands conformance tests, and synchronizes release metadata, documentation, website roadmap data, and Helm versions. Possibly related PRs
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 7
🧹 Nitpick comments (4)
app/internal/config/load.go (1)
92-124: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winGuard against unexported fields in
registerDefaults.
fv.Interface()panics on an unexported field ("cannot return value obtained from unexported field or method"), so the day anyone adds a private field anywhere in theConfigtype graph,Load()panics at startup instead of failing a test. Cheap to close now that the walk is generic.♻️ Skip unexported fields
field := typ.Field(i) + if !field.IsExported() { + continue + } name, squash := mapstructureTag(field)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@app/internal/config/load.go` around lines 92 - 124, Update registerDefaults to skip unexported struct fields before calling fv.Interface(), using the field metadata available in reflect.StructField (such as PkgPath). Keep the existing recursion, pointer handling, and default registration behavior unchanged for exported fields.app/integration/github_actions_runner_conformance_test.go (1)
43-47: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueBoth preset handlers hand-copy
attachRuntimeInspectors' global-field wiring. Root cause: no shared test helper translates top-levelConfigfields intofilter.PolicyConfig, so every future global field (likeInsecureAllowBodyBlindWrites) must be added to each conformance handler by hand or the preset silently tests the wrong policy.
app/integration/github_actions_runner_conformance_test.go#L43-L47: replace the inline assignment with a shared helper, e.g.presetPolicyConfig(cfg), that appliesToFilterOptions()plus every top-level global field.app/integration/gitlab_runner_conformance_test.go#L43-L47: call the samepresetPolicyConfig(cfg)helper instead of repeating the assignment.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@app/integration/github_actions_runner_conformance_test.go` around lines 43 - 47, Introduce a shared presetPolicyConfig helper that builds filter.PolicyConfig from cfg.ToFilterOptions() and applies all top-level global Config fields, including InsecureAllowBodyBlindWrites. In app/integration/github_actions_runner_conformance_test.go lines 43-47 and app/integration/gitlab_runner_conformance_test.go lines 43-47, replace the duplicated inline assignment with calls to this helper.app/internal/cmd/coverage_gaps_test.go (1)
131-155: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAssert the off state too. The default-policy test (
serve_test.goLine 117) pins both states specifically so a hard-codedtruecan't slip through; the profile path only pinstrue.Proposed addition
if !profile.Exec.AllowBlindWrites { t.Fatal("profile PolicyConfig.Exec.AllowBlindWrites = false, want true (global flag must propagate to profiles)") } + + cfg.InsecureAllowBodyBlindWrites = false + cfg.Clients.Profiles[0].Rules[0].Match.Path = "/containers/json" + profiles, err = buildServeClientProfiles(&cfg, nil) + if err != nil { + t.Fatalf("buildServeClientProfiles() error = %v", err) + } + if profiles["blind-exec"].Exec.AllowBlindWrites { + t.Fatal("profile Exec.AllowBlindWrites = true, want false when the global flag is unset") + } }The rule swap avoids re-tripping the startup validator that rejects an allowed exec with no
allowed_commandsand no blind-write opt-in.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@app/internal/cmd/coverage_gaps_test.go` around lines 131 - 155, Extend TestBuildServeClientProfiles_PropagatesInsecureAllowBodyBlindWrites to also verify the false state: leave InsecureAllowBodyBlindWrites at its default false, build a valid profile configuration, and assert profile.Exec.AllowBlindWrites is false. Keep the existing true-state assertion, and adjust the test rules as needed to satisfy startup validation without blind-write opt-in.app/internal/filter/exec_test.go (1)
830-893: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueDuplicate of
TestExecBlindWritesOnlyLiftsCommandAllowlistGate(lines 52-96).Same three cases (clean/privileged/root) with the same
wantReasonvalues; the new table adds only the denylisted-env case, andTestExecDenyReasonAllowBlindWritesIgnoredWhenCommandsPinnedre-tests that file's "configured command allowlist still wins" case. Fold the env case into the existing table and drop these two.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@app/internal/filter/exec_test.go` around lines 830 - 893, Remove the duplicate tests TestExecDenyReasonAllowBlindWritesOnBypassesOnlyTheAllowlistGate and TestExecDenyReasonAllowBlindWritesIgnoredWhenCommandsPinned. Add the denylisted environment-variable case to the existing TestExecBlindWritesOnlyLiftsCommandAllowlist table, preserving its expected denial reason; retain the earlier test’s coverage for privileged/root cases and configured command allowlists.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@app/configs/drydock-with-selfupdate.yaml`:
- Around line 34-45: Update the self-update finalize exec flow around
allowed_env_vars and buildFinalizeExecEnv() so DD_SELF_UPDATE_FINALIZE_URL
cannot be caller-controlled to reach arbitrary internal services. Derive the
callback URL from trusted configuration or enforce value-level validation plus
client/target ownership checks before permitting the exec, while preserving the
existing restrictions on environment variable names and pinned commands.
In `@app/internal/config/validate.go`:
- Around line 1043-1053: Update validExecEnvVarName to validate the raw value
for surrounding whitespace, rejecting padded names such as " LD_PRELOAD" while
preserving the existing empty, equals-sign, and embedded-whitespace checks. Also
inspect allowed_namespace_sharing_containers validation near its corresponding
logic and reject whitespace-padded entries there, ensuring no allowlist or
denylist value can be stored in a form that runtime exact matching cannot use.
In `@app/internal/ownership/middleware.go`:
- Around line 73-79: Update the doc comment for the exported
AllowCrossOwnerNamespaceSharing option to include HostConfig.UTSMode alongside
the other namespace-sharing fields, matching namespaceModeFields and the
existing test coverage.
In `@app/internal/proxy/timeout_test.go`:
- Line 58: Update isLongLivedUpstreamRequest to classify POST requests to
/plugins/create as long-lived, exempting them from the upstream timeout.
Preserve existing method/path matching and update the corresponding timeout test
expectation in timeout_test.go.
In `@examples/compose/drydock/README.md`:
- Around line 21-24: Update the Docker socket GID setup commands in
examples/compose/drydock/README.md lines 21-24,
examples/compose/github-actions-runner/README.md line 26, and
examples/compose/gitlab-runner/README.md lines 21-24 so macOS users have an
executable platform-specific command using stat -f '%g', while Linux retains
stat -c '%g'; remove comment-only macOS alternatives and ensure each compose
README’s setup snippet is directly copy-pastable on the documented OS.
In `@examples/compose/gitlab-runner/README.md`:
- Around line 21-24: Update the GitLab runner setup instructions so
DOCKER_SOCK_GID remains available when Step 2 runs in a new shell: persist the
computed value in the project’s .env file during Step 1 or repeat the export
before docker compose up -d in Step 2, while preserving the existing
platform-specific stat commands.
In `@examples/compose/watchtower/README.md`:
- Around line 24-27: Update the Docker socket GID setup block in the README to
use OS-specific branches: GNU stat with -c on Linux and BSD stat with -f on
macOS. Keep the export variable DOCKER_SOCK_GID consistent so the block remains
directly copy-pasteable on both platforms.
---
Nitpick comments:
In `@app/integration/github_actions_runner_conformance_test.go`:
- Around line 43-47: Introduce a shared presetPolicyConfig helper that builds
filter.PolicyConfig from cfg.ToFilterOptions() and applies all top-level global
Config fields, including InsecureAllowBodyBlindWrites. In
app/integration/github_actions_runner_conformance_test.go lines 43-47 and
app/integration/gitlab_runner_conformance_test.go lines 43-47, replace the
duplicated inline assignment with calls to this helper.
In `@app/internal/cmd/coverage_gaps_test.go`:
- Around line 131-155: Extend
TestBuildServeClientProfiles_PropagatesInsecureAllowBodyBlindWrites to also
verify the false state: leave InsecureAllowBodyBlindWrites at its default false,
build a valid profile configuration, and assert profile.Exec.AllowBlindWrites is
false. Keep the existing true-state assertion, and adjust the test rules as
needed to satisfy startup validation without blind-write opt-in.
In `@app/internal/config/load.go`:
- Around line 92-124: Update registerDefaults to skip unexported struct fields
before calling fv.Interface(), using the field metadata available in
reflect.StructField (such as PkgPath). Keep the existing recursion, pointer
handling, and default registration behavior unchanged for exported fields.
In `@app/internal/filter/exec_test.go`:
- Around line 830-893: Remove the duplicate tests
TestExecDenyReasonAllowBlindWritesOnBypassesOnlyTheAllowlistGate and
TestExecDenyReasonAllowBlindWritesIgnoredWhenCommandsPinned. Add the denylisted
environment-variable case to the existing
TestExecBlindWritesOnlyLiftsCommandAllowlist table, preserving its expected
denial reason; retain the earlier test’s coverage for privileged/root cases and
configured command allowlists.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 1a3229ab-21fc-4d41-82bc-86a7ef7c4c4f
⛔ Files ignored due to path filters (1)
CHANGELOG.mdis excluded by!CHANGELOG.md
📒 Files selected for processing (87)
CONTRIBUTING.mdREADME.mdRELEASING.mdapp/configs/cis-docker-benchmark.yamlapp/configs/drydock-with-compose.yamlapp/configs/drydock-with-selfupdate.yamlapp/configs/drydock.yamlapp/configs/github-actions-runner.yamlapp/configs/gitlab-runner.yamlapp/configs/portwing-with-compose.yamlapp/integration/github_actions_runner_conformance_test.goapp/integration/gitlab_runner_conformance_test.goapp/internal/cmd/coverage_gaps_test.goapp/internal/cmd/serve.goapp/internal/cmd/serve_test.goapp/internal/cmd/serve_upstream_timeout_test.goapp/internal/cmd/serve_warn_test.goapp/internal/config/compose_example_sync_test.goapp/internal/config/config.goapp/internal/config/drydock_compose_sync_test.goapp/internal/config/filter_options.goapp/internal/config/filter_options_test.goapp/internal/config/load.goapp/internal/config/load_defaults_completeness_test.goapp/internal/config/load_env_defaults_test.goapp/internal/config/load_test.goapp/internal/config/upstream_request_timeout_test.goapp/internal/config/validate.goapp/internal/config/validate_gaps_test.goapp/internal/config/validate_test.goapp/internal/filter/container_create.goapp/internal/filter/container_create_hardening_test.goapp/internal/filter/container_create_test.goapp/internal/filter/container_create_types.goapp/internal/filter/drydock_preset_conformance_test.goapp/internal/filter/exec.goapp/internal/filter/exec_test.goapp/internal/filter/fuzz_parsers_test.goapp/internal/filter/mutation_kill_test.goapp/internal/filter/network.goapp/internal/filter/network_test.goapp/internal/filter/portwing_compose_preset_conformance_test.goapp/internal/filter/portwing_preset_conformance_test.goapp/internal/filter/service_test.goapp/internal/ownership/middleware.goapp/internal/ownership/middleware_test.goapp/internal/proxy/timeout.goapp/internal/proxy/timeout_test.gochart/sockguard/Chart.yamlchart/sockguard/values.yamldocker-compose.ymldocs/content/docs/cis-docker-benchmark.mdxdocs/content/docs/configuration.mdxdocs/content/docs/migration.mdxdocs/content/docs/multi-host.mdxdocs/content/docs/presets.mdxdocs/content/docs/security.mdxexamples/compose/cis-docker-benchmark/README.mdexamples/compose/cis-docker-benchmark/docker-compose.ymlexamples/compose/cis-docker-benchmark/sockguard.yamlexamples/compose/drydock/README.mdexamples/compose/drydock/docker-compose.ymlexamples/compose/github-actions-runner/README.mdexamples/compose/github-actions-runner/docker-compose.ymlexamples/compose/github-actions-runner/sockguard.yamlexamples/compose/gitlab-runner/README.mdexamples/compose/gitlab-runner/docker-compose.ymlexamples/compose/gitlab-runner/sockguard.yamlexamples/compose/portainer/README.mdexamples/compose/portainer/docker-compose.ymlexamples/compose/portwing/README.mdexamples/compose/portwing/docker-compose.ymlexamples/compose/traefik/README.mdexamples/compose/traefik/docker-compose.ymlexamples/compose/tri-tool/README.mdexamples/compose/tri-tool/docker-compose.ymlexamples/compose/tri-tool/sockguard.yamlexamples/compose/watchtower/README.mdexamples/compose/watchtower/docker-compose.ymllefthook.ymlscripts/release-metadata.test.mjssecurity_best_practices_report.mdwebsite/src/app/data/features.tswebsite/src/app/page-data.test.mjswebsite/src/components/roadmap.tsxwebsite/src/lib/site-config.tswebsite/src/lib/site-content.ts
💤 Files with no reviewable changes (1)
- app/internal/config/drydock_compose_sync_test.go
biggest-littlest
left a comment
There was a problem hiding this comment.
Approved for v1.5.0 GA after the full release-delta, security, test, fuzz, packaging, documentation, and website validation pass.
ALARGECOMPANY
left a comment
There was a problem hiding this comment.
Approved for v1.5.0 GA. All required checks are green and the complete review findings have been addressed.
Summary
Validation
Promotion
After the protected merge completes, run Release: Cut on main without an explicit prerelease tag. The workflow should resolve v1.5.0, publish/sign the multi-architecture images and archives, and run the published-artifact verification gate.
Changelog
60s, with"off"support and Docker-accurate long-lived request detection.Concerns
upstream.request_timeout: "off".container:<ref>namespace sharing must enable the new opt-in setting.DOCKER_SOCK_GIDto be set.mainwithout an explicit prerelease tag after merge.