crashappsec / chalk

Chalk allows you to follow code from development, through builds and into production.
https://crashoverride.com/
GNU General Public License v3.0
322 stars 11 forks source link

fix(exec): passing full path in execv syscall #333

Closed miki725 closed 3 weeks ago

miki725 commented 3 weeks ago

Issue

distroless python images break as they are unable to import any deps from the venv

Description

As per execv manpage:

The first argument, by convention, should point to the filename associated with the file being executed.

However it seems like some programs rely on the first argument being absolute path such as in Python sys.executable initialization which changes how its sys.path is filled which in turn impacts its virtual env support.

Now chalk passes the full path which should allow most programs (:fingerscrossed:) to be able to correctly initialize its argv.

Testing

➜ make tests args="test_docker.py::test_distroless --logs"