-
-
Notifications
You must be signed in to change notification settings - Fork 112
Open
Labels
bugSomething isn't workingSomething isn't workinghelp wantedAspect isn't prioritizing this, but the community couldAspect isn't prioritizing this, but the community could
Description
Strings in failure_message are interpolated into the generated shell script without escaping special characters:
diff_test(
name ="foo",
file1 = ":a.txt",
file2 = ":b.txt",
failure_message = "shell injection: `echo hello world`",
)
Actual test output:
exec ${PAGER:-/usr/bin/less} "$0" || exit 1
Executing tests from //:foo
-----------------------------------------------------------------------------
1d0
< 1
FAIL: files "a.txt" and "b.txt" differ. shell injection: hello world
expected:
exec ${PAGER:-/usr/bin/less} "$0" || exit 1
Executing tests from //:foo
-----------------------------------------------------------------------------
1d0
< 1
FAIL: files "a.txt" and "b.txt" differ. shell injection: `echo hello world`
Same issue with using failure_message = "$(echo hello world)"
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedAspect isn't prioritizing this, but the community couldAspect isn't prioritizing this, but the community could