feat(prover): add standalone policy boundary checker - #3289
Open
johnnygreco wants to merge 18 commits into
Open
johnnygreco wants to merge 18 commits into
johnnygreco wants to merge 18 commits into
Conversation
johnnygreco
requested review from
a team,
derekwaynecarr,
mrunalp and
sjenning
as code owners
September 11, 2026 18:59
|
🌿 Preview your docs: https://nvidia-preview-pr-3289.docs.buildwithfern.com/openshell |
Collaborator
|
/ok to test a86633f |
Collaborator
Author
|
/ok to test fd2880f |
Collaborator
Author
|
/ok to test 5764a6b |
Collaborator
Author
|
/ok to test ae699e1 |
This was referenced Sep 14, 2026
Collaborator
Author
|
/ok |
Collaborator
Author
|
/ok to test 1fe1f95 |
Collaborator
Author
|
/ok to test 5797c58 |
Collaborator
Author
|
/ok to test f778053 |
johnnygreco
force-pushed
the
2109-standalone-policy-prover/jg
branch
from
September 16, 2026 19:29
f778053 to
e908a76
Compare
Collaborator
Author
|
/ok to test d25d027 |
johnnygreco
added this pull request to stack #3397
September 16, 2026 22:39
Signed-off-by: Johnny Greco <jogreco@nvidia.com>
Signed-off-by: Johnny Greco <jogreco@nvidia.com>
Signed-off-by: Johnny Greco <jogreco@nvidia.com>
Signed-off-by: Johnny Greco <jogreco@nvidia.com>
Signed-off-by: Johnny Greco <jogreco@nvidia.com>
Signed-off-by: Johnny Greco <jogreco@nvidia.com>
Signed-off-by: Johnny Greco <jogreco@nvidia.com>
Signed-off-by: Johnny Greco <jogreco@nvidia.com>
Signed-off-by: Johnny Greco <jogreco@nvidia.com>
Signed-off-by: Johnny Greco <jogreco@nvidia.com>
Signed-off-by: Johnny Greco <jogreco@nvidia.com>
Signed-off-by: Johnny Greco <jogreco@nvidia.com>
Signed-off-by: Johnny Greco <jogreco@nvidia.com>
Signed-off-by: Johnny Greco <jogreco@nvidia.com>
Signed-off-by: Johnny Greco <jogreco@nvidia.com>
Signed-off-by: Johnny Greco <jogreco@nvidia.com>
Signed-off-by: Johnny Greco <jogreco@nvidia.com>
Signed-off-by: Johnny Greco <jogreco@nvidia.com>
johnnygreco
force-pushed
the
2109-standalone-policy-prover/jg
branch
from
September 16, 2026 22:40
d25d027 to
0677b49
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a standalone policy boundary checker. It does not install, store, or enforce a managed gateway boundary.
openshell-prover checkproves whetherAllowed(candidate) ⊆ Allowed(boundary)for the supported policy model and returns containment evidence, a counterexample, or an explicit unsupported/inconclusive result. The check runs locally against two fully composed policy files and does not contact a gateway.flowchart LR boundary[Operator boundary policy] --> check[openshell-prover check] candidate[Fully composed candidate policy] --> check check --> within[within_boundary<br/>exit 0] check --> exceeds[exceeds_boundary + counterexample<br/>exit 1] check --> incomplete[unsupported or inconclusive + reason code<br/>exit 3 or 130]Rust callers can use the containment engine without invoking the CLI:
Related Issue
Part of #2109. This PR provides the reusable containment engine and standalone CLI. Gateway boundary storage, enforcement, and permission modes remain separate work, so the issue should stay open.
Changes
openshell-prover check candidate.yaml --boundary boundary.yamlwith text and JSON output, stable exit and reason codes, bounded inputs, solver timeouts, resource limits, and Unix cancellation. No other prover subcommands are added.within_boundaryandexceeds_boundary; unsupported policy shapes and checks requiring unavailable runtime context continue to fail closed.candidate && !boundarybefore returning counterexamples. Reject invalid inputs such as embedded NULs without panicking./tmpand candidate/tmp/johnnyreturnunsupported. Symlinks, bind mounts, and aliases mean lexical ancestry alone is not sound without target-filesystem evidence; that evidence contract is separate future work.scope(model_version,policy_version, and modeleddomains),result, optionalcounterexample, and optionalreason_code/reasonfields. The removedassumptionsfield is not part of the contract.openshell-proverthrough the existing OpenShell installation paths: Debian, an RPM subpackage installed alongside the CLI and gateway, and the Homebrew formula resource. Continue publishing standalone Linux x86_64/aarch64 and macOS Apple Silicon archives with a dedicated SHA-256 manifest.Testing
mise run pre-commitmise run testmise run cicargo test --locked -p openshell-prover -p openshell-prover-cli--boundary,within_boundary,exceeds_boundary, JSON evidence, exit codes, and rejection of removed--maximumRelease workflows build and smoke-test native artifacts. They were not dispatched locally across every release target; Actionlint, the full local CI suite, and focused packaging tests validate their definitions and integration.
Checklist