> We need an engineering code of conduct.
Most engineering disciplines have this, and they take it very, very seriously. That's part of being a PE.
The problem is enforcing breaches of the code. In engineering disciplines that require licenses from the relevant government or professional bodies, breaching the ethical codes can result in you, or whoever signed for your work, losing their license and thus being unable to work (or at the very least they'd have to work under another engineer). In addition to facing potential legal and financial consequences for their actions.
But we don't have mandatory licensing in software and I honestly struggle with how we would even implement that. In a traditional engineering discipline such as civil engineering, teams of engineers work on a project that requires millions of dollars to construct, with many reviews by other engineers and overseen by more people.
But all it takes to make software is a computer. The barrier to entry is so much lower that, if you're a bad actor, it's not that difficult to find someone who will be willing to do your dirty work for money. Even in places that license software engineers (I don't think a PE exam existed for software until 2012, but I may be mistaken) there's really no incentive to get one because companies by and large don't care (there are a few that might, though, like aviation or medical).
The best idea I've been able to come up with is a combination of education on ethical issues and a voluntary code of ethics that we get as many software engineers, developers, and companies to sign onto. It doesn't solve the problem, but it's at least an incremental improvement over the Wild West that we currently have.