libp2p/hydra-booster

Security: metrics publicly exposed by default

dokterbob opened this issue · 2 comments

By default, the Prometheus metrics and pprof HTTP server are listening on 0.0.0.0, which is likely to cause information leaks and/or might expose attack vectors.

As this daemon is to be run on public addresses by default, and uses randomly picked ports for the heads, this default of publicly exposing non-essential services seems a bad design from a security point of view.

In addition, it is inconsistent with the other listeners which default to 127.0.0.1 (as they should).

🙏 would you be up for submitting a PR to fix?

While I'm at it, I'll also change the port to something less common than 8888, to prevent conflicts.