From 87e8482ac10793168ba2a966de14cfee99923957 Mon Sep 17 00:00:00 2001 From: Arif Ali Date: Wed, 27 Sep 2023 16:28:24 +0100 Subject: [PATCH] [networking] obfuscate password in netplan resolves: #3365 Signed-off-by: Arif Ali --- sos/report/plugins/networking.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sos/report/plugins/networking.py b/sos/report/plugins/networking.py index 74626af489..79b3984502 100644 --- a/sos/report/plugins/networking.py +++ b/sos/report/plugins/networking.py @@ -299,5 +299,13 @@ def setup(self): self.add_cmd_output("/usr/sbin/traceroute -n %s" % self.trace_host, priority=100) + def postproc(self): + + self.do_path_regex_sub( + "/etc/netplan", + r"(\s+password:).*", + r"\1 ******" + ) + # vim: set et ts=4 sw=4 :