I really like this idea.
Without knowing too much about bar associations I feel like a programmer association with a code of ethics similar to the ABA model rules (perhaps including the Six Fixes[0]) would be a great start to reining in privacy violations.
I immediately see that it would need to be government mandated for it to have any effect, and given that many governments routinely violate these terms I don't know how it could be enforced.