Skip to content

PM-5759: Fix pending submission malware status - #7246

Merged
jmgasper merged 1 commit into
developfrom
PM-5759
Jul 31, 2026
Merged

PM-5759: Fix pending submission malware status#7246
jmgasper merged 1 commit into
developfrom
PM-5759

Conversation

@jmgasper

Copy link
Copy Markdown
Collaborator

What was broken

Newly uploaded design submissions could show Malware found in submission while antivirus scanning was still pending. Most warnings disappeared after the clean scan completed, while delayed or failed scans could retain the false label.

Root cause

The review API initializes every new file submission with virusScan: false and a DMZ URL. The community app checked the boolean first and treated it as confirmed malware before recognizing the DMZ URL as an in-progress scan.

What was changed

The download-safety helper now gives known bucket locations precedence:

  • Quarantine submissions remain classified as malware.
  • DMZ submissions display AV Scan in progress, even while virusScan is false.
  • Existing non-DMZ failed-scan and unknown-state fallbacks remain unchanged.

The helper documentation was updated to describe the bucket precedence.

Any added/updated tests

Added five safeForDownload unit cases covering DMZ pending, quarantine malware, the legacy failed-scan fallback, an unknown scan result, and a clean scan.

Validation completed successfully:

  • npm run jest -- __tests__/shared/utils/tc.js — 6 tests passed.
  • npm test — 150 suites passed, 318 tests passed, 23 tests skipped.
  • npm run lint — passed.
  • npm run build — passed.

What was broken

Newly uploaded design submissions were shown as "Malware found in submission" while antivirus scanning was still pending.

Root cause

The download safety helper treated virusScan: false as confirmed malware before checking that the file was still in the DMZ. The review API initializes new file submissions with that value, so pending scans displayed a false malware status until a clean scan completed.

What was changed

Prioritized quarantine and DMZ bucket locations before the legacy virusScan fallback. DMZ submissions now display "AV Scan in progress", while quarantine and non-DMZ failed scan behavior remains unchanged. Updated the helper documentation to describe the precedence.

Any added/updated tests

Added five safeForDownload unit cases covering DMZ pending, quarantine malware, the legacy failed-scan fallback, an unknown scan result, and a clean scan.
@jmgasper
jmgasper requested a review from kkartunov as a code owner July 30, 2026 10:53
@jmgasper
jmgasper merged commit 6445ee6 into develop Jul 31, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant