I think that just leaves everyone with an incentive to keep it quiet. A monetary reward for the reporting dev and a fine for the person authorizing the build puts incentives in the right place, IMO.
I was waiting for someone to make this point; It's funny how in other engineering disciplines there are clear repercussions for designing something that breaks the law, but software engineers are somehow exempt.
"The client didn't want to pay for a GFI so it's not my fault he got electrocuted ¯\_(ツ)_/¯"
I'm not sure that's the right thing here. You'd end up with some poor junior dev getting punished for what is essentially a decision by their boss.