- 
                Notifications
    You must be signed in to change notification settings 
- Fork 8
Add complimentary preflight for Security Tools detection #3015
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 3 commits
c87e469
              75cb524
              fd02758
              c06a4a2
              140c365
              02b7722
              c81ee1c
              File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
|  | @@ -220,6 +220,40 @@ spec: | |
| if [ ! "$bin_dir_type_label" = "bin_t" ]; then | ||
| echo "bin_dir_type_label $bin_dir_type_label" | ||
| fi | ||
| - run: | ||
| collectorName: "ps-detect-antivirus-and-security-tools" | ||
| command: "sh" | ||
| args: | ||
| - -c | ||
| - | | ||
| pat='(clamav|sophos|esets_daemon|fsav|symantec|mfend|ds_agent|kav|bdagent|s1agent|falcon|illumio|xagt|wdavdaemon|mdatp)' | ||
| if command -v pgrep >/dev/null 2>&1; then | ||
| pgrep -fli "$pat" | awk '{ $1=""; sub(/^ /,""); print }' | ||
| else | ||
| # Fallback: list only command names (not full args) | ||
| ps -eo comm= | ||
| fi \ | ||
| | awk -v pat="$pat" ' | ||
| BEGIN { IGNORECASE=1 } | ||
| { | ||
| line=$0 | ||
| while (match(line, pat)) { | ||
| print tolower(substr(line, RSTART, RLENGTH)) | ||
| line=substr(line, RSTART+RLENGTH) | ||
| } | ||
| } | ||
| ' \ | ||
| | sort -u | ||
| - systemPackages: | ||
| collectorName: security-tools-packages | ||
| ubuntu: | ||
| - sdcss-kmod | ||
| - sdcss | ||
| - sdcss-scripts | ||
| rhel: | ||
| - sdcss-kmod | ||
| - sdcss | ||
| - sdcss-scripts | ||
| analyzers: | ||
| - cpu: | ||
| checkName: CPU | ||
|  | @@ -1307,3 +1341,27 @@ spec: | |
| The selinux type context label for the embedded cluster binary directory are incorrect. Try running: sudo semanage fcontext -a -t bin_t "{{ .DataDir }}/bin(/.*)?" && sudo restorecon -RvF {{ .DataDir }} | ||
| - pass: | ||
| when: "false" | ||
| - textAnalyze: | ||
| checkName: "Detect Threat Management and Network Security Tools" | ||
| fileName: host-collectors/run-host/ps-detect-antivirus-and-security-tools.txt | ||
| regexGroups: '(?ms)(?P<Detected>.*)' | ||
| ignoreIfNoFiles: true | ||
| outcomes: | ||
| - pass: | ||
| when: "Detected == ''" | ||
| message: "No antivirus or network security tools detected." | ||
| - warn: | ||
| message: |- | ||
| The following antivirus or network security tools were detected: | ||
| {{ "{{" }} .Detected {{ "}}" }} | ||
|  | ||
| These types of tools have been known to interfere with Kubernetes operation in various ways. If you experience an installation problem, you may need to disable these tools temporarily as part of the troubleshooting process to identify if any system administrator exceptions may be required to maintain necessary internal Kubernetes operations. | ||
|          | ||
| - systemPackages: | ||
|          | ||
| checkName: "Detected Security Packages" | ||
| collectorName: security-tools-packages | ||
| outcomes: | ||
| - warn: | ||
| when: '{{ "{{" }} .IsInstalled {{ "}}" }}' | ||
|         
                  cursor[bot] marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| message: Package {{ "{{" }} .Name {{ "}}" }} is installed. This tool can interfere with kubernetes operation. Ensure the tool is either disabled or configured to not interfere with kubernetes operation. | ||
|         
                  cursor[bot] marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved          | ||
| - pass: | ||
| message: Package {{ "{{" }} .Name {{ "}}" }} is not installed | ||
Uh oh!
There was an error while loading. Please reload this page.