mirror of
https://github.com/NVIDIA/OpenShell.git
synced 2026-10-23 06:30:28 +08:00
fix(prover): only flag write bypass on explicit read-only intent
L4-only endpoints are not implicitly read-only. A policy with access: full and no protocol is an explicit grant of full access, not a violated intent. Write bypass now only fires when the policy expresses read-only intent via access: read-only or GET-only L7 rules. Signed-off-by: Alexander Watson <zredlined@gmail.com>
This commit is contained in:
@@ -177,7 +177,7 @@ def check_write_bypass(model: ReachabilityModel) -> list[Finding]:
|
||||
|
||||
for policy_name, rule in model.policy.network_policies.items():
|
||||
for ep in rule.endpoints:
|
||||
if ep.intent not in (PolicyIntent.READ_ONLY, PolicyIntent.L4_ONLY):
|
||||
if ep.intent != PolicyIntent.READ_ONLY:
|
||||
continue
|
||||
|
||||
for port in ep.effective_ports:
|
||||
|
||||
Reference in New Issue
Block a user