Maybe this has been an issue for longer already. Or perhaps in the transition to Monterey and my new 14" MBP I’ve managed to screw up my settings, but some of the shell scripts I run locally no longer want to just execute. Instead I’m getting stuff like “bash: bad interpreter: Operation not permitted”. Turns out I need to run something like
xattr -d com.apple.quarantine /path/to/shell/script
first in order to get the shell script to execute.
In principle that’s not a big deal, except that every time I modify that shell script I need to remember to rerun that xattr command. And that’s annoying.
It’s not related to bash vs. sh vs. zsh or anything like that. They also have full disk access so that isn’t the issue either. Is there any cheap workaround here?