Skip to content

fix(proxy,server): audit Cedar exceptions; add global 500 handler (POLICY-003, NET-004) - #214

Merged
imran-siddique merged 3 commits into
mainfrom
fix/security-medium-policy003-net004
Jun 6, 2026
Merged

imran-siddique merged 3 commits into
mainfrom
fix/security-medium-policy003-net004

Conversation

@imran-siddique

Copy link
Copy Markdown
Member

Summary

Test plan

  • test_cedar_exception_writes_fault_audit_entry — RuntimeError from Cedar backend produces one fault entry with correct policy_decision and exception_type
  • test_unhandled_exception_returns_generic_500 — unhandled exception in /tools/list returns 500 without leaking detail
  • Full suite: 330 tests pass locally

🤖 Generated with Claude Code

imran-siddique and others added 3 commits June 6, 2026 15:29
…LICY-003, NET-004)

POLICY-003: Cedar backend exceptions now emit a fault audit entry
before re-raising, so misconfigured-policy incidents are traceable
in the audit chain instead of disappearing silently.

NET-004: Added a global Starlette exception handler that returns
{"error_code": "INTERNAL_ERROR"} without leaking exception class
names or messages to callers.

Closes #160, #180

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The per-workflow Cedar scope PR added workflow_id to call_tool().
The conformance test mock lambdas didn't accept **kwargs, causing
TEE_FAULT on every tools/call in the conformance suite.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@imran-siddique
imran-siddique merged commit 1c451ac into main Jun 6, 2026
0 of 7 checks passed
@imran-siddique
imran-siddique deleted the fix/security-medium-policy003-net004 branch July 29, 2026 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant