Rules only for *certain* instead of *all* scripts run by an interpreter

I’m using WhisperWriter, a Python app to type by speaking, working with local AI model inference. You clone its GitHub repository, set up a virtual Python environment (so its dependencies aren’t installed globally), install its dependencies and run it using python.exe run.py. This python.exe is actually .\venv\Scripts\python.exe, but as it turns out — and I have reason to assume this behavior is hardcoded in the venv python.exe[1] — this python.exe starts the general python.exe installed in AppData.

This means when SpyShelter asks me about mic access, I must grant it for the general python.exe that other scripts including spyware may use.

Transforming the Python app into an executable using pyinstaller also didn’t work. It led to run.exe (built from run.py) starting itself endlessly (there were thousands of processes).

It would be great, if SpyShelter would have in-built support for certain script interpreters including Python, and allowed you to allow and deny access per script, not per interpreter executable.

If you know of any workaround, this information would also be appreciated.


[1] The following process tree (specifying full or partial command lines) IMO hints towards the venv python.exe starting the general python.exe without involvement of any Python code (from the app or any of its dependencies):

  • ...\venv\Scripts\python.exe" .\run.py
    • "C:\Users\...\AppData\Local\Programs\Python\Python311\python.exe" .\run.py
      • ...\venv\Scripts\python.exe src\main.py
        • "C:\Users\...\AppData\Local\Programs\Python\Python311\python.exe" src\main.py
1 Like

@evdywit Very interesting, thank you for posting this. I will share your findings with our team.

We will investigate if it’s possible to make it where SpyShelter would have in-built support for certain script interpreters, but I’m not sure if this is possible with the APIs we use with the Windows OS.