This is a REST-API that scans files with ClamAV and determines the MIME-Type of the file in the first place.
In order to scan a file with the clamavd daemon this app uses solita/clamav-client.
In case of application/zip it checks if this could be a zip-bomb too, since this ist not being detected as virus by ClamAV.
If it is configured like this, in all cases - unauthorized clients, virus other vulterable threads - a message is send both to a Telegram chat and a mail account.
Authorized client applications are allowed to use it. The clients are checked by their clientId (server to server).
There shoud be a clamav installation at the server as for instance mko-x/docker-clamav.
The ClamAVService provides 2 methods:
-
checkAlive: returns true when the VirusScanner can be reached. This method can be used for HealthChecks.
-
scanFile: performs a virus check of a ScanRequestPayload
In order do setup development, please read about the requirements rearding the infrastructure.