Skip to content

πŸ›‘οΈ Sentinel: [MEDIUM] Fix swallowed exceptions in custom global error handler - #213

Open
n24q02m wants to merge 1 commit into
mainfrom
sentinel-fix-server-logging-12151315433162222503
Open

πŸ›‘οΈ Sentinel: [MEDIUM] Fix swallowed exceptions in custom global error handler#213
n24q02m wants to merge 1 commit into
mainfrom
sentinel-fix-server-logging-12151315433162222503

Conversation

@n24q02m

@n24q02m n24q02m commented Sep 2, 2026

Copy link
Copy Markdown
Owner

🚨 Severity: MEDIUM
πŸ’‘ Vulnerability: The FastAPI application used a custom global exception handler to apply security headers to 500 error responses, but this overrode Starlette's built-in ServerErrorMiddleware logging. It returned a plain 500 response but silently swallowed the traceback on the server-side, making debugging impossible and masking potential exploitation attempts.
🎯 Impact: Prevents operators from diagnosing internal server errors or identifying malicious activity causing repeated 500 responses.
πŸ”§ Fix: Added log.error("Unhandled server error", exc_info=_exc) to the global exception handler to explicitly log the exception before returning the safe generic response.
βœ… Verification: Verified by inspecting the src/tacet/serve/server.py implementation and ensuring the full test suite passes. Also ran the specific test_mvp.py endpoints.


PR created automatically by Jules for task 12151315433162222503 started by @n24q02m

The global exception handler correctly obscured stack traces from clients by returning a generic 500 plain text response but accidentally swallowed the exception on the server side because it didn't explicitly log it. This commit adds `log.error` to properly track these unhandled exceptions internally.

Co-authored-by: n24q02m <135627235+n24q02m@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

πŸ‘‹ Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a πŸ‘€ emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

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