r/Python • u/Ishannaik • 6d ago
Discussion PyInstaller on Windows: does code signing stop Smart App Control blocking the DLLs?
I ship a desktop app with a python backend frozen with pyinstaller, currently unsigned. Two problems on Windows:
- SmartScreen "Windows protected your PC" on every fresh download
- worse: on some users' machines Smart App Control blocks the bundled .pyd/.dll files ("An Application Control policy has blocked this file") and the app just dies on startup
I'm about to pay for signing, and the part I can't find a straight answer on is the pyinstaller side:
- Is signing the main exe enough, or do you have to sign every .pyd and .dll inside the bundle (incl. python3xx.dll and third party wheels) before freezing?
- Has anyone seen Smart App Control actually stop blocking after signing, or does it still flag new files until reputation builds?
- onefile vs onedir, does it matter here? onefile extracts to temp, which feels like exactly what SAC hates.
If you've been through this, what did your build pipeline end up looking like?
41
Upvotes
View all comments
5
u/sausix 6d ago
There's no guarantee just because you or your company have been verified and paid for a certificate. Applies to cheap Azure fragment signing and also to expensive certificates like DigiCert. Microsoft still applies heuristics to software components. Because keys and suply chains can be compromized anyway.
Signing improves trust a lot at least. I'm in the club since yesterday and I will face the same results soon.
And do not use PyInstaller. No it does not compile your code. #1 misconception of PyInstaller. Go for Nuitka.