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
{{ message }}
Repository navigation
Commit 28c14f4
Browse filesBrowse the repository at this point in the historyBrowse files
feat(tui): warn when a proposed endpoint is not method- and path-scoped
The draft inbox renders an endpoint's scope but never says when that scope is
wide. endpoint_layer_label already tags L4 and format_allow_rule already renders
an unset method or path as *, so the breadth is displayed while nothing draws a
reviewer's eye to a proposal that grants far more than the request that was
denied.
Add scope_warning, a pure classifier beside endpoint_layer_label, and render it
under the endpoint it describes in the detail popup, styled like the existing
security-note line. It flags an L4 endpoint, a REST endpoint with no allow
rules, and a REST allow rule that leaves the method or path unset. Protocols
other than REST scope on command rather than method and path, so they are left
alone rather than warned about incorrectly.
This stays in the TUI rather than in generate_security_notes because the
gateway's security notes feed auto-approval eligibility, so adding a case there
is a policy decision rather than a presentation one. Everything needed to
classify the endpoint is already on the client in proposed_rule.endpoints.
Part of #1098.
Signed-off-by: Vyncint Ng <115854244+vyncint@users.noreply.github.com>
Copy file name to clipboardExpand all lines: docs/sandboxes/policy-advisor.mdx
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -232,6 +232,8 @@ The output shows the chunk ID, status, rationale, binary, endpoint summary, prov
232
232
Endpoints: api.github.com:443 [L7 rest, allow PUT /repos/NVIDIA/OpenShell/contents/docs/**]
233
233
```
234
234
235
+
The terminal UI flags proposals that are broader than the request that was denied. In the detail popup, `openshell term` shows a warning under any endpoint that is L4, that is REST with no allow rules, or whose allow rule leaves the method or path unset. Protocols other than REST scope on `command`, so they are not flagged.
236
+
235
237
Approve only when the structured rule matches the access you intend to grant:
0 commit comments