A robustly engineered program should intersect with bash, or any other Turing-complete system, at as few points as possible, and in as constrained a format as possible.
https://www.veracode.com/blog/2014/09/misfeatures-strike-again
Took four words and a symbol to total fail:
"Bash – the Unix shell – came out ..."
If anything is 'the unix shell' it is bourne shell. I've had to devise systems occasionally which allow some user input to a shell or other program but it is rare and I aggressively limited the input. In fairness, however, it would be possible for a regex engine (which does the discrimination) to harbor some hidden bug as well, but relatively unlikely; many of these ancient systems are quite small and simple and have been extensively analyzed over the past decades. The changes are small so a lot of eyes will be looking at the deltas.
IMHO, the best way to achieve security is to build on very simple solutions and try to make one's own system very limited. Even more critically, don't be lazy when it comes to installation (esp, which user executes which operations.)