You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enterprise deployments need a way to define an auditable maximum OpenShell policy/profile and prove that local users, agents, reviewers, provider attachments, and policy updates cannot exceed it.
OpenShell should also explore whether policy proposals can be checked for narrowness. A proposal may be inside the maximum envelope but still too broad for automatic approval, such as granting ** path access when the observed denial was one exact request.
This issue is a spike. It should produce convincing fixtures and a feasibility report, not a production admission gate.
Research Hypothesis
The research question is whether policy negotiation can be reduced to satisfiability checks over OpenShell policy semantics.
For maximum-envelope enforcement, model each relevant capability as an abstract action x:
Then ask the OpenShell prover / Z3 model for a counterexample:
exists x:
candidate_allows(x)
AND NOT maximum_allows(x)
If this is unsat, the candidate stays within the modeled maximum. If this is sat, the solver should return a concrete capability that exceeds the maximum, such as:
For narrowness, test whether the same style applies against a request-derived witness:
exists x:
candidate_delta_allows(x)
AND NOT witness_allows(x)
Also test whether some narrowness rules are better expressed as structural budget constraints:
breadth(candidate_delta) <= configured_budget
The spike should determine whether narrowness works best as SMT containment, structural budget checks, broadness scoring, or a hybrid.
Proposed Spike
Build fixture-driven tests that load:
maximum_policy: the security-approved OpenShell policy/profile envelope.
current_policy: the runtime's current minimal/effective policy.
proposal: a merge operation or proposed rule.
observed_denial: optional witness data for narrowness checks.
narrowness_budget: optional limits for automatic approval.
expected_max_result: within_max, exceeds_max, or unsupported.
expected_narrowness_result: within_budget, over_budget, or unsupported.
The spike should prefer concrete, runnable fixtures over product design. A successful spike can still be small if it demonstrates the model catches real broadening and gives useful counterexamples.
Problem Statement
Enterprise deployments need a way to define an auditable maximum OpenShell policy/profile and prove that local users, agents, reviewers, provider attachments, and policy updates cannot exceed it.
OpenShell should also explore whether policy proposals can be checked for narrowness. A proposal may be inside the maximum envelope but still too broad for automatic approval, such as granting
**path access when the observed denial was one exact request.This issue is a spike. It should produce convincing fixtures and a feasibility report, not a production admission gate.
Research Hypothesis
The research question is whether policy negotiation can be reduced to satisfiability checks over OpenShell policy semantics.
For maximum-envelope enforcement, model each relevant capability as an abstract action
x:Then ask the OpenShell prover / Z3 model for a counterexample:
If this is
unsat, the candidate stays within the modeled maximum. If this issat, the solver should return a concrete capability that exceeds the maximum, such as:For narrowness, test whether the same style applies against a request-derived witness:
Also test whether some narrowness rules are better expressed as structural budget constraints:
The spike should determine whether narrowness works best as SMT containment, structural budget checks, broadness scoring, or a hybrid.
Proposed Spike
Build fixture-driven tests that load:
maximum_policy: the security-approved OpenShell policy/profile envelope.current_policy: the runtime's current minimal/effective policy.proposal: a merge operation or proposed rule.observed_denial: optional witness data for narrowness checks.narrowness_budget: optional limits for automatic approval.expected_max_result:within_max,exceeds_max, orunsupported.expected_narrowness_result:within_budget,over_budget, orunsupported.The spike should prefer concrete, runnable fixtures over product design. A successful spike can still be small if it demonstrates the model catches real broadening and gives useful counterexamples.
Initial Fixtures
Maximum-envelope fixtures should include:
GET /repos/NVIDIA/OpenShell/issues/*GET /repos/NVIDIA/OpenShell/issues/123GET /repos/NVIDIA/OpenShell/issues/*GET /repos/NVIDIA/**GET /repos/**POST /repos/**GET /search/issues?org=NVIDIAGET /search/issuesfullwith denyPOST /admin/**POST /admin/settingsapi.github.com:443*.github.com:443/usr/bin/gh/usr/bin/*10.0.5.0/2410.0.0.0/8queryonlymutation createIssueget_*onlycreate_pull_requestStart narrowness with a small budget model:
Narrowness fixtures should include:
gh GET api.github.com /repos/NVIDIA/OpenShell/issues/123/repos/NVIDIA/OpenShell/issues/*/repos/NVIDIA/OpenShell/****POST*.github.com/usr/bin/*Expected Output
Code Areas To Inspect
crates/openshell-sandbox/data/sandbox-policy.rego,crates/openshell-sandbox/src/opa.rs,crates/openshell-sandbox/src/l7/*crates/openshell-policy/src/lib.rs,crates/openshell-policy/src/merge.rscrates/openshell-prover/src/policy.rs,crates/openshell-prover/src/model.rs,crates/openshell-prover/src/queries.rscrates/openshell-server/src/grpc/policy.rsNon-Goals
Labels
area:policy,area:gateway,area:sandbox,topic:l7,topic:security,topic:testing,spike,state:in-progress