disconnect stdio for wasm binaries

This commit is contained in:
Joey Hess 2025-03-07 17:15:21 -04:00
parent 18be4910d8
commit 45d7f3ca4b
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -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 </dev/null
fi