From 45d7f3ca4b8c0f3110424d0a11189deea13b47c8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 7 Mar 2025 17:15:21 -0400 Subject: [PATCH] disconnect stdio for wasm binaries --- doc/special_remotes/compute/git-annex-compute-wasmedge | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/special_remotes/compute/git-annex-compute-wasmedge b/doc/special_remotes/compute/git-annex-compute-wasmedge index c20f7824a8..a734418125 100755 --- a/doc/special_remotes/compute/git-annex-compute-wasmedge +++ b/doc/special_remotes/compute/git-annex-compute-wasmedge @@ -43,5 +43,10 @@ if [ -n "$wasm" ]; then # Use --force-interpreter to avoid wasmedge running AOT native # instructions, which is insecure if the WASM binary comes from # an untrusted source. - wasmedge --dir "/:`pwd`" --force-interpreter -- "$wasm" "$@" >&2 + # + # Avoid displaying output from the WASM binary, since it is + # untrusted, and could contain harmful terminal escape sequences, + # for example. + wasmedge --dir "/:`pwd`" --force-interpreter -- "$wasm" "$@" \ + >/dev/null 2>/dev/null