Repository navigation
Skip approved archive scans before loading large ZIPs - #6638
Slai.life (huong8373tt-beep) wants to merge 3 commits into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
| bool m_status; | ||
| }; | ||
|
|
||
| struct SetScanArchiveCalled_Override |
There was a problem hiding this comment.
| struct SetScanArchiveCalled_Override | |
| struct SetScanArchiveCalled_Signal |
This is not an override, but a reporting mechanism.
There was a problem hiding this comment.
🔵 Needs a closer look
The native regression test was not built or run and mocks extraction, so Windows/x86 validation is still needed to confirm large-ZIP installation succeeds after bypassing the scan.
No open issues 🎉
What changed in this PR
Addresses #6632 by skipping local archive malware scanning before loading the ZIP when both the override flag and administrator setting permit it. This avoids the scan’s full-archive memory allocation while preserving normal scanning otherwise and leaving extraction and nested-installer validation unchanged.
Changes:
- Moves the approved override check ahead of
ScanZipFile(). - Adds regression coverage confirming the scanner is not called and the skip message is displayed.
- Updates the user-facing resource and adds a release note.
| File | Description |
|---|---|
src/AppInstallerCommonCore/Archive.cpp |
Adds a test hook to track scanner invocation. |
src/AppInstallerCLITests/TestHooks.h |
Adds a scoped wrapper for the invocation-tracking hook. |
src/AppInstallerCLITests/InstallFlow.cpp |
Verifies approved overrides skip scanning and notify users. |
src/AppInstallerCLIPackage/Shared/Strings/en-us/winget.resw |
Replaces the scan-failure override message with a scan-skipped message. |
src/AppInstallerCLICore/Workflows/ArchiveFlow.cpp |
Returns before scanning when the override is approved. |
src/AppInstallerCLICore/Resources.h |
Declares the replacement resource identifier. |
doc/release-notes/1.31/6632-local-archive-scan-override.md |
Documents reduced memory use for approved archive scan overrides. |
Review effort: Balanced
|
Applied the review suggestion in d9bc729: renamed |
| { | ||
| SetScanArchiveCalled_Signal() | ||
| { | ||
| AppInstaller::Archive::TestHook_SetScanArchiveCalled_Override(&m_status); |
There was a problem hiding this comment.
I was also expecting that these would have the name updated as well.
|
Addressed the maintainer naming request: the archive-called test hook is now consistently named |
📖 Description
Resolves #6632.
When a local manifest explicitly requests
--ignore-local-archive-malware-scanand the administrator setting permits that override, WinGet now skips the archive malware scan before loading the ZIP. This avoids the scan's full-archive memory allocation for approved large archive installs, including the x86 validation scenario described in the issue.The default scan path is unchanged when the override is absent or not permitted. The installer workflow still performs the normal archive extraction and nested-installer validation steps.
🔗 References
Resolves #6632
🔍 Validation
Archive::ScanZipFile()and reports the skip to the user.git diff --checkpassed.Merge-ReleaseNotes.ps1 -Version 1.31passed.✅ Checklist
🤖 AI Assistance
Slai Agent Runtime performed the investigation, implementation, and test execution. The account owner authorized this contribution and is responsible for its content.
📋 Issue Type
Microsoft Reviewers: Open in CodeFlow