Jump to content

Frustrating false positives with Golang development


Recommended Posts

Hi there,

As of a few days ago, any Golang development I do on my Windows 10 machine, produces false positives. Even a simple 'fmt.Println("Hello")' program is detected as 'Malware.AI' (https://www.malwarebytes.com/blog/detections/malware-ai)

The Golang compiler uses 'AppData/Temp/...' folder to produce the intermediary executable files when one runs 'go run .' for example: 'C:\Users\yourname\AppData\Local\Temp\go-build4255328026\b001\exe\myapp.exe'.

When the detection notification is raised, I choose to restore the file but when executing 'go run .' again, a new subfolder is produced and the false positive triggers again - for example: 'C:\Users\yourname\AppData\Local\Temp\go-build5985328026\b001\exe\myapp.exe'.

Obviously it's not viable to just exclude/allow the entire 'C:\Users\yourname\AppData\Local\Temp' folder otherwise legitimate detections may slip through.

What can I do to prevent MalwareBytes from being an obstacle for my Golang development?

I'd appreciate any advice.

Additional information:

Malwarebytes version: / Update package version: 1.0.64591 / Component package version: 1.0.1860

Golang version: 1.19.3

Link to post
Share on other sites

I've reproduced the issue as simply as possible. The log files are attached.

Steps to reproduce, assuming the development path is: C:\dev\go ->

cd C:\dev\go

mkdir mwbytes_sample

cd mwbytes_sample

go mod init mwbytes_sample

vim main.go

Then create the simple 'Hello World!' program in a file named 'main.go' as per the attached file 'main.txt' (files with the .go extension aren't accepted for upload):


Finally, do: 'go run .' ... immediately the notification pops up for me informing me that the file has been quarantined.

mwbytes_golang_trace_log.txt mwbytes_golang_log.txt

Link to post
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
Back to top
  • Create New...

Important Information

This site uses cookies - We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.