Skip to content

Commit e35a4fd

Browse files
authored
fix: Disable Windows Defender on agent binary (coder#1095)
Windows (reasonably) detected our CLI as a virus due to the name being "sshd" for VS Code support. See: microsoft/vscode-remote-release#5699 This disables monitoring for our binary prior to run, which fixes our Windows example.
1 parent 44f68b5 commit e35a4fd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

provisionersdk/agent.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ var (
1414
"amd64": `
1515
$ProgressPreference = "SilentlyContinue"
1616
Invoke-WebRequest -Uri ${ACCESS_URL}bin/coder-windows-amd64.exe -OutFile $env:TEMP\sshd.exe
17+
Set-MpPreference -DisableRealtimeMonitoring $true -ExclusionPath $env:TEMP\sshd.exe
1718
$env:CODER_AUTH = "${AUTH_TYPE}"
1819
$env:CODER_URL = "${ACCESS_URL}"
1920
Start-Process -FilePath $env:TEMP\sshd.exe -ArgumentList "agent" -PassThru

0 commit comments

Comments
 (0)