📝 docs(podman): Podman guide, podman-readonly preset, conformance test (#148) - #195
Conversation
New docs/content/docs/podman.mdx explains sockguard as a Podman socket proxy: the Docker-compat vs. native /libpod surfaces and their separate inspectors, which request_body.* key governs which libpod endpoint, the uninspected play/kube blind-write surface and its blast-radius warning, libpod read-exfiltration additions, ownership/visibility coverage, three-part semver version-prefix handling, rootful vs. rootless socket paths, and current limitations (#194's hijacked libpod exec-start gap plus the design doc's deferred-past-v1.6 list). Registered in the docs nav via meta.json — the issue's acceptance criterion for #148.
New app/configs/podman-readonly.yaml covers a read-only monitoring posture on both of Podman's API surfaces in one file: Docker-compat list/inspect/stats/top/changes for containers plus list/inspect for images/networks/volumes, and their libpod-native equivalents including pod list/inspect (no Docker-compat analog). Every exfiltration-gated endpoint on both surfaces (archive/export/logs/attach/get/push, generate/kube) is deliberately excluded, so unlike readonly.yaml this preset validates clean without insecure_allow_read_exfiltration; it allows no writes at all, so insecure_allow_body_blind_writes is never needed either. Verified via `sockguard validate --config configs/podman-readonly.yaml`. Documented in presets.mdx.
New app/internal/filter/podman_readonly_preset_conformance_test.go fires representative requests at podman-readonly.yaml's real filter chain (reusing the existing presetCase/buildDrydockPresetHandler/ fireDrydockCase helpers), pinning three things: both API surfaces admit the same shape of narrow reads, every path in sensitiveExfilEndpoints (both surfaces) stays denied, and no write reaches upstream on either surface — including libpod-only writes with no Docker-compat analog like pod create and play/kube. The existing preset-walking tests (TestPresetConfigsValidate, TestPresetConfigsPassBuildChain, TestPresetConfigsDenyAttestation StatementsByDefault) already auto-discover the new preset file.
Both legs of quality-integration-podman.yml checked for the socket FILE appearing, then immediately ran a single connectivity check (curl .../libpod/_ping on the rootful leg, podman ... version on the rootless leg). The socket file existing doesn't mean the listener is accepting connections yet — that check has hit connection-refused once in the narrow window between the two. Wrap both checks in a 10-attempt, 1s-apart retry loop that dumps the service log and exits non-zero only if every attempt fails.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Next review available in: 45 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. 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 selected for processing (5)
📝 WalkthroughWalkthroughAdded a Possibly related PRs
🚥 Pre-merge checks | ✅ 1 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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: 4
🤖 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 @.github/workflows/quality-integration-podman.yml:
- Around line 109-125: The Podman readiness probes lack per-command time limits
and can hang until the job timeout. Add a 5-second timeout to the rootful sudo
podman version check, the rootful _ping curl probe in the retry loop, and the
rootless podman version check, while preserving their existing retry and failure
handling.
In `@app/internal/filter/podman_readonly_preset_conformance_test.go`:
- Around line 32-128: Extend the presetCase table used by the conformance test
to cover Docker-version-prefixed paths, including allowed and denied
`/v1.45/...` and `/v1.45/libpod/...` routes, while preserving the expected
authorization outcomes of their unprefixed equivalents. Update or add matcher
fuzz coverage to include version-prefixed denied routes, and ensure the
path-normalization logic strips prefixes such as `/v1.45/` before evaluating
matching rules.
In `@docs/content/docs/podman.mdx`:
- Around line 218-220: Update the blind-write classification in the surrounding
documentation to list only play/kube and kube/apply; remove generate/kube from
that group and state that it remains gated by insecure_allow_read_exfiltration
as a GET read-exfiltration endpoint.
In `@docs/content/docs/presets.mdx`:
- Around line 388-390: Update the permission summary comment near the preset
documentation to state that containers allow list, inspect, stats, top, and
changes, while images, networks, volumes, and secrets allow only list and
inspect; retain the existing pod and health/version/info/events qualifications.
🪄 Autofix
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: b17e1cba-1ab0-48e0-b0a6-7e64250ee7c1
⛔ Files ignored due to path filters (1)
CHANGELOG.mdis excluded by!CHANGELOG.md
📒 Files selected for processing (6)
.github/workflows/quality-integration-podman.ymlapp/configs/podman-readonly.yamlapp/internal/filter/podman_readonly_preset_conformance_test.godocs/content/docs/meta.jsondocs/content/docs/podman.mdxdocs/content/docs/presets.mdx
… with timeouts - podman system service replaces the socket file after initial bind on some startups, silently undoing the one-shot chmod; re-apply it every retry and dump socket state on failure - 🔧 add per-command timeouts to all readiness probes so a blocked curl or podman version can't eat the job timeout
…rmance and fuzz seeds
Final PR of the #148 train. Closes out the issue's acceptance criteria.
What's here
docs/content/docs/podman.mdx— new docs page covering sockguard as a Podman socket proxy: the two API surfaces (Docker-compat vs native/libpod), whichrequest_body.*keys govern which libpod endpoint, the uninspected play/kube–kube/apply–manifests blind-write surface and itsinsecure_allow_body_blind_writesrequirement, read-exfiltration additions, ownership/visibility coverage, three-part version-prefix stripping, rootful vs rootless socket setup, and current limitations (including Hijack path forwards version-stripped paths upstream, breaking libpod exec-start against real Podman #194, the hijacked exec-start gap).app/configs/podman-readonly.yaml— read-only monitoring preset covering BOTH the Docker-compat and libpod read surfaces; admits no writes and no exfil-gated reads. Startup-validated.podman-readonly.yamlcoverage following the existing preset-conformance pattern: allowed reads on both surfaces pass, writes and exfil-gated reads are denied; the all-presets walk tests still pass with the new file.Verification
Merge order: after #193 (already merged). This closes #148's implementation scope; the tri-tool conformance matrix (#150) is separate and in flight.
Changelog
/libpodAPIs.podman-readonlypreset with default-deny access.Concerns
/libpodroutes cannot cross Docker and libpod policy namespaces.