Sometimes (or often) things with horrible security flaws "work" but not in the way that they should and are exposing you to risk.
If you refuse to run AI generated code for this reason, then you should refuse to run closed source code for the same reason.
If you refuse to run AI generated code for this reason, then you should refuse to run closed source code for the same reason.