I hadn’t heard of people committing production keys to a repo for a while, but I've seen it happen multiple times recently.
In either case, it’s inexperienced developers who committed LLM-generated code to git.
Not saying that experienced devs are immune to this type of mistake, but the risk would be much lower.
And this is why we should remember to consider LLMs as tools, not complete solutions.