Malware scanning not being triggered when uploading from the web app

Kamal Sivalingam 21 Reputation points
2023-06-06T20:48:09.92+00:00

We have enabled Malware scanning for uploaded files on storage accounts.

Uploading a file on Azure File Explorer seems to trigger malware scanning and the results are being set as blob index tags on file properties.

However uploading the file using our web app (on app service) does not seem to trigger the malware scanning even after hours.

Are we missing any configuration or settings?

Thanks

Azure Storage
Azure Storage
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,529 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,192 questions
Microsoft Security | Microsoft Defender | Microsoft Defender for Cloud
{count} votes

2 answers

Sort by: Most helpful
  1. Sedat SALMAN 14,180 Reputation points MVP
    2023-06-07T04:46:30.1166667+00:00

    I have three ref documents for you

    https://learn.microsoft.com/en-us/azure/defender-for-cloud/defender-for-storage-malware-scan

    https://stackoverflow.com/questions/60836786/scanning-for-malware-in-files-uploaded-to-azure

    https://stackoverflow.com/questions/63966945/virus-scanning-on-uploaded-file-to-azure-block-storage-via-azure-web-app-as-of-2

    Microsoft Defender for Cloud's Malware Scanning feature performs scans when a blob is uploaded to a protected storage account. The scan is triggered regardless of the upload method, which means that modifying a blob (an upload operation) causes the modified content to be scanned after the update​

    If the scan is still not being triggered even after waiting for a considerable amount of time, it could be due to the configuration of your web app or the storage account. Malware Scanning depends on certain resources, identities, and networking settings to function properly. If you modify or delete any of these, Malware Scanning will stop working​

    As an alternative, you could consider implementing a custom solution using open source tools to scan each blob uploaded and download blobs only from a "clean" container​

    I couldn't find any additional specific configuration or settings you might be missing. If the problem persists, I would recommend reaching out to Azure Support for further assistance.

    0 comments No comments

  2. Pavel Pochobut 0 Reputation points
    2023-10-20T16:27:12.42+00:00

    For us it was AppendBlob unsupported scenario - see https://learn.microsoft.com/en-us/azure/defender-for-cloud/defender-for-storage-malware-scan#limitations

    Content-MD5 seems to be unrelated.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.