safing / portmaster

🏔 Love Freedom - ❌ Block Mass Surveillance
https://safing.io
GNU General Public License v3.0
8.77k stars 274 forks source link

Cannot wildcard match directories / not working #1552

Open Rubber-Duckie opened 1 month ago

Rubber-Duckie commented 1 month ago

What happened:

Various applications can spawn executables that need internet access. These executables can be created in sub directories which are generated with a random name.

Take for example visual studio, rather notorious for this, where it uses the temporary directory in which it will create subdirectories with random names, a new name every time it runs.

i.e. C:\Users\User1\AppData\Local\Temp\uogzuxa0.jm3\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service

This happens every few hours thus the Portmaster creates a new profile for each unique path it sees, forever. This effectively destroys the ability for the application to be of any use.

image

Despite having edited the profile for the executable, and having inserted a wildcard into the path within the edit profile option, it does not function as expected.

see the screen shot below. image

What did you expect to happen?:

Edit the profile, insert a asterisk for 'match any string' within the file path. From then on, the file path matching logic will use that single profile for the matching instances detected.

i.e. C:\Users\User1\AppData\Local\Temp\*\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service

github-actions[bot] commented 1 month ago

Greetings and welcome to our community! As this is the first issue you opened here, we wanted to share some useful infos with you:

Rubber-Duckie commented 1 month ago
Rubber-Duckie commented 1 month ago

Confirm Regex provides the expected behavour. Might be worth adding notes to the exclamation if the intent is for path matching not to support any string wildcards