Skip to content

Commit ae699e1

Browse files
committed
docs(prover): clarify installation and check results
Signed-off-by: Johnny Greco <jogreco@nvidia.com>
1 parent 1c21e6e commit ae699e1

3 files changed

Lines changed: 59 additions & 58 deletions

File tree

‎architecture/security-policy.md‎

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -343,38 +343,15 @@ candidate policy with an operator-supplied local maximum. It establishes
343343
result. It does not fetch gateway state, compose provider rules, apply policy,
344344
or decide whether an in-boundary change is eligible for automatic approval.
345345

346-
The initial maximum-boundary model covers filesystem paths, L4 network
347-
authority, and enforced REST method and path authority, including explicit REST
348-
denies. Network containment covers runtime configurations both with and without
349-
binary identity enforcement. Strict checks match grants and denies against the
350-
executable and an ancestor identity, and the evidence identifies the identities
351-
for an exceeding witness. Network binary selectors, endpoint host and path
352-
selectors, and REST allow and deny method and path selectors must use ASCII
353-
literals. This restriction applies to both inputs, including deny-only rules;
354-
embedded NUL bytes in those fields are also unsupported. Other Unicode policy
355-
text and filesystem paths are unaffected. ASCII wildcard selectors still cover
356-
non-ASCII runtime values matched by the policy engine.
357-
Recognized authority outside the reviewed model produces an unsupported result
358-
rather than being silently ignored.
359-
Environment-dependent authority also remains unsupported when the result
360-
depends on context that is unavailable to the local command. This includes an
361-
unresolved workdir, filesystem or binary containment that depends on image-specific
362-
path resolution, and overlapping L4 and REST endpoints whose inspection selection
363-
depends on the complete runtime endpoint set. Candidate and maximum paths use
364-
the same sandbox namespace and mount interpretation; the checker does not
365-
resolve them against the CLI host or verify kernel enforcement in a running
366-
sandbox. Filesystem checks assume stable path resolution when enforcement rules
367-
are created. They support matching paths, grant removal, write-to-read reduction,
368-
and a maximum root grant. Other comparisons between paths remain unsupported;
369-
lexical ancestry or distinctness alone cannot establish resolved ancestry or
370-
distinctness. Adding access when the maximum grants none produces a counterexample.
371-
If the solver produces a string that cannot be decoded and checked faithfully,
372-
the command returns an inconclusive `invalid_witness` result instead of publishing
373-
the value as counterexample evidence.
346+
The initial model covers filesystem paths, L4 network authority, and enforced
347+
REST method and path authority. It returns explicit unsupported or inconclusive
348+
results when a sound decision depends on authority or runtime context outside
349+
the model. The result records the model version and covered domains so callers
350+
can bind a successful check to those semantics.
374351

375352
This containment operation is separate from the proposal-risk queries below.
376353
See the [standalone policy prover documentation](../docs/reference/policy-prover.mdx)
377-
for installation, command behavior, evidence, and exit codes.
354+
for installation, command behavior, model limitations, evidence, and exit codes.
378355

379356
## What the proposal prover decides
380357

‎crates/openshell-prover/README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ pub struct ExfilPath {
6363
}
6464
```
6565

66-
The gateway's `finding_delta` keys paths by `(category, binary,
67-
host:port, category, method)` so that adding a new method on an
66+
The gateway's `finding_delta` keys paths by `(finding query, binary,
67+
host:port, path category, method)` so that adding a new method on an
6868
already-reached host surfaces as exactly one new path (not the whole
6969
re-emission of the existing method set).
7070

‎docs/reference/policy-prover.mdx‎

Lines changed: 51 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -18,43 +18,26 @@ operator-owned ceiling. It does not grant authority by itself.
1818

1919
## Install the Prover
2020

21-
Download the archive for your platform from the
22-
[OpenShell releases](https://github.com/NVIDIA/OpenShell/releases) page:
23-
24-
| Platform | Archive |
25-
|---|---|
26-
| Linux x86_64 | `openshell-prover-x86_64-unknown-linux-musl.tar.gz` |
27-
| Linux aarch64 | `openshell-prover-aarch64-unknown-linux-musl.tar.gz` |
28-
| macOS Apple Silicon | `openshell-prover-aarch64-apple-darwin.tar.gz` |
29-
30-
Download `openshell-prover-checksums-sha256.txt` from the same release. On
31-
Linux, verify the selected archive before extracting it:
21+
The standard OpenShell installer includes `openshell-prover`:
3222

3323
```shell
34-
archive=openshell-prover-x86_64-unknown-linux-musl.tar.gz
35-
grep " ${archive}$" openshell-prover-checksums-sha256.txt | sha256sum --check
36-
tar -xzf "${archive}"
37-
mkdir -p ~/.local/bin
38-
install -m 0755 openshell-prover ~/.local/bin/openshell-prover
24+
curl -LsSf https://raw.githubusercontent.com/NVIDIA/OpenShell/main/install.sh | sh
25+
openshell-prover --version
3926
```
4027

41-
On macOS, use `shasum` for verification:
42-
43-
```shell
44-
archive=openshell-prover-aarch64-apple-darwin.tar.gz
45-
grep " ${archive}$" openshell-prover-checksums-sha256.txt | shasum -a 256 --check
46-
tar -xzf "${archive}"
47-
mkdir -p ~/.local/bin
48-
install -m 0755 openshell-prover ~/.local/bin/openshell-prover
49-
```
28+
The prover remains independent of the gateway at runtime. If you only need the
29+
standalone binary, use the artifacts listed in the
30+
[Support Matrix](/reference/support-matrix#standalone-policy-prover). These
31+
artifacts and `openshell-prover-checksums-sha256.txt` are attached to
32+
[OpenShell releases](https://github.com/NVIDIA/OpenShell/releases).
5033

5134
The release archive includes the solver linkage required by the executable.
5235
It does not require the main `openshell` command, a gateway configuration, or
5336
a separate Z3 installation.
5437

5538
## Check a Policy Boundary
5639

57-
Create a maximum policy:
40+
Create `maximum.yaml` with this maximum policy:
5841

5942
```yaml
6043
version: 1
@@ -66,7 +49,7 @@ filesystem_policy:
6649
- /tmp
6750
```
6851
69-
Create the fully composed candidate policy:
52+
Create `candidate.yaml` with this contained candidate:
7053

7154
```yaml
7255
version: 1
@@ -84,6 +67,36 @@ openshell-prover check candidate.yaml --maximum maximum.yaml
8467
```
8568

8669
A contained candidate prints `result: within_max` and exits with status `0`.
70+
To see an exceeding result and its counterexample, replace `candidate.yaml`
71+
with a policy that makes `/etc` writable even though the maximum grants only
72+
read access:
73+
74+
```yaml
75+
version: 1
76+
filesystem_policy:
77+
read_only:
78+
- /usr
79+
read_write:
80+
- /tmp
81+
- /etc
82+
```
83+
84+
```shell
85+
openshell-prover check candidate.yaml --maximum maximum.yaml
86+
```
87+
88+
To check the current effective policy of an existing sandbox, export it without
89+
display metadata:
90+
91+
```shell
92+
openshell sandbox get my-sandbox --policy-only > candidate.yaml
93+
openshell-prover check candidate.yaml --maximum maximum.yaml
94+
```
95+
96+
This export includes provider-contributed rules. For a proposed change that is
97+
not active, supply the complete post-change effective policy. The standalone
98+
prover does not compose a base policy with provider rules.
99+
87100
Use JSON when a script consumes the result:
88101

89102
```shell
@@ -99,6 +112,17 @@ version. An exceeding result also includes a filesystem or network
99112
counterexample. Automation should use `result` and `reason_code` instead of
100113
parsing the human-readable explanation.
101114

115+
| Field | When populated |
116+
|---|---|
117+
| `counterexample` | An object for `exceeds_max`; otherwise `null`. |
118+
| `reason_code` | A stable identifier for an emitted `error`, `unsupported`, or `inconclusive` result; otherwise `null`. |
119+
| `reason` | A human-readable explanation paired with `reason_code`; otherwise `null`. |
120+
121+
The stable reason codes are `invalid_input`, `unsupported_policy_shape`,
122+
`unresolved_workdir`, `unresolved_binary_path`,
123+
`unresolved_filesystem_path`, `solver_timeout`, `solver_unknown`,
124+
`resource_limit`, `invalid_witness`, and `cancelled`.
125+
102126
The solver has a finite 10-second default budget. Set a different positive
103127
budget with an integer followed by `ms`, `s`, or `m`:
104128

0 commit comments

Comments
 (0)