From 16d4619e70116ed6b3f2d1443c5ced9bf2d7afe0 Mon Sep 17 00:00:00 2001 From: Kasem Alem Date: Wed, 11 Dec 2024 18:07:42 +0200 Subject: [PATCH] fix(STONEINTG-1074): set the option max file size to 2000M as in doc Signed-off-by: Kasem Alem --- task/clamav-scan/0.2/README.md | 7 +++++++ task/clamav-scan/0.2/clamav-scan.yaml | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/task/clamav-scan/0.2/README.md b/task/clamav-scan/0.2/README.md index d7dbaf67e3..22a550bfe2 100644 --- a/task/clamav-scan/0.2/README.md +++ b/task/clamav-scan/0.2/README.md @@ -10,6 +10,13 @@ The logs will provide both the version of ClamAV and the version of the database On this version the sidecard is removed from the task and required tools (jq, oc ..) were added to the Clamav BD container image this should fix the problem of timing out when task is scanning the database and improve the performance. +## --max-filesize: +Is set to the same value as the default value according to the ClamAV official Documentation. + +https://wiki.debian.org/ClamAV + +https://docs.clamav.net/manual/Development/tips-and-tricks.html?highlight=max-filesize#general-debugging + ## Params: | name | description | default | diff --git a/task/clamav-scan/0.2/clamav-scan.yaml b/task/clamav-scan/0.2/clamav-scan.yaml index d47dd33dcf..b984f94968 100644 --- a/task/clamav-scan/0.2/clamav-scan.yaml +++ b/task/clamav-scan/0.2/clamav-scan.yaml @@ -100,7 +100,7 @@ spec: db_version=$(clamscan --version | sed 's|.*/\(.*\)/.*|\1|') echo "Scanning image for arch $arch. This operation may take a while." - clamscan $destination -ri --max-scansize=4095M --max-filesize=4095M \ + clamscan "${destination}" -ri --max-scansize=4095M --max-filesize=2000M \ --max-scantime=0 --max-files=0 --max-recursion=1000 --max-dir-recursion=20000 --max-embeddedpe=4095M \ --max-htmlnormalize=10M --max-htmlnotags=4095M --max-scriptnormalize=5M --max-ziptypercg=4095M \ --max-partitions=50000 --max-iconspe=100000 --max-rechwp3=20000 --pcre-match-limit=100000000 --pcre-recmatch-limit=2000000 \