uber-archive/makisu

Quotes not escaped in COPY directive destination

dylanplecki opened this issue · 0 comments

Describe the bug
Quotes present in the COPY directive's destination argument are not escaped and become part of the resulting path in the container image.

This may also be present in other directives or the source argument for the COPY directive (untested).

To Reproduce
Steps to reproduce the behavior:

$ mkdir makisu-copy-test && cd makisu-copy-test
$ echo "my file" >foo.txt
$ echo >Dockerfile <<EOF
FROM debian:latest
COPY foo.txt "/usr/local/share/foo.txt"
EOF
$ makisu -t makisu-copy-test .
$ docker run -it makisu-copy-test ash
/ # ls
"      bin    dev    etc    home   lib    media  mnt    opt    proc   root   run    sbin   srv    sys    tmp    usr    var
/ # cat /\"/usr/local/share/foo.txt\"
my file

Expected behavior

test -f /usr/local/share/foo.txt && echo "Assertion Succeeded" || echo "Assertion Failed"

Environments
Any OS environment. Tested and present on Makisu v0.1.11.

Additional context
The issue may apply to other directives.