Skip to content

fix(drivers): filter bind-backed named volumes#1861

Merged
elezar merged 2 commits into
mainfrom
followup-podman-volume-bind-filter/ee
Jun 11, 2026
Merged

fix(drivers): filter bind-backed named volumes#1861
elezar merged 2 commits into
mainfrom
followup-podman-volume-bind-filter/ee

Conversation

@elezar

@elezar elezar commented Jun 10, 2026

Copy link
Copy Markdown
Member

Summary

Add Podman named-volume inspection so OpenShell can detect local-driver volumes created with host bind options. Podman now rejects bind-backed named volumes unless [openshell.drivers.podman].enable_bind_mounts = true, matching the Docker driver behavior added with the initial driver-config volume mount support.

This PR also tightens both Docker and Podman bind-backed volume detection so comma-separated local-driver o=... options containing either bind or rbind are treated as host bind mounts.

Related Issue

Follow-up to #1785.

Changes

  • Added typed Podman volume inspect parsing for Driver and Options.
  • Replaced existence-only Podman volume validation with inspect-based bind-backed filtering.
  • Updated Docker and Podman bind-backed volume detection to recognize both bind and rbind mount options.
  • Added unit tests for Podman volume inspect parsing, bind-backed volume detection, and enabled/disabled validation paths.
  • Added Docker and Podman focused tests for rw,rbind local-driver volume options.
  • Updated architecture, driver README, gateway config, and compute-driver docs.

Testing

  • mise run pre-commit passes
  • Unit tests added/updated
  • E2E tests added/updated (if applicable)

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

Signed-off-by: Evan Lezar <elezar@nvidia.com>
@elezar elezar requested review from a team, derekwaynecarr and mrunalp as code owners June 10, 2026 21:26
@elezar

elezar commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

cc @drew for explicit visibility on this follow-up Podman bind-backed volume filtering PR.

@elezar elezar enabled auto-merge (squash) June 10, 2026 21:28
@github-actions

Copy link
Copy Markdown

@elezar

elezar commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

gator-agent

PR Review Status

Validation: this is maintainer-authored, project-valid Podman driver security/behavior work. It is a small focused follow-up to make Podman local-driver bind-backed named volumes require the same unsafe operator opt-in as direct bind mounts and Docker bind-backed volumes.
Head SHA: c9095c4943fdc9837a3f301babcfa1536c62a0b2

Review findings:

  • Blocking: crates/openshell-driver-podman/src/driver.rs:60 only treats o=bind as bind-backed. Podman also supports recursive bind through rbind, so a local-driver volume created with o=rbind can expose a host path inside the sandbox while [openshell.drivers.podman].enable_bind_mounts = false. Please treat both bind and rbind as bind-backed, preferably with case-insensitive local driver matching, and add focused tests for o=rw,rbind plus the disabled validation path. This is a default-deny bypass of the sandbox filesystem boundary. CWE-284 / CWE-269.

Docs: Fern reference docs were updated in existing pages; no navigation change appears needed.
E2E: test:e2e is being applied because this changes Podman driver mount behavior.

Next state: gator:in-review

@elezar elezar added gator:in-review Gator is reviewing or awaiting PR review feedback test:e2e Requires end-to-end coverage labels Jun 10, 2026
@github-actions

Copy link
Copy Markdown

Label test:e2e applied for c9095c4. Open the existing run and click Re-run all jobs to execute with the label set. The run will execute the standard E2E suite after building the required gateway and supervisor images once. The matching required CI gate status on this PR will flip green automatically once the run finishes.

@elezar

elezar commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

gator-agent

PR Review Status

Validation: this is maintainer-authored, project-valid Podman driver security/behavior work. It is a small focused follow-up to make Podman local-driver bind-backed named volumes require the same unsafe operator opt-in as direct bind mounts and Docker bind-backed volumes. Head SHA: c9095c4943fdc9837a3f301babcfa1536c62a0b2

Review findings:

  • Blocking: crates/openshell-driver-podman/src/driver.rs:60 only treats o=bind as bind-backed. Podman also supports recursive bind through rbind, so a local-driver volume created with o=rbind can expose a host path inside the sandbox while [openshell.drivers.podman].enable_bind_mounts = false. Please treat both bind and rbind as bind-backed, preferably with case-insensitive local driver matching, and add focused tests for o=rw,rbind plus the disabled validation path. This is a default-deny bypass of the sandbox filesystem boundary. CWE-284 / CWE-269.

Docs: Fern reference docs were updated in existing pages; no navigation change appears needed. E2E: test:e2e is being applied because this changes Podman driver mount behavior.

Next state: gator:in-review

Does Docker also support rbind, meaning that Docker's implementaiton would ALSO need to be updated?

@elezar

elezar commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

gator-agent

Re-check After Author Update

I re-evaluated latest head c9095c4943fdc9837a3f301babcfa1536c62a0b2 after elezar's 2026-06-10 21:40 UTC question about whether Docker also supports rbind.

Disposition: needs follow-up.

Remaining items:

  • Yes, Docker local-driver volume options can use recursive bind semantics too, and the current Docker helper only checks o=bind. The same class of host bind exposure should be handled for Docker as well.
  • For this Podman-focused PR, the blocking item remains: treat Podman local-driver o=rbind as bind-backed, keep the local driver match robust, and add focused disabled-validation coverage. To close the broader class, either include the analogous Docker rbind handling/tests in this PR or link a maintainer-accepted follow-up for Docker.

Next state: gator:in-review

Signed-off-by: Evan Lezar <elezar@nvidia.com>
@elezar

elezar commented Jun 11, 2026

Copy link
Copy Markdown
Member Author

Addressed Gator’s rbind blocker in d21b5f2. Both Docker and Podman now treat comma-separated o=... entries containing either bind or rbind as bind-backed, with focused tests for rw,rbind; Podman also has a disabled-validation-path test for the recursive bind case.

@elezar elezar changed the title fix(podman): filter bind-backed named volumes fix(drivers): filter bind-backed named volumes Jun 11, 2026
@elezar

elezar commented Jun 11, 2026

Copy link
Copy Markdown
Member Author

gator-agent

Re-check After Author Update

I re-evaluated latest head d21b5f2f280d634e9f510c1312e9582caa3c329b after elezar's 2026-06-11 06:51 UTC update saying the rbind blocker was addressed.

Disposition: resolved.

Remaining items:

  • No blocking review items remain. The independent review confirmed that both Docker and Podman now treat comma-separated o=... entries containing bind or rbind as bind-backed, and Podman includes disabled-validation-path coverage for the recursive bind case.
  • Nonblocking suggestion: consider making the Docker/Podman local driver comparison case-insensitive for defensive robustness.

Validation: maintainer-authored Podman/Docker driver security behavior follow-up for bind-backed named volumes.
Docs: Fern reference docs were updated in existing pages; no navigation change appears needed.
Checks: OpenShell / Branch Checks, OpenShell / Helm Lint, DCO, and OpenShell / E2E are green for the current head.
E2E: test:e2e is applied and the required E2E gate is green.

Next state: gator:approval-needed

Human maintainer approval or merge decision is now required.

@elezar elezar added gator:approval-needed Gator completed review; maintainer approval needed and removed gator:in-review Gator is reviewing or awaiting PR review feedback labels Jun 11, 2026

@drew drew left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@elezar elezar merged commit 58a3777 into main Jun 11, 2026
43 of 44 checks passed
@elezar elezar deleted the followup-podman-volume-bind-filter/ee branch June 11, 2026 15:03
@elezar

elezar commented Jun 11, 2026

Copy link
Copy Markdown
Member Author

gator-agent

Monitoring Complete

Monitoring is complete because this PR has merged.

Final status: latest gator state was gator:approval-needed; required checks were green and the PR merged at 2026-06-11T15:03:34Z.

I removed the active gator:* label because there is nothing left for gator to monitor on this PR.

@elezar elezar removed the gator:approval-needed Gator completed review; maintainer approval needed label Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:e2e Requires end-to-end coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants