Fortunately we have LLM's to not produce that crap... wait, those LLM's were trained on the existing crap and produce the same crap... oh no.
They were RL trained on verifiable rewards. It's not purely learning to predict the next token of a human produced stream.
I doubt SOTA models nowadays are going to produce an implementation without any kind of authentication like here, and not tell you about it.
And even if, a later "is this ready for release" will probably surface such obvious issues.
I do not think LLMs are the problem here. Today, they are most likely more competent than whoever set this up.