fix(security): stop serving /metrics to the public internet - #109
Merged
Merged
Conversation
The Caddy edge proxied every path to the gateway, including /metrics, so Prometheus output was reachable at https://<domain>/metrics. It disclosed the build version, process uptime and request/error counts. Low severity - no credentials or user data - but version disclosure helps an attacker target known CVEs, and the endpoint exists for in-network scraping by the monitoring profile, not for public consumption. Returns 404 rather than 403 so its existence is not confirmed. Found by probing the live deployment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/metricswas publicly reachable on the live API because the Caddy edge proxied every path to the gateway.It disclosed build version, process uptime, and request/error counts — no credentials or user data, so low severity, but version disclosure helps an attacker target known CVEs and there's no reason to publish traffic volumes.
Returns 404 rather than 403 so the endpoint's existence isn't confirmed. The monitoring profile scrapes over the internal Docker network and is unaffected.
Found by probing the live deployment after deploy.