Skip to content

Commit

Permalink
[ansible] Skip collecting redundant dirs and files from /etc/ansible
Browse files Browse the repository at this point in the history
Forbid collecting some files and dirs from /etc/ansible that are not
interesting for any investigation but might potentially collect
sensitive data.

Resolves: sosreport#3423

Signed-off-by: Pavel Moravec <[email protected]>
  • Loading branch information
pmoravec committed Nov 27, 2023
1 parent 2e6ca7b commit 27b0828
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sos/report/plugins/ansible.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ def setup(self):
"ansible --version"
])

# let rhui plugin collects the RHUI specific files
self.add_forbidden_path("/etc/ansible/facts.d/rhui_*.fact")
# don't generic & collect potentially sensitive files and dirs
self.add_forbidden_path([
"/etc/ansible/facts.d/",
"/etc/ansible/roles/",
"/etc/ansible/hosts",
])

# vim: set et ts=4 sw=4 :

0 comments on commit 27b0828

Please sign in to comment.