Repository navigation
fix(sandbox): validate filesystem policy anchors - #5278
Conversation
Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>
|
🌿 Preview your docs: https://nvidia-preview-pr-5278.docs.buildwithfern.com/openshell |
|
Label |
Compatibility review (advisory)New or updated breaking changes; see the full report for all findings. 1. policy — No explicit risk acceptance foundFilesystem policy paths and included workdirs previously followed valid symlinks; symlinks beneath workload-owned or writable directories now abort launch in both Landlock modes.
2. policy — No explicit risk acceptance foundlandlock.compatibility: best_effort previously continued with baseline-only restrictions when a nonempty effective path list yielded no usable paths; it now aborts launch.
Review details
Advisory review; publication gates are unchanged. |
PR Review StatusThe independent code review found no blocking findings. The filesystem policy guidance and regression coverage are included. Required checks are still running; the standard E2E suite was rerun on this head after applying Gator metadata
|
both are acceptable changes |
Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>
|
@shiju-nv Both findings are addressed in a597c94. Could you take another look?
Validation: 70 SSH tests, 5 Docker end-to-end tests, Clippy, formatting, and commit-hook checks passed. |
Compatibility review (advisory)New or updated breaking changes; see the full report for all findings. 1. policy — Risk explicitly acceptedfilesystem_policy.read_only/read_write and included workdirs previously followed valid symlinks, but now abort launch when a symlink has a workload-owned or writable ancestor.
2. policy — Risk explicitly acceptedlandlock.compatibility: best_effort previously continued with baseline-only restrictions when a nonempty effective path list yielded no usable paths, but now aborts launch.
Review details
Advisory review; publication gates are unchanged. |
PR Review StatusThanks @johntmyers, I checked your update against @shiju-nv's two SSH requests. The independent follow-up review found no blocking findings: startup diagnostics now use the retained writer with a 50 ms timeout, and shell/exec requests reject an existing main attachment. The regression tests cover zero and small receive windows with sibling completion, plus continued attachment input and lease reacquisition after close. Tests were inspected during this review; current-head CI is still running. Both requests are addressed in code. Shiju's human-owned review threads remain open for his confirmation. The earlier acceptance of the filesystem-policy compatibility changes remains in effect. Blocking findings: None. Carried Gator findings: None. Gator metadata
|
Monitoring CompleteMonitoring is complete because this PR has merged. Final status: Gator reached I removed the active |
Moves NemoClaw's OpenShell pins from v0.1.7 to v0.1.8: the native CLI, the gateway, supervisor and sandbox images, the gateway chart, the OpenShell crates, and the vendored SDK. Deployments built from this revision run OpenShell v0.1.8, which no longer waits out a Kubernetes sandbox pod's termination grace period on delete and renews client-credentials tokens in the CLI. ## Problem NemoClaw pins OpenShell v0.1.7 (`5d25211`). v0.1.8 (`f3d9765`, 80 commits later) is the latest release. Among its fixes: - deleting a sandbox on Kubernetes no longer waits out the pod's 30-second termination grace period (ai-openshell/OpenShell#5279), which every Kubernetes destroy and sandbox replacement paid (ai-openshell/OpenShell#5025); - the CLI renews an expired client-credentials token by repeating the grant (ai-openshell/OpenShell#4389, closing ai-openshell/OpenShell#4287), a limit our Kubernetes guide and GPU autoscaling example documented; - deleted sandboxes no longer leave memory behind on the gateway (ai-openshell/OpenShell#5428). ## Change - **Pins:** the Cargo revision of `openshell-core`, `openshell-sdk` and `openshell-policy`, and of the vendored SDK's `openshell-core` and `openshell-crypto`; in `versions.json`, the version, revision, Linux CLI archives, gateway, supervisor and sandbox images, and gateway chart; the managed-gateway reference, a contract test and the gateway contract module, which carry the gateway digest. The CLI checksums come from the release's `openshell-checksums-sha256.txt` and match the downloaded archives; the image and chart digests come from GHCR's `0.1.8` tags, and GHCR's `0.1.7` tags match the previous pins. - **Vendored SDK:** upstream changed only `src/client.rs` (a new `auth_interceptor()` accessor), copied unchanged. The SDK manifest still enables core telemetry, so the manifest patch stays; `NOTICE.md` records the refresh. `Cargo.lock` changes only the five OpenShell crates' revision. - **SDK integration limits:** the table in `internal-docs/design/architecture.md` still holds at v0.1.8 and now cites that revision. - **`websocket_credential_rewrite`:** OpenShell now rejects it on a `rest` endpoint (ai-openshell/OpenShell#5336), through the `openshell-policy` validation NemoClaw already runs on explicit policies. The field's description says it needs `protocol: websocket`; the JSON Schema, configuration reference and provider schema snapshot are regenerated. - **Live / Kind budgets:** with v0.1.8 the two kind cases take about 35-40 s less each: 98-108 s and 62-70 s on this pull request's runs, against 138-143 s and 94-100 s on recent `v1` runs. The per-test budget and the `live-kind` slow-timeout drop from 180 s to 140 s, and the step's wall budget from 300 s to 240 s. - **Limits removed:** the Kubernetes guide and the GPU autoscaling example no longer tell readers to sign in again when a client-credentials token expires; they say to keep `OPENSHELL_OIDC_CLIENT_SECRET` set. - **Release notes** list the new pin, the fixes above, and the policy changes that can stop an existing explicit policy: `websocket_credential_rewrite` on `rest`, filesystem paths through a symlink in a writable workspace (ai-openshell/OpenShell#5278), and IPv4-mapped IPv6 endpoint hosts (ai-openshell/OpenShell#5101). Resolves #13959. ## Upgrade notes checked - **Static credential placement** (ai-openshell/OpenShell#4886): every profile NemoClaw registers (inference, `api` integrations, Brave and Tavily search) already declares `auth_style` and `header_name`, including Anthropic's `x-api-key` and Brave's `X-Subscription-Token`, so their credentials keep resolving. - **OCSF attribution** (ai-openshell/OpenShell#5048): NemoClaw reads no OCSF records. - **SDK moves:** the Python and Go SDK changes don't apply; NemoClaw uses the Rust SDK. - **Gateway interceptors** (ai-openshell/OpenShell#5173): NemoClaw registers none. - **Chart:** v0.1.8 adds optional `metrics.tls`, `priorityClassName` and `topologySpreadConstraints`; NemoClaw sets none of them. ai-openshell/OpenShell#5478, which would replace the `metricsPort: 0` setting, isn't in v0.1.8, so that setting stays. - **User guide:** apart from the lines above, `docs/` still describes NemoClaw `637bdb6` and its OpenShell 0.1.7 links; moving them belongs to the next guide refresh. --------- Signed-off-by: Carlos Villela <cvillela@nvidia.com>
…pped hosts (#97) Closes #95 Lint warnings for OpenShell v0.1.8 runtime changes that the policy validator does not catch (split out of #80 to keep the bump PR #96 reviewable; independent of it). ## Change - **WebSocket on `rest`** (ai-openshell/OpenShell#5336, REST endpoints answer upgrades with 403): `warning[net]` for a `ws://`/`wss://` URL literal whose host:port is declared only by an inspected `rest` egress (`protocol=rest`, or `access=`/`allow=` with no protocol). Not reported when any `protocol=websocket` (or other non-rest) egress also covers it, for L4 passthrough egress, on comment-only lines, in excluded files, or under a nearby `@openshell ignore kind=net`. Engine-independent (works with `engine = "regex"` too). - **IPv4-mapped hosts** (ai-openshell/OpenShell#5101, evaluated as IPv4): new `validate::host_warning` (any `::ffff:` form, bracketed or hex) → `warning[directive]` on egress directives, and a warning from `check_document`, so `lint --policy`, `drift` and `generate` report it in policy files. - **Symlinked fs paths** (ai-openshell/OpenShell#5278): not detectable statically (the symlink is in the image); README "Limits" says so and what to do. ## Docs README "Limits" bullet; CHANGELOG Unreleased. No CLI flags or directive syntax changed, so `docs/CLI.md`/`docs/DIRECTIVES.md` are unchanged (`gen-docs.sh --check` passes). ## Verified (Rust 1.94.1) `scripts/ci-local.sh` passes (fmt, clippy `-D warnings`, all tests, docs checks). New tests: `lint_warns_about_websocket_urls_on_rest_egress`, `lint_policy_warns_about_ipv4_mapped_hosts`, unit `ipv4_mapped_hosts_warn`. `examples/polyglot` still lints clean with `--deny-warnings`, so `actions-selftest` is unaffected. Not merging; needs Ilan's approval. Signed-off-by: Ilan Harel <ilanharel@gmail.com>
Summary
Validate filesystem policy paths through open descriptors and reject symlinks beneath workload-modifiable directories. Preserve protected system aliases and return command startup errors promptly over SSH.
Changes
Release Notes
Filesystem policy paths through symlinks inside writable workspaces now fail launch, including in best-effort mode. Specify their target paths directly.
Testing
Checklist