1

I have a database for a chat app to which users can upload images. These images get scanned before they are made available to other users in a conversation. But when the antivirus gets an update, should I rescan images which have already been uploaded (or maybe only those that haven't been viewed by every member of the conversation yet), or just leave it be and only scan images that will be uploaded in the future with the updated antivirus?

Rescanning everything would be costly, and if the chances of an exploit in an image emerging and being used before the antivirus is updated are low, then does rescanning make sense? And if it does, which images do you advise me to rescan?

0
2

Just to pull some of the comments into an answer:

Firstly, this shouldn't be your responsibility, so if you decide to implement controls, choose something manageable.

  • A basic scan on upload may be straightforward, as long as you aren't getting overloaded with images. SO perhaps look at scanning unless your scan load or number of images uploaded per minutes goes over a threshold
  • A scan on access, as @schroeder commented, gives you the most up to date scan and you aren't wasting resources scanning images that may never be accessed.
  • A basic sanity check on uploaded files - are they valid image files

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.