I asked this at https://apple.stackexchange.com/questions/445343/macapps-link-possible-attack-vector-could-you-pipe-through-some-security-scr but I think this would be more appropriate place.
A work colleague said she is using https://macapps.link/en/ to help speed up software installation on company Macs. Choosing apps to install results in a terminal command like this:
curl -s 'https://api.macapps.link/en/chrome-etcher' | sh
This screamed attack vector to me since if that site is hacked then the result could be a malicious payload.
I guess https://brew.sh/ is the same:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Is there any script that the results could be piped through before hitting | sh
(etc..) to check for malicious actions?
And of course there is what is downloaded (eg. chrome.dmg) but then that is a separate problem that would be needed to be solved with virus software (or put the DL URL through https://www.virustotal.com/gui/home/upload).