NVIDIA / NVIDIA/OpenShell

feat(prover): support deny rules in policy verification

Open
#823 1 comment 0 reactions 1 assignee View on GitHub

@zredlined is already working on this.

Since Apr 13, 2026.

area:policy state:stale
Dominant language
Rust
Stars
8.7k
Forks
1.3k
Avg merge
2d 11h
Merged PRs (30d)
253

Description

Problem Statement

PR #822 adds L7 deny rules to the network policy schema, enabling the allow-everything-except pattern. Deny rules take precedence over allow rules.

The policy prover does not yet understand deny rules. Its policy parser, Z3 constraint model, and verification queries all operate on the allow-rule-only schema. Without this update, the prover will overestimate reachability -- reporting exfiltration or write-bypass paths through endpoints where deny rules would actually block the request at runtime.

Proposed Design

policy.rs: Parse deny_rules from endpoint definitions. Each deny rule has the same shape as an allow rule: method, path, query, command.

model.rs: For each endpoint, encode deny rules as negative constraints on l7_allows_write. If all write methods are covered by deny rules, the endpoint should be treated as write-blocked even if allow rules or access: full would otherwise permit them.

queries.rs: No structural changes expected. The exfiltration and write-bypass queries already check l7_allows_write -- the fix is in the model encoding.

Agent Investigation

  • crates/openshell-prover/src/policy.rs parses endpoint fields including rules and access but does not yet handle deny_rules
  • crates/openshell-prover/src/model.rs encodes l7_allows_write based on allowed_methods() -- primary place to incorporate deny rule exclusions
  • PR #822 adds deny_rules to NetworkEndpointDef in crates/openshell-policy/src/lib.rs

Related: NVIDIA/OpenShell#565, #699, PR #741, PR #822

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.