open-nomad/client/allocrunner/taskrunner/getter
Tim Gross 1fb1c9c5d4
artifact/template: make destination path absolute inside taskdir (#9149)
Prior to Nomad 0.12.5, you could use `${NOMAD_SECRETS_DIR}/mysecret.txt` as
the `artifact.destination` and `template.destination` because we would always
append the destination to the task working directory. In the recent security
patch we treated the `destination` absolute path as valid if it didn't escape
the working directory, but this breaks backwards compatibility and
interpolation of `destination` fields.

This changeset partially reverts the behavior so that we always append the
destination, but we also perform the escape check on that new destination
after interpolation so the security hole is closed.

Also, ConsulTemplate test should exercise interpolation
2020-10-22 15:47:49 -04:00
..
test-fixtures taskrunner getter set Umask for go-getter, setuid test 2019-08-23 15:59:03 -04:00
getter.go artifact/template: make destination path absolute inside taskdir (#9149) 2020-10-22 15:47:49 -04:00
getter_test.go artifact/template: prevent file sandbox escapes 2020-10-21 14:34:12 -04:00