Why would anyone test in production???!!!
I have never heard of this kind of insane behaviour before.
There are plenty of ways to safely test in production. For one thing you need to limit the scope of your changes.
"Everyone has a test environment. Some are lucky enough to have a separate production environment."
Selecting the wrong environment in your test setup by mistake?
I refuse to believe that someone on the security team intentionally tested random user scripts in production on purpose.