Skip to content

fix(security): harden supervisor and SSH RBAC - #6014

Merged
SDAChess merged 3 commits into
mainfrom
fix/6013-trivy-hardening/SDAChess
Nov 27, 2026
Merged

SDAChess merged 3 commits into
mainfrom
fix/6013-trivy-hardening/SDAChess

Conversation

@SDAChess

@SDAChess SDAChess commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Default the supervisor image to UID/GID 65534:65534 and restrict managed-workspace SSH NetworkPolicy mutation to the policy the driver applies. Compute drivers retain their explicit runtime identities, and required runtime-policy creation and reads remain authorized.

Related Issue

Closes #6013

The broader workspace namespace permission boundary remains tracked in #6010. The gateway read-only filesystem change stays in #6011.

Changes

  • Set an explicit non-root supervisor image user matching the shared-supervisor Helm defaults; document writable-directory requirements for direct/custom image launches.
  • Scope NetworkPolicy patch to openshell-sandbox-ssh, remove unused update, and retain the existing unrestricted create/get rule required for runtime policies and initial SSH-policy creation.
  • Update chart tests to reject unrestricted NetworkPolicy patching and verify managed-SSH enablement conditions.

Release Notes

Direct supervisor image launches now default to UID/GID 65534:65534; mounted runtime and log directories must be writable by the selected user.

Testing

  • 513 gateway chart tests and 7 workspace chart tests pass; all Helm CI values variants lint and render.

  • An injected unrestricted NetworkPolicy patch grant passes the old JSONPath assertion and fails the corrected assertion; the unmodified chart passes all 513 tests.

  • Trivy configuration scans across all configured profiles introduce no new findings at any severity and clear DS-0002. KSV-0056 remains visible because required cluster-wide creation permissions remain.

  • Rebuilt amd64 supervisor image using the published supervisor binary: image user is 65534:65534; --help and --version run without a user override; a live proxy starts with a read-only root and isolated writable runtime/log mounts and returns 403 policy_denied for a forbidden request. Temporary containers were removed.

  • Rebuilt image has zero HIGH/CRITICAL vulnerabilities against the current Trivy database.

  • Markdown lint, generated Helm README consistency, docs navigation, and git diff --check pass. Fern validation reports zero errors and three warnings.

  • Core sandbox lifecycle E2E and Kubernetes credential-driver E2E checks pass, including the managed-workspace lane.

  • Optional Kubernetes HA E2E passes on rerun. The first attempt passed 76/77 conformance tests; cli_no_keep_removes_sandbox_after_main_exit returned sandbox is not ready during TTY attachment.

  • Refreshed-head CI.

Checklist

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

Signed-off-by: Simon Scatton <sscatton@nvidia.com>
Signed-off-by: Simon Scatton <sscatton@nvidia.com>
@github-actions github-actions Bot added the state:accepted A maintainer decided OpenShell should pursue this issue label Nov 26, 2026
@github-actions

Copy link
Copy Markdown

@SDAChess SDAChess added test:e2e Requires end-to-end coverage test:e2e-kubernetes Requires Kubernetes end-to-end coverage labels Nov 26, 2026
@SDAChess
SDAChess marked this pull request as draft November 26, 2026 15:59
@SDAChess SDAChess added area:drivers Compute and secret drivers, host OS/architecture support, backend isolation, and lifecycle. topic:authnz Authentication, authorization, identity, sessions, credential protection, and policy integrity. topic:kubernetes Kubernetes operators, CRDs, deployment controllers, and native Kubernetes API integration. topic:security Vulnerability management, security analysis/auditing, bypass detection, and abuse prevention. labels Nov 26, 2026
@SDAChess
SDAChess marked this pull request as ready for review November 26, 2026 16:22
@alangou

alangou commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

LGTM on security. One fix: the assertion at tests/clusterrole_test.yaml:38 can never fail, because @.resourceNames == null does not match a rule with no resourceNames key. !@.resourceNames works.

Signed-off-by: @alangou

Signed-off-by: Simon Scatton <sscatton@nvidia.com>
@SDAChess
SDAChess enabled auto-merge November 27, 2026 11:32
@SDAChess
SDAChess added this pull request to the merge queue Nov 27, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 27, 2026
@SDAChess
SDAChess added this pull request to the merge queue Nov 27, 2026
Merged via the queue into main with commit e08d7d5 Nov 27, 2026
169 checks passed
@SDAChess
SDAChess deleted the fix/6013-trivy-hardening/SDAChess branch November 27, 2026 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:drivers Compute and secret drivers, host OS/architecture support, backend isolation, and lifecycle. state:accepted A maintainer decided OpenShell should pursue this issue test:e2e Requires end-to-end coverage test:e2e-kubernetes Requires Kubernetes end-to-end coverage topic:authnz Authentication, authorization, identity, sessions, credential protection, and policy integrity. topic:kubernetes Kubernetes operators, CRDs, deployment controllers, and native Kubernetes API integration. topic:security Vulnerability management, security analysis/auditing, bypass detection, and abuse prevention.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: harden supervisor identity and managed SSH RBAC

2 participants