r/pythontips • • Sep 29 '20

Module How to guarantee your program is safe

Ther's out there any certification that a program is safe without having it belonging from windows or other known developers societys? I recently created a little program and a friend of mine told me that norton test was successfully passed but windows defender told him that my application could harm is pc. The only 2 thing i can thin about windows defender to point out as dangerous are the creation of a db inside AppLocal/Local/My-program-name and accessing the web to load and collect the input data to a mysql database. Are those libraries untrusted? I build the exe with pyinstaller

28 Upvotes

7 comments sorted by

11

u/demdillypickles Sep 29 '20 edited Sep 29 '20

It’s not that it thinks your app is specifically dangerous. As a general rule, your anti-malware is gonna be suspicious of any .exe file that you didn’t install. This is because most people aren’t programmers, and install their apps with installation wizards. So when it detects a new .exe that wasn’t installed the “official way”, it assumes you’ve been the victim of an attack and the .exe has been placed by an attacker.

There isn’t really a way to prove your credibility without being registered as a trusted vendor with certificate authorities. If you made the app and you know what it does, it should be perfectly safe though.

Edit: Also, while there have been some incidents of malware being found on PyPI, they work very hard to curate and maintain it. You can trust modules you get from PyPI.

2

u/Riccardo0645 Sep 29 '20

Thanks for your very useful answer. I’m going to search a bit about that certificates thing (if you know how to get a cheap one it would be awesome) because my aim was to share it and if the user has trust issues could uninstall it after the windows defender notification. And could you explain me better how to install something “the official way”? Thank you again

2

u/demdillypickles Sep 29 '20

I’m not 100% sure, but Windows for example, would prefer applications be installed in Program Files x86 for 32 bit and Program Files for 64 bit. Those are the default install locations, and would probably be safer for your app to not be flagged.

1

u/Riccardo0645 Sep 29 '20

t Windows for example, would p

Thx againg. So since my program is portable i should just only save the folders to Program Files and windows defender won't anymore bother me?

Thx again i rally appreciate your help

2

u/AbodFTW Sep 30 '20

I think you've already found what you're looking for already, but I want to say you could evaluate your idea and see if it can be as a web app instead, as that what most of the market it moving towards and you will save yourself a lot of desktop software headaches.

Maybe not this idea, but for your next software, my 2c

2

u/Riccardo0645 Sep 30 '20

I know that's the best idea actually but is far more difficult to develop a web app. thanks fro the advice i hope to be able to do that in the future

1

u/[deleted] Sep 29 '20

The safety assumption with Python itself and its common libraries is that they're open source and have enough eyes on them to be considered low risk. There's no guarantee so be as cautious as you think you need to be for whatever your risk tolerance is. As long as you stick to heavily used software, you should be pretty darn safe.