Contoso's partner ingestion service writes large files to a Blob Storage account that has Defender for Storage malware scanning enabled for on-upload scanning. For each file, the service sends several PutBlock requests to stage the data and then sends one PutBlockList request to commit the blob. A downstream AI pipeline waits for the Malware scanning scan result tag before it processes a file.
At which point does Defender for Storage start the malware scan for a file?
On-upload malware scanning starts when a blob is created, overwritten or renamed. When a file is staged through block uploads, the individual PutBlock calls do not start a scan; the scan begins when PutBlockList commits the blob. Defender then writes the scan result tags that the AI pipeline checks before processing the file.
- Correct: When the PutBlockList request commits the blob. The source identifies the final commit as the scanning trigger for staged uploads. In this workflow, PutBlockList performs that commit.
- Not correct: When the downstream AI pipeline first reads the blob. Scanning is triggered when a blob is created, overwritten or renamed, not when it is read; the pipeline reads the result tag that the scan writes.
- Not correct: After each individual PutBlock request completes. Each PutBlock only stages part of the data and does not trigger a scan independently, so no scan runs per block.
- Not correct: When a scheduled on-demand scan of the container runs. On-demand scanning inspects stored blobs through a separately initiated scan. The configured on-upload scan is triggered by committing the upload.