From cc99fe38205b01e3b194d37a92fc965e3b7bd53b Mon Sep 17 00:00:00 2001 From: andryyy Date: Sat, 14 Dec 2019 14:59:31 +0100 Subject: [PATCH] [ClamAV] Whitelist js in pdf - too many fp --- data/Dockerfiles/clamd/clamd.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/data/Dockerfiles/clamd/clamd.sh b/data/Dockerfiles/clamd/clamd.sh index 348ec2d5..42c7099d 100755 --- a/data/Dockerfiles/clamd/clamd.sh +++ b/data/Dockerfiles/clamd/clamd.sh @@ -18,9 +18,14 @@ if [[ -s /etc/clamav/whitelist.ign2 ]]; then echo "Copying non-empty whitelist.ign2 to /var/lib/clamav/whitelist.ign2" cp /etc/clamav/whitelist.ign2 /var/lib/clamav/whitelist.ign2 fi + if [[ ! -f /var/lib/clamav/whitelist.ign2 ]]; then echo "Creating /var/lib/clamav/whitelist.ign2" - echo "Example-Signature.Ignore-1" > /var/lib/clamav/whitelist.ign2 + cat < /var/lib/clamav/whitelist.ign2 +# Please restart ClamAV after changing signatures +Example-Signature.Ignore-1 +PUA.Pdf.Trojan.EmbeddedJavaScript-1 +EOF fi chown clamav:clamav -R /var/lib/clamav /run/clamav @@ -29,11 +34,8 @@ chmod 755 /var/lib/clamav chmod 644 -R /var/lib/clamav/* chmod 750 /run/clamav -echo "Stating whitelist.ign2" stat /var/lib/clamav/whitelist.ign2 - dos2unix /var/lib/clamav/whitelist.ign2 - sed -i '/^\s*$/d' /var/lib/clamav/whitelist.ign2 BACKGROUND_TASKS=()