Since containerlab is invoked through sudo, any user PATH is lost. This prevents the selection of a dedicated executable e. g. of a particular version by setting PATH accordingly.
With this commit the location of containerlab as it can be found in user context is preserved.
Leaking settings from user context to privileged contexts can always be harmful, but in this particular context with a Makefile sprinkled with various sudo invocations this does not add significant security concerns. It is definitely better than invoking sudo with --preserve-env all the time.
Since containerlab is invoked through sudo, any user PATH is lost. This prevents the selection of a dedicated executable e. g. of a particular version by setting PATH accordingly.
With this commit the location of containerlab as it can be found in user context is preserved.
Leaking settings from user context to privileged contexts can always be harmful, but in this particular context with a Makefile sprinkled with various sudo invocations this does not add significant security concerns. It is definitely better than invoking sudo with --preserve-env all the time.