aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJose Castillo <jcastillo@redhat.com>2023-12-11 18:00:36 +0000
committerJake Hunsaker <jacob.r.hunsaker@gmail.com>2024-01-20 13:56:50 -0500
commitd959f78c15f32be08d7ab9d6c15ab76c5e0da0c4 (patch)
treec9aaf6844cacbf0ef82c51e7e5fa7241f5a546ac
parentcc67636dc58e568d3381c4ca2b596e268f077ffd (diff)
downloadsos-d959f78c15f32be08d7ab9d6c15ab76c5e0da0c4.tar.gz
[targetcli] Don't collect passwords from iscsi configs
Add passwords stored in /sys/kernel/config/target/ to the list of forbidden paths. Related: RH RHEL-19056 Signed-off-by: Jose Castillo <jcastillo@redhat.com>
-rw-r--r--sos/report/plugins/targetcli.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/sos/report/plugins/targetcli.py b/sos/report/plugins/targetcli.py
index 2546f2e0..d3646063 100644
--- a/sos/report/plugins/targetcli.py
+++ b/sos/report/plugins/targetcli.py
@@ -23,9 +23,13 @@ class TargetCli(Plugin, IndependentPlugin):
"targetcli ls",
"targetcli status",
])
+ sys_conf_dir = '/sys/kernel/config/target'
+ self.add_forbidden_path([
+ self.path_join(sys_conf_dir, '**/password*'),
+ ])
self.add_service_status("target")
self.add_journal(units="targetcli")
- self.add_copy_spec("/sys/kernel/config/target")
+ self.add_copy_spec(sys_conf_dir)
self.add_copy_spec("/etc/target")
# vim: set et ts=4 sw=4 :