A hypothetical for you, because I've already decided on what I will do. After working in an extremely toxic environment where my union had little to no backbone and barely tried to fight for us (they took a 0% pay increase this year when it is normally cost of living at 2-3% and this year it needed to be 7%), I had to learn what my rights were fast and mostly with google. One of the things I learned was that according to the NLRB (usa), it is unlawful for workplaces to have a policy dictating that discussion of pay scales is a punishable offense.
As a result of leaving my old job, I found a new job with a bit of a pay cut, but better on almost everything else, but they had a rule saying discussion of pay scales will be disciplined or even terminated.
Right now I am just trying to keep my head down and get better, but I did mention it to my supervisor who was training me (she never heard of it before). I don't really intend to push the issue and wouldn't discuss current pay unless asked, because then i would be honest, but I am curious as to what you guys would do in my shoes.