netbird icon indicating copy to clipboard operation
netbird copied to clipboard

Added regex-capabilities to process posture checks

Open volkermauel opened this issue 10 months ago • 4 comments

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.

volkermauel avatar Jun 09 '25 06:06 volkermauel

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jun 09 '25 06:06 CLAassistant

@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 avatar Jun 09 '25 08:06 mlsmaycon

@mlsmaycon i could see two ways for this:

  1. 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
  2. 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.

volkermauel avatar Jun 10 '25 06:06 volkermauel