GDATASoftwareAG / nextcloud-gdata-antivirus

This nextcloud app aims to provide an additional layer of security to your Nextcloud instance by enabling automatic and manual scanning of files for malicious content powered by G DATA Verdict-as-a-Service.
https://www.gdata.de/vaas-files/vaas-technical-onboarding.html
3 stars 0 forks source link

Files not scanned on update or change #147

Open kriegerse opened 1 month ago

kriegerse commented 1 month ago

Description

I recognized that files once scanned are not re-scanned on update or change by (remote) clients. This open a door to distribute corrupted files marked as clean and is not the expected behavior of end users.

Reproduce

  1. upload a clean file with nextcloud client to the server
  2. wait until initial scan happen and file is marked with the clean tag
  3. upload a file with eicar signature overwriting the file created before (e.g. from https://www.eicar.org/download/eicar_com-zip)
  4. wait a couple of hours (the updated file is not scanned anymore)

This can easily misused by replace files marked as clean before to distribute vulnerable files afterwards.

Expected behavior / Proposal

It might be related to https://github.com/GDATASoftwareAG/nextcloud-gdata-antivirus/issues/144 and can be addressed by an own managed database table keeping track of files processed as mentioned in https://github.com/GDATASoftwareAG/nextcloud-gdata-antivirus/issues/144#issuecomment-2402283944.

My idea would be to store the date scanned or checksum of an file id within that GData_VaaS_table (etag might be also a candidate).

The tags on the file are just informative to the end user to easily identify potential dangerously files. But should not be the source of truth about what to scan.

Versions

GermanCoding commented 1 month ago

Hi again, thanks for reporting!

FYI, we currently have kind of a "sick wave" with influenza and such being passed around. We therefore haven't had much time to look into this yet, but we will get to it when we can. We appreciate the reports!

pstadermann commented 3 weeks ago

We cannot reproduce this with the Web UI.

Which Nextcloud client are you using?

kriegerse commented 3 weeks ago

Sorry for the delayed response, was on a business trip past week.

My scenario is not about the file upload within the web UI what is working well but the remote client(s).

Specifically I running a Linux Box (Linux Mint 22 aka Ubuntu 24.04 LTS) with the nextcloud desktop client.

I assume other remote clients and OS behave similar.

From my point of view rely on tags here is not a good idea as they are not reset on file update (for good reasons).

lennartdohmann commented 6 days ago

Linked to #157