GLM-5.3 Flash · Heavy
github-oauth-security-enhancement-sentry
Sentry · Python · M · 100–299 lines · 2 files
The generalist plus 9 specialist lens agents in parallel, then the same verify and dedup steps. Judge: Claude Opus 5.5.
- Gold bugs found
- 3 of 7
- Comments published
- 4
- Comments matching a bug
- 3
- Comments not matching
- 1
- Cost of this PR
- $0.203
Published comments (4)
OAuth state uses deterministic pipeline.signature, enabling CSRF — An attacker can derive the constant `state` and forge a callback that binds their own GitHub code as `github_authenticated_user` in a victim's pipeline, defeating the user-match check. Generate a random uuid4 token per pipeline and bind it into the pipeline state instead.
Missing sender key in integration metadata causes unhandled KeyError — Older integrations can lack a `sender` key in `integration.metadata`, so the check raises an unhandled `KeyError` — a 500 instead of the graceful `error(...)` page other paths return. Read it with `.get()` and treat a missing sender as an invalid installation request.
gettext applied to variable in error() prevents extraction of error strings — The literals passed by callers never sit inside a `_(...)` call, so makemessages cannot extract them and users get untranslated English in every locale. Wrap each literal in `_()` at the call sites and drop the `_(error_short)` re-wrap in `error()`.
Unwrapped get_user_info call raises unhandled exception on GitHub API failure — Any GitHub API failure makes `get_user_info` raise as a generic 500, so the postMessage failure handshake never fires — unlike the wrapped token exchange right above. Wrap the call in try/except and return `error(request, self.active_organization)` on exception.