DanRuta / webassembly-workflow

A WebAssembly shell project, set up with task runners, testing and CI+test coverage for both JS and C++
38 stars 11 forks source link

npm run build -> Trojan:Win32/Fuery.B!cl #3

Open NielsSkovgaard opened 6 years ago

NielsSkovgaard commented 6 years ago

When running "npm run build": "build": "rm -rf build && mkdir build && cd build && cmake -G\"MSYS Makefiles\" .. && npm install"

The cmake command generates a.exe. However, it's immediately removed by Windows Defender, which detects it as Trojan:Win32/Fuery.B!cl, and then "npm run build" fails of course.

I was doing some Googling around and you might need to add signing to prevent it from being detected as a false positive in Windows Defender.

BTW, I'm not able to turn off or add exceptions to Windows Developer because the security policies are controlled by the Windows domain admins.

applicationframehost_2018-06-25_05-48-58

NielsSkovgaard commented 6 years ago

Link: https://www.microsoft.com/en-us/wdsi/threats/malware-encyclopedia-description?name=Trojan%3aWin32%2fFuery.B!cl&threatid=2147718514

DanRuta commented 6 years ago

Hmm, that's strange, I've not encountered that before.

I've had a look at how to sign it, and it seems a certificate must be purchased. However, I imagine the .exe file in question is only used by CMake to use GoogleTest to run the C++ unit tests, as the actual WebAssembly code does not get compiled to an .exe at any point.

I've not had any issues with Windows Defender at any point with any WebAssembly projects, so I am wondering if there are any extra stringent rules in place in your system? From some quick googling, it seems other people have encountered this exact issues in their C++ projects, following a Windows update. Though, usually people seem to resolve it through exclusion rules, unfortunately.

FWIW, you could still develop the project, by running npm install instead of npm run build and npm run js-tests instead of npm test, bypassing the C++ unit testing altogether, at least on this machine. In a worst case scenario, the CI will still run any C++ tests, as it uses a Linux environment by default.

Are you running the latest versions of Windows, CMake and MinGW?