curl | tee foo.sh
and then inspect foo.sh and then (maybe) cat foo.sh | bash
Does that avoid the issue?
Yes, but will you do it really?