Skip to content

Commit fd02758

Browse files
committed
addressed older bugbot concerns and reverted templating to standard
1 parent 75cb524 commit fd02758

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

pkg-new/preflights/host-preflight.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -227,15 +227,14 @@ spec:
227227
- -c
228228
- |
229229
pat='(clamav|sophos|esets_daemon|fsav|symantec|mfend|ds_agent|kav|bdagent|s1agent|falcon|illumio|xagt|wdavdaemon|mdatp)'
230-
231230
if command -v pgrep >/dev/null 2>&1; then
232-
pgrep -afi "$pat"
231+
pgrep -fli "$pat" | awk '{ $1=""; sub(/^ /,""); print }'
233232
else
234-
ps -eo args=
233+
# Fallback: list only command names (not full args)
234+
ps -eo comm=
235235
fi \
236236
| awk -v pat="$pat" '
237237
BEGIN { IGNORECASE=1 }
238-
/(awk|grep|pgrep|ps|sh -c)/ { next }
239238
{
240239
line=$0
241240
while (match(line, pat)) {
@@ -1362,7 +1361,7 @@ spec:
13621361
collectorName: security-tools-packages
13631362
outcomes:
13641363
- warn:
1365-
when: "IsInstalled"
1364+
when: '{{ "{{" }} .IsInstalled {{ "}}" }}'
13661365
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.
13671366
- pass:
13681367
message: Package {{ "{{" }} .Name {{ "}}" }} is not installed

0 commit comments

Comments
 (0)