Skip to content

Commit

Permalink
fix: add additional details in log and capture message
Browse files Browse the repository at this point in the history
  • Loading branch information
mdtro committed Sep 23, 2024
1 parent 01fffb9 commit 416ebcd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/sentry/integrations/github_enterprise/webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,12 @@ def handle(self, request: HttpRequest) -> HttpResponse:
else:
# the host is allowed to skip signature verification
# log it, and continue on.
extra["github_enterprise_version"] = request.headers.get(
"x-github-enterprise-version"
)
extra["ip_address"] = request.headers.get("x-real-ip")
logger.info("github_enterprise.webhook.allowed-missing-signature", extra=extra)
sentry_sdk.capture_message("Allowed missing signature")

except (MalformedSignatureError, IndexError) as e:
logger.warning("github_enterprise.webhook.malformed-signature", extra=extra)
Expand Down

0 comments on commit 416ebcd

Please sign in to comment.