bug: align empty network binary scope semantics
@pimlock ci sta già lavorando.
Dal 19/9/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
User Story
As an OpenShell policy maintainer, I want empty and omitted binary scopes to have one documented and enforced meaning, so that policy tooling and runtime authorization agree.
Problem Statement
OpenShell currently assigns two meanings to an empty NetworkPolicyRule.binaries list:
- Policy merge, coverage, advisor reconciliation,
L7RuleTarget.any_binary, and related documentation treat it as "any binary." - Runtime OPA enforcement requires a binary entry to match, so an empty list matches no binary and denies access.
The authored YAML schema defaults an omitted binaries field to an empty list and canonical serialization omits empty lists. Empty and omitted therefore cannot be distinguished later.
This issue is a low-urgency tracking item for follow-up next week, primarily to preserve the investigation and resolve the documentation and contract ambiguity.
Impact / Why This Matters
The disagreement can produce false-positive control-plane behavior. Coverage checks or the policy advisor may report that a binary authorization is present and loaded while the live proxy still denies it. Users reading the incremental-update documentation may also expect an empty list to authorize every binary.
The current workaround is to always provide an explicit, nonempty binaries list. That avoids the ambiguity but does not fix existing policies, advisor behavior, or misleading documentation.
Acceptance Criteria
- Decide and document the canonical meaning of an empty or omitted
binarieslist. - Align runtime enforcement, policy merge and coverage logic, advisor reconciliation, CLI and SDK contracts, and published documentation with that decision.
- Clarify or revise
L7RuleTarget.any_binaryaccording to the chosen representation. - Add tests covering explicit binaries,
binaries: [], omittedbinaries, and incremental L7 updates. - Ensure coverage and reload reporting cannot claim authorization that runtime enforcement denies.
Reproduction Steps
- Start a Docker-backed OpenShell gateway and sandbox.
- Apply a policy allowing
index.crates.io:443for/usr/bin/curland confirm the request succeeds. - Replace the binary list with
binaries: []and wait for policy activation. - Repeat the request and observe that the runtime denies it.
- Apply the same policy with the
binariesfield omitted. The gateway reports the policy unchanged because it canonicalizes identically, and the runtime still denies it. - Compare this result with
binary_scope_covers,policy_covers_rule, merge handling, and the--any-binarydocumentation, which treat the empty list as any binary.
Environment
- OpenShell: current
maincheckout on 2026-09-18 - Runtime: Docker-backed standalone gateway with locally built gateway, supervisor, and sandbox binaries
- Sandbox image:
ghcr.io/nvidia/openshell-community/sandboxes/base:latest
Logs
RESULT label=explicit status=0 expected=allow
RESULT label=empty status=7 expected=deny
Policy unchanged (same hash after changing empty to omitted)
RESULT label=omitted status=7 expected=deny
LIVE_TEST_PASS
- Lingua principale
- Rust
- Stelle
- 8.7k
- Fork
- 1.3k
- Merge medio
- 2g 7h
- PR unite (30g)
- 243
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di NVIDIA/OpenShell
-
area:docs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
-
state:triage-needed
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
area:cli state:validated
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
state:triage-needed
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
area:build spike state:review-ready state:stale
Difficoltà 2/5 Mezza giornata Idoneità per principianti 68/100
Tutte le issue di NVIDIA/OpenShell
Issue simili
-
risk:low runtime status:in-progress type:test
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
zeroclaw-labs/zeroclaw#11023 ·
-
good first issue refactor
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
EricSpencer00/Resilient#4835 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
bisq-network/bisq-musig#204 ·
-
agent:ready documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
cesarferreira/stax#890 ·