How can i perform the scan for the files that comes as a request payload that if it is a potential virus or not? For ex. if some body saves a EICAR signature as a txt file and tries to upload it , i want to scan and reject it if in case it is a virus file.
I have checked clamscan but unable to understand what to specify in path here:-
const ClamScan = new NodeClam().init({
clamscan: {
path: '/usr/bin/clamscan', // Path to clamscan binary on your server
db: null, // Path to a custom virus definition database
scan_archives: true, // If true, scan archives (ex. zip, rar, tar, dmg, iso, etc...)
active: true // If true, this module will consider using the clamscan binary
}
});
Also i am uploading the files to amazon -s3 bucket which is integrated in object-store in SAP CLOUD PLATFORM.
The clamscan library available via NPM is a wrapper around the real clamscan program which is part of ClamAV.
You need to install ClamAV. That will include a program in a file named clamscan. You put the path to that program in that string.