HodorNV / ALOps

ALOps
59 stars 24 forks source link

Operation did not complete successfully because the file contains a virus or potentially unwanted software #542

Closed marcelvos1 closed 2 years ago

marcelvos1 commented 2 years ago

Describe the bug From this morning we gat an error in the build pipelines: Operation did not complete successfully because the file contains a virus or potentially unwanted software. Yesterday all pipelines are running fine.

Thanks for help. Marcel

the output Also the complete output is necessary for us to see what is going on. Also use backtics:

2022-07-05T08:16:35.0702703Z ##[section]Starting: ALOPS - Wait for Docker Container to start
2022-07-05T08:16:35.1070748Z ==============================================================================
2022-07-05T08:16:35.1072097Z Task         : ALOps Docker Wait
2022-07-05T08:16:35.1073333Z Description  : Wait until the Business Central container is started
2022-07-05T08:16:35.1074468Z Version      : 1.450.3071
2022-07-05T08:16:35.1075258Z Author       : Hodor
2022-07-05T08:16:35.1079147Z Help         : Wait until the Business Central container is started.
2022-07-05T08:16:35.1080745Z ==============================================================================
2022-07-05T08:16:41.6540706Z *** Validate configuration
2022-07-05T08:16:43.3633539Z *** Task Inputs:
2022-07-05T08:16:43.3699222Z 
2022-07-05T08:16:43.4375748Z name                 value                 
2022-07-05T08:16:43.4389814Z ----                 -----                 
2022-07-05T08:16:43.4397085Z fixed_tag                                  
2022-07-05T08:16:43.4404435Z search_string        Ready for connections!
2022-07-05T08:16:43.4410968Z warning_string                             
2022-07-05T08:16:43.4417016Z error_string                               
2022-07-05T08:16:43.4423298Z setup_working_folder True                  
2022-07-05T08:16:43.4429620Z usecompression       True                  
2022-07-05T08:16:43.4435946Z printlogs            True                  
2022-07-05T08:16:43.4452098Z 
2022-07-05T08:16:43.4515578Z 
2022-07-05T08:16:43.4775243Z 
2022-07-05T08:16:43.5878771Z *** For documentation, please visit   : https://www.alops.be/documentation
2022-07-05T08:16:43.6233688Z 
2022-07-05T08:16:43.9617086Z *** ALOps License:
2022-07-05T08:16:43.9770485Z   * Licensed To: Mprise BV (Project License)
2022-07-05T08:16:43.9792255Z 
2022-07-05T08:16:44.1144222Z *** Importing required PS-Functions
2022-07-05T08:16:47.7893388Z ##[error]Operation did not complete successfully because the file contains a virus or potentially unwanted software.

Screenshots

image

image

image

waldo1001 commented 2 years ago

Hi,

There are several posts that handle these issues with PowerShell scripts in combination with Windows Defender or any Anti Virus software. By the way, these are quite common, unfortunately (here's an example of another case: https://evotec.xyz/import-module-this-script-contains-malicious-content-and-has-been-blocked-by-your-antivirus-software/)

First of all: it's not recommended to enable Anti-Virus on a Server for a build-agent. But, to not make your build-server a security hazard, it's a good practice to NOT put a it into your domain. We have it completely isolated.

A few pointers what you can do:

Hope that helps!

marcelvos1 commented 2 years ago

Hi @waldo1001 ,

Thanks. Folow steps below and it's working now.

Go to Start > Settings > Update & Security > Windows Security > Virus & threat protection. Under Virus & threat protection settings, select Manage settings, and then under Exclusions, select Add or remove exclusions. Select Add an exclusion, and then select from files, folders, file types, or process.

Marcel