Hello Bartosz Suchorowski,
Welcome to Microsoft Q&A Forum, thank you for posting your query here!
As of today, Defender for Storage’s malware scanner indeed only scans files upon upload in Azure Blob Storage. It ensures that any content uploaded to your storage accounts is thoroughly inspected for malicious elements before being stored. This proactive approach helps maintain the security and integrity of your data.
I understand that you would like to scan the files that are across other storage accounts as well, for your specific scenario I would suggest you try with a script that iterates through all existing blobs in your storage accounts.
- For each blob, check if it has the desired attribute/tag (e.g., “scanned”).
- If not, add the attribute/tag to the blob’s metadata.
- This script can be run periodically to ensure consistency.
Alternatively, you can perform this operation across multiple storage accounts, consider using Azure Data Factory.
o Create a pipeline that iterates through all blobs and updates their metadata.
o This approach provides scalability and centralized management.
Hope this answer helps! Please let us know if you have any further queries. I’m happy to assist you further.