I made a Python script that mails a Windows directory as zip to me. I added a scheduler using sched module that repeats this every hour.
I was attempting to make a simple sync application for personal use that starts at Windows Startup.
I converted it to exe using pyinstaller --onefile argument and it worked flawlessly. But after a couple of days, Windows defender (Windows Security Centre of Windows 10) detected it as a Trojan.
This issue is not limited to Windows Security Centre, A quick scan on Virus Total says 4 antivirus detects it as Trojan.
What brings the Antiviruses to think this? I don't think sharing the code is any use as proper details have already been given, but still, a comment would make me do it.
--onefile
is a self extracting binary, it shares some characteristics of viruses. This will/can trigger anti-virus software as a false positive. It happens. – Brenan--onefile
parameter makes the EXE a self extracting archive, that does some similar behavior as malware. Usually, if this happens, if you re-download the file, it is fixed, for me. – Tannie