Repository navigation
ux(cli): rule get lists only advisor proposals and policy get omits the payload by default, so 'no network rules' misleads #4927
Description
User Story
I operate sandboxes and need to answer one question quickly: which network destinations may this sandbox reach right now?
I directly encountered that neither openshell rule get nor the default openshell policy get answers it. rule get returns only the advisor's proposal chunks, and policy get prints five lines of metadata with no policy body — so both look like "there are no rules" even when the sandbox carries an explicit network_policies document.
Problem Statement
Given a sandbox created with a policy that defines several network_policies entries (pypi.org, registry.npmjs.org, plus wildcard endpoints):
openshell rule get <sandbox>lists only advisor/approve-workflow proposals. Static rules from the policy document are absent:
$ openshell rule get viztest | grep -cE 'pypi\.org|registry\.npmjs'
0
$ openshell rule get viztest
Network Rules: (version 1, 1 chunk)
Chunk: ... # only proposals appear hereopenshell policy get <sandbox>prints metadata only and never the rules:
$ openshell policy get viztest
Version: 1
Hash: ab45c42d...
Status: Effective
Source: sandbox
Config rev: 12382332441607749130- The payload is only reachable with an extra flag, or through a different command:
$ openshell policy get viztest --full | grep -c network_policies
1
$ openshell sandbox get viztest | grep -c network_policies
1So the information exists; two commands whose names suggest they show rules do not show the effective rules, and nothing in their default output hints that a payload was omitted.
Impact / Why This Matters
- During incident triage, "No network rules" reads as "nothing is allowed", while a static policy may in fact be allowing traffic. That misleads the person investigating a denial and can send them looking for a policy bug that does not exist.
- Conversely, an operator who wants to enumerate allowed destinations has to already know about
--full(or thatsandbox getprints the policy). There is no discoverable command for "what is allowed right now". - Two similar concepts share similar names — proposal/approve-workflow rules and policy-embedded endpoints — and
rule getreturns only the former. That namespace split is not visible from the command output.
Acceptance Criteria
-
openshell policy get <name>shows the effective policy body (includingnetwork_policies) by default, or states explicitly that the payload is omitted and names the flag that prints it. -
openshell rule get <name>also reports endpoints that come from the policy document, or is renamed/relabelled so it is clear it lists only pending/approved proposals. - One documented command answers "which network destinations may this sandbox reach right now?" and its output is machine-readable with
-o json.
Reproduction Steps
- Create a policy file that defines at least one
network_policiesentry, e.g. one endpointpypi.org:443. openshell sandbox create --name viztest --policy ./policy.yaml -- sh -c 'sleep 600'.openshell rule get viztest→ the static endpoint does not appear.openshell policy get viztest→ metadata only (five lines).openshell policy get viztest --fullandopenshell sandbox get viztest→ both containnetwork_policies.
Suggested UX
Make the default payload explicit, and keep a terse mode for scripting:
$ openshell policy get viztest # full effective policy (current --full behaviour)
$ openshell policy get viztest --summary # current metadata-only outputor keep the default and add a one-line footer:
Policy payload omitted (3 network rules, 1 filesystem policy); use --full to print it.Environment
- OpenShell 0.1.5 (CLI, gateway, supervisor, sandbox runtime all 0.1.5)
- Gateway: local, mTLS, Docker compute driver 29.9.2 (cgroup v2), single host
- Host OS: Windows 10 22H2 (19045.3803) with WSL 2.9.13, Ubuntu 24.04, kernel 6.18.40.1-microsoft-standard-WSL2
- Sandbox image: Ubuntu 24.04 based
Activity
youyouhe commentedon Oct 26, 2026
Additional evidence and environment
Environment
Same deployment as #4926:
Status: healthy, driverdocker 0.1.5cgroup=systemd/2,runcReproduction, with verbatim output
Sandbox
ev4926was created with a policy document containing onenetwork_policiesentry (registry.npmjs.org:443, laterprotocol: rest).1.
rule getreports no rules at allThe sandbox does have a network rule; it lives in the policy document rather than in the proposal inbox. On sandboxes that also carry advisor proposals the same command switches to a
Network Rules: (version N, M chunks)listing that still omits the policy-embedded endpoints:2.
policy getdefault output carries no payload and no hint that a payload existsnetwork_policies: 03. The payload exists behind an opt-in flag, or behind a different command
4. The flags are documented, but nothing in the default output points at them
Why the wording matters operationally
No network rules for sandbox 'ev4926'is the literal string an operator sees while a static policy is actively allowing traffic. In our own triage this read as "nothing is allowed", which pointed the investigation at the policy engine instead of at the destination. The inverse is equally costly: enumerating what a sandbox may reach requires already knowing about--full, because no command advertises it.