Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Packing with 2.7.79-pre fails because Windows Defender detects a threat #32

Closed
RyusukeFujita opened this issue Jan 20, 2022 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@RyusukeFujita
Copy link

2.7.79-pre fails to pack due to Windows Defender detecting a threat:

* Here, "EventViewer" is just an app's name.

PS C:\Users\Admin\Desktop\EventViewer> C:\Users\Admin\.nuget\packages\clowd.squirrel\2.7.79-pre\tools\Squirrel.exe pack --packName EventViewer --packVersion 0.11.11 --packAuthors 'me' --packDirectory .\EventViewer\bin\Release\net6.0-windows\

... snipped...

[INFO] EasyZip: Compressing 'C:\Users\Admin\AppData\Local\SquirrelClowdTemp\tempc' to 'C:\Users\Admin\Desktop\EventViewer\Releases\EventViewer-0.11.11-full.nupkg'...
[WARN] EasyZip: Unable to create archive with 7z.exe
7-Zip 19.00 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21

Open archive: C:\Users\Admin\Desktop\EventViewer\Releases\EventViewer-0.11.11-full.nupkg
--
Path = C:\Users\Admin\Desktop\EventViewer\Releases\EventViewer-0.11.11-full.nupkg
Type = zip
Physical Size = 12955594

Scanning the drive:
25 folders, 899 files, 33066695 bytes (32 MiB)

Updating archive: C:\Users\Admin\Desktop\EventViewer\Releases\EventViewer-0.11.11-full.nupkg

Keep old data in archive: 9 files, 5553 bytes (6 KiB)
Add new data to archive: 25 folders, 899 files, 33066695 bytes (32 MiB)


Files read from disk: 899
Archive size: 12956222 bytes (13 MiB)

WARNINGS for files:

lib\native\EventViewer_ExecutionStub.exe : Operation did not complete successfully because the file contains a virus or potentially unwanted software.
----------------
WARNING: Cannot open 1 file


WARNING: Operation did not complete successfully because the file contains a virus or potentially unwanted software.
lib\native\EventViewer_ExecutionStub.exe


[ERRO] System.IO.IOException: Operation did not complete successfully because the file contains a virus or potentially unwanted software. : 'C:\Users\Admin\AppData\Local\SquirrelClowdTemp\tempc\lib\native\EventViewer_ExecutionStub.exe'
   at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String , FileMode , FileAccess , FileShare , FileOptions )
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String , FileMode , FileAccess , FileShare , FileOptions , Int64 )
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String , FileMode , FileAccess , FileShare , FileOptions , Int64 )
   at SharpCompress.Archives.IWritableArchiveExtensions.AddAllFromDirectory(IWritableArchive writableArchive, String filePath, String searchPattern, SearchOption searchOption)
   at Squirrel.EasyZip.CreateZipFromDirectory(String outputFile, String directoryToCompress) in ./Internal/EasyZip.cs:line 40
   at Squirrel.ReleasePackage.CreateReleasePackage(String outputFile, Func`2 releaseNotesProcessor, Action`2 contentsPostProcessHook) in ./Internal/ReleasePackage.cs:line 126
   at SquirrelCli.Program.Releasify(ReleasifyOptions options) in ./Program.cs:line 194
   at SquirrelCli.Program.Pack(PackOptions options) in ./Program.cs:line 124
   at SquirrelCli.CommandAction`1.Execute(IEnumerable`1 args) in ./ValidatedOptionSet.cs:line 160
   at SquirrelCli.CommandSet.Execute(String[] args) in ./ValidatedOptionSet.cs:line 194
   at SquirrelCli.Program.Main(String[] args) in ./Program.cs:line 77

When the issue occurs, Windows Defender shows the following:

WinDefender01

This is 100 % reproducible with 2.7.79-pre.
However, when I use Squirrel.exe of 2.7.34-pre on the same machine for the same app, the issue does not occur.

@RyusukeFujita RyusukeFujita changed the title Packing with 2.7.79-pre fails because Windows Defender detects Packing with 2.7.79-pre fails because Windows Defender detects a threat Jan 20, 2022
@remco1271
Copy link

See issue #28 for more information

@caesay caesay closed this as completed Jan 20, 2022
@caesay caesay added the duplicate This issue or pull request already exists label Jan 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants