Official Cisco-Talos/clamav docker image with a REST API enhancement for file scanning. ClamAV is contained.
API Endpoints:
# Scan File for virus:
# returns 200 on success, 400 Bad Request if file not readable and 422 Unprocessable Entity if the file contains a virus
POST http://<<your-address>>:33779/scan-document
Example Request (use testfiles -> Testfiles):
curl -X POST http://127.0.0.1:33779/scan-document -F "file=@/path/to/your/file.zip" -vCustom ENV configuration options: ("CLAMAVREST" is the application prefix)
| Key | Default-Value | Description |
|---|---|---|
CLAMAV_REST_CLAMAV_EXECUTION_PATH |
clamdscan |
Path to clamscan execution binary |
CLAMAV_REST_REST_SCANFILE_FORM_KEY |
file |
HTTP form-file key where the file lives inside your HTTP request |
Beside that options you can pass all other clamav configuration options
If you want to contribute an SDK in your prefered language, it's simple to implement and after you're done, let us know and we'll add you to the list
Do not rely on the rest api for health check purposes because it starts async from claimav. claimav itsself always takes longer
Use this official clamav healthcheck instead
Build a docker image:
docker build -t clamav-wrapper --platform=linux/amd64 .Run docker image:
docker run --name clamav-wrapper --rm -p 33779:33779 clamav-wrapper:latestThis application is still in beta and developed in one day, if you find errors, please report them!