Of course this is quite tricky, but I think in Europe they're starting to move towards the right idea: they have the precautionary principle, EU commission-funded technical research projects need to follow strict ethical and social governance programs, and the commission is directly funding more research into how to more effectively govern these sorts of endeavours (rather than simply relying on "ethical codes" or "ethics checklists"). It's only a few steps up from that to regulating more widely across Europe (but obviously they need a playground to test in first! and the billion+ euro research Framework Programmes are a pretty good one for that).
I can't really see the US going for this sort of thing though, to be honest, even though it'd most likely prevent things like the BP catastrophe :(