Skip to content

Handle GitHub token revocation timeouts#116

Draft
cursor[bot] wants to merge 3 commits into
mainfrom
cursor/sentry-error-investigation-d6dd
Draft

Handle GitHub token revocation timeouts#116
cursor[bot] wants to merge 3 commits into
mainfrom
cursor/sentry-error-investigation-d6dd

Conversation

@cursor

@cursor cursor Bot commented May 21, 2026

Copy link
Copy Markdown

Summary

  • Add explicit timeouts to outbound GitHub/Sentry HTTP requests.
  • Treat GitHub installation token revocation as best-effort cleanup so a timeout deleting an already-used token does not fail the webhook.
  • Add unit coverage for the token revocation ConnectTimeout path.

Sentry

  • Addresses SENTRY-GITHUB-ACTIONS-APP-6V: ConnectTimeout for api.github.com/installation/token.

Validation

  • python3 -m pytest tests/test_github_app.py tests/test_github_sdk.py tests/test_sentry_config_file.py
  • python3 -m pytest
Open in Web View Automation 

Co-authored-by: Armen Zambrano G. <armenzg@users.noreply.github.com>
Comment thread src/github_sdk.py
headers = {"Authorization": f"token {self.token}"}

req = requests.get(url, headers=headers)
req = requests.get(url, headers=headers, timeout=HTTP_TIMEOUT)
Comment thread src/sentry_config.py Fixed
armenzg and others added 2 commits May 21, 2026 06:53
…uest forgery'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…uest forgery'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@armenzg armenzg self-requested a review May 21, 2026 10:54
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.

3 participants