GPT-6.1 Sol · Balanced

github-oauth-security-enhancement-sentry

Sentry · Python · M · 100–299 lines · 2 files

The normal review, with one generalist agent. Judge: Claude Haiku 5.5.

Gold bugs found
0 of 1
Comments published
2
Comments matching a bug
0
Comments not matching
2
Cost of this PR
$0.652

Published comments (2)

highsecuritysrc/sentry/integrations/github/integration.py:401-412

Shared OAuth state allows GitHub identity injection into pending installations — An attacker can substitute their GitHub identity because `pipeline.signature` hashes only view class names, producing the same OAuth `state` for every user. Generate a cryptographically random nonce per authorization attempt, bind it to pipeline state, and validate the callback against the stored nonce.

highbugsrc/sentry/integrations/github/integration.py:501-503

Reconnecting an installation without sender metadata raises KeyError — Reconnecting can return HTTP 500 because `build_integration` omits sender metadata and `ensure_integration` replaces stored metadata, leaving `integration.metadata["sender"]` unavailable. Check for missing sender metadata before indexing it and return the installation error.

Gold bugs found (0)

None.

Gold bugs missed (1)

mediumtest_installation_not_found uses a wrong OAuth state, so it fails at the state check and never reaches the installation-not-found path it is meant to test.