mining software is pretty much always detected as malware/troje. making sure the source you download from is good it the only way to make sure its ok/source code. i use awesome miner and have had no issue so far over 4 years.
you need to make sure the windows AV exceptions are set correctly to ignore it