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 Aug 15, 2024
1 parent 3aa9054 commit f031439
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 f031439

Please sign in to comment.