Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add experimental support to inherit profiles from parent processes #948

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

ppacher
Copy link
Contributor

@ppacher ppacher commented Oct 20, 2022

Building on top-of the new profile matching feature this PR adds an experimental setting to enable profile inheritance for processes.

If enabled, the algorithm to find a matching profile is as follows:

Find profile and highest fingerprint score for the current process
Get fingerprint matching data for the parent process
Find profile and highest fingerprint score for that parent
If the fingerprint score is higher, use the parent profile instead.
Repeat steps 2-4 until there is no more parent process.
This change effectively allows applying a profile to all sub-processes of a process. For example, this may be useful in the following scenarios:

A profile for the vscode (matched by cmdline or binary) currently is not correctly applied to the electron sub-processes of that profile. With the above changes, a cmdline match for vscode will have a higher priority and thus force all electron sub-processes to have the same profile applied.

Shell or interpreter scripts will get a profile with a script-tag assigned. Thus, all sub-processes executed by this script will have the correct profile applied, i.e. a shell script that calls curl now receives the correct profile (that on the script file)

@ppacher
Copy link
Contributor Author

ppacher commented Oct 20, 2022

Rethinking this we might want to move that from a gobal setting to a profile setting.

@ppacher ppacher marked this pull request as draft October 20, 2022 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant