Skip to content

fix: hide HTTP scrape error details#2332

Open
zeitlinger wants to merge 2 commits into
mainfrom
agent/hide-http-error-details
Open

fix: hide HTTP scrape error details#2332
zeitlinger wants to merge 2 commits into
mainfrom
agent/hide-http-error-details

Conversation

@zeitlinger

Copy link
Copy Markdown
Member

Summary

  • return a generic HTTP 500 body instead of exposing exception details
  • log the original exception server-side
  • verify the response does not contain the exception type or message

This is the focused replacement for the #2283 portion of #2297.

Fixes #2283

Ongoing discussion

A persistent scrape failure currently produces one SEVERE log entry per scrape. We still need to decide whether identical failures should be rate-limited or deduplicated, and how to retain visibility into distinct failures. See the earlier discussion.

Validation

  • mise run lint:fix
  • mise run build
  • ./mvnw test -pl prometheus-metrics-exporter-httpserver -Dcoverage.skip=true -Dcheckstyle.skip=true

Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@zeitlinger
zeitlinger marked this pull request as ready for review July 23, 2026 12:28
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.

Security Report: Full Stack Trace Disclosure in HTTP Error Responses

1 participant