Added regex-capabilities to process posture checks
Describe your changes
This PR aims at giving more flexibility for process-type posture checks by allowing the users to use regex in the process path.
Issue ticket number and link
Potentially also helps with https://github.com/netbirdio/netbird/issues/3760
Stack
Checklist
- [ ] Is it a bug fix
- [ ] Is a typo/documentation fix
- [x] Is a feature enhancement
- [ ] It is a refactor
- [ ] Created tests that fail without the change (if possible)
- [ ] Extended the README / documentation, if necessary
By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
@volkermauel thanks for your contribution.
By itself, it is not enough to get the functionality in place. We would need to update the client to support it as well. See:
https://github.com/netbirdio/netbird/blob/0f050e5fe1b2f34b484a6f082cc483f0712a3135/client/system/process.go#L55
Another option is to have a separate field for regex paths in the network map update, but I didn't wrap my head around it yet.
@mlsmaycon i could see two ways for this:
- keep this on the server completely and the clients provides only a list of running processes (probably including details, such as pid, uid of the user running the process, ...), the the server can do the filtering
- do this on both sides of the connection.
let me know if you want this to be implemented in the client too, and i'll give it a try.