@@ -8,18 +8,18 @@ keywords: "Generative AI, Cybersecurity, AI Agents, Sandboxing, Security, Policy
88position : 6
99---
1010
11- This reference describes the restrictive policy OpenShell uses when a sandbox has
12- no other policy, and the filesystem paths that OpenShell adds to sandbox
11+ This reference describes the restrictive policy OpenShell uses when a sandbox
12+ has no other policy, and the filesystem paths that OpenShell adds to sandbox
1313policies at runtime.
1414
1515## When the Default Applies
1616
17- OpenShell uses the restrictive default only when a sandbox has no saved policy
18- and its image contains no policy. Creating a sandbox without ` --policy ` does not
19- by itself mean the default is active, because the image or
20- ` OPENSHELL_SANDBOX_POLICY ` can supply one. An invalid image policy keeps the
21- workload from starting until you repair it. It does not select the default.
22- Refer to [ Where the Active Policy Comes
17+ OpenShell uses the restrictive default only when no global policy is active, the
18+ sandbox has no saved policy, and its image contains no policy. Creating a
19+ sandbox without ` --policy ` does not by itself mean the default is active,
20+ because the image or ` OPENSHELL_SANDBOX_POLICY ` can supply one. An invalid image
21+ policy keeps the workload from starting until you repair it. It does not select
22+ the default. Refer to [ Where the Active Policy Comes
2323From] ( /sandboxes/policies#where-the-active-policy-comes-from ) for the complete
2424selection order.
2525
@@ -42,17 +42,18 @@ compatibility is `best_effort`.
4242## Default Network Access
4343
4444The default policy defines no network rules or middleware, so all outbound
45- network access is denied. Attached providers can still add their network rules
46- to the effective policy. Provider rules are runtime composition, not fields in
47- the default policy, so inspect the base and effective views separately to
48- identify a provider-derived grant.
45+ network access is denied. Attached providers can still add network rules to the
46+ effective policy. To see them, compare the base and effective policies, as
47+ described in [ Inspect the Selected Policy] ( #inspect-the-selected-policy ) .
4948
5049## Default Process Identity
5150
5251The default policy leaves process identity to the compute driver. Docker and
53- Podman honor a non-root OCI ` USER ` . When an image declares no user, they use
54- numeric UID and GID 1000. Other drivers apply their configured non-root
55- identity.
52+ Podman run the workload as the image's ` USER ` when it names a non-root user, and
53+ as UID and GID 1000 when the image declares no user. They reject an image whose
54+ user is root unless the policy you pass when you create the sandbox sets a
55+ non-root ` run_as_user ` . Kubernetes and VM sandboxes run as the identity
56+ configured for their driver.
5657
5758## Baseline Filesystem Paths
5859
@@ -67,19 +68,20 @@ baseline paths to the sandbox's filesystem policy at startup:
6768| Read-write | ` /tmp ` , ` /dev/null ` |
6869
6970OpenShell adds a baseline path only when it is available and your policy does
70- not already list it. It never changes the access of a path you list, so a
71+ not already list it, so list the paths your workload needs, such as ` /app ` , in
72+ your policy. OpenShell never changes the access of a path you list, so a
7173baseline read-write path that you list as read-only stays read-only. If the
7274policy has no ` filesystem_policy ` section, OpenShell creates one with
7375` include_workdir: true ` .
7476
7577The sandbox saves the enriched filesystem policy as a new revision, so the
76- added paths appear in ` openshell policy get --base ` . Filesystem paths cannot be
77- removed from a running sandbox , so keep the added paths when you replace the
78- complete policy.
78+ added paths appear in ` openshell policy get --base ` . OpenShell can reject a
79+ replacement policy that removes filesystem paths , so keep the added paths when
80+ you replace the complete policy.
7981
8082The runtime also grants the workload read-only access to the sandbox's TLS CA
81- certificates under ` /run/openshell-supervisor-ca ` . This grant is not saved to
82- the stored policy.
83+ certificates under ` /run/openshell-supervisor-ca ` . This grant is not saved in
84+ the sandbox's policy.
8385
8486### GPU Sandboxes
8587
@@ -93,26 +95,28 @@ additional paths when the corresponding GPU device is present:
9395
9496CUDA writes thread names under ` /proc ` during initialization, so GPU enrichment
9597moves ` /proc ` from read-only to read-write. OpenShell adds each path only when
96- it exists in the workload. These paths apply at runtime and are not saved to
97- the stored policy.
98+ it exists in the workload. These paths apply at runtime and are not saved in
99+ the sandbox's policy.
98100
99101### Protected Paths
100102
101- On current Linux isolation paths , a mandatory Landlock baseline protects the
102- private ` /.openshell ` hierarchy and requires Landlock ABI v3. Your filesystem
103- policy is applied on top of that baseline and can narrow access, but it cannot
104- expose ` /.openshell ` . The ` best_effort ` compatibility setting does not disable
105- this protection or allow a kernel without ABI v3.
103+ On Docker, Podman, Kubernetes, and VM sandboxes , a mandatory Landlock baseline
104+ protects the private ` /.openshell ` directory and requires Landlock ABI v3. Your
105+ filesystem policy is applied on top of that baseline and can narrow access, but
106+ it cannot expose ` /.openshell ` . The ` best_effort ` compatibility setting does not
107+ disable this protection or allow a kernel without ABI v3.
106108
107109## Inspect the Selected Policy
108110
109- Inspect the sandbox's base policy and the gateway's effective representation:
111+ To see which policy a sandbox uses, print its base and effective policies.
112+ While a global policy is active, both commands show the global policy:
110113
111114``` shell
112115openshell policy get < sandbox> --base
113116openshell policy get < sandbox> --full
114117```
115118
116- ` --full ` shows gateway composition, not an attestation of the restrictions
117- already installed in a running kernel process. Use sandbox readiness, revision
118- status, request checks, and runtime logs to verify activation.
119+ Neither view includes the paths that OpenShell grants only at runtime, such as
120+ the CA certificate and GPU paths. To confirm what a running sandbox enforces,
121+ check the revision status with ` openshell policy list <sandbox> ` and test
122+ requests.
0 commit comments