diff options
| author | Mia Herkt <mia@0x0.st> | 2022-12-12 07:25:30 +0100 |
|---|---|---|
| committer | Mia Herkt <mia@0x0.st> | 2022-12-12 07:35:05 +0100 |
| commit | a904922cbd6f6478d5e7fd773adc368b7652adaa (patch) | |
| tree | db217d71cd2806a11cc7351dde4641ed2dea7313 /instance/config.example.py | |
| parent | da30c8f8ff0e2f23a974d95923273a25bc3a2a23 (diff) | |
Add support for ClamAV
Diffstat (limited to 'instance/config.example.py')
| -rw-r--r-- | instance/config.example.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/instance/config.example.py b/instance/config.example.py index 2315b75..5674eea 100644 --- a/instance/config.example.py +++ b/instance/config.example.py @@ -168,6 +168,37 @@ NSFW_DETECT = False NSFW_THRESHOLD = 0.608 +# If you want to scan files for viruses using ClamAV, specify the socket used +# for connections here. You will need the clamd module. +# Since this can take a very long time on larger files, it is not done +# immediately but every time you run the vscan command. It is recommended to +# configure a systemd timer or cronjob to do this periodically. +# Remember to adjust your size limits in clamd.conf! +# +# Example: +# from clamd import ClamdUnixSocket +# VSCAN_SOCKET = ClamdUnixSocket("/run/clamav/clamd-socket") + +# This is the directory that files flagged as malicious are moved to. +# Relative paths are resolved relative to the working directory +# of the 0x0 process. +VSCAN_QUARANTINE_PATH = "quarantine" + +# Since updated virus definitions might catch some files that were previously +# reported as clean, you may want to rescan old files periodically. +# Set this to a datetime.timedelta to specify the frequency, or None to +# disable rescanning. +from datetime import timedelta +VSCAN_INTERVAL = timedelta(days=7) + +# Some files flagged by ClamAV are usually not malicious, especially if the +# DetectPUA option is enabled in clamd.conf. This is a list of signatures +# that will be ignored. +VSCAN_IGNORE = [ + "Eicar-Test-Signature", + "PUA.Win.Packer.XmMusicFile", +] + # A list of all characters which can appear in a URL # # If this list is too short, then URLs can very quickly become long. |
