I recently applied for a job posting online (via LinkedIn). It was a good job at a mid sized firm. I knew most of the interviewees (Linkedin circle, college friends, friends of friends etc), and in any case met all of them because of the initial GD Round. It was a group of 6 people during the GD and this was followed by a technical interview, coding round and HR.
At the end of the technical interview, we were three people left me(a guy), one more guy and a girl. The coding round was on an open programming challenge on HackerRank, and I aced it. Scoring substantially better than the other two(scoreboard was public) and the girl was 3rd out of us three. I went to the HR interview feeling very happy, and that too went smoothly. They asked generic questions like "where do you see yourself in 5 years, do you want to pursue masters etc etc". At the end of it, the woman taking my interview said and I quote "I think everything looks perfect. You should expect a job offer from us at the end of the week".
I was delighted, but as the week ended I did not receive a response from them and got worried, so I sent a very small mail asking about my status, but did not get a response. Two days later, I was shocked to receive a mail saying that "We regret to inform you that we are not proceeding with your candidacy currently". I was depressed as this was a complete shock and assumed that all three of us got rejected.
A week later, I checked LinkedIn to find that the girl had been placed ( at the same position she had applied for, and I was rejected for). I felt flustered. I tried to contact the HR, and one more friend in the company to find out what had happened. A friend of mine who worked in the company, very reluctantly admitted that the company had signed up for some sort of gender diversity program, which would entitle them to incentives (funds, reputation etc) if they could show that their team was diverse in terms of Gender. I brushed this aside as a mere rumor and sought for a better explanation form the HR and the Technical guys I was interviewed by. After a week of mailing I via unofficial channels (not a mail, but a direct message on LinkedIn) was contacted by the HR Woman. She at the condition of anonymity said that their decision was overturned by senior management who calculated that they could receive significant funds if they managed to hire more females, and that I was not the only one who had been affected. During the same time, the same had been done to various to various candidates who were interviewed for various verticals. She explicitly stated that if I were to reveal her or her messages to anyone else, she would be fired, and I do not wish to throw her under the bus.
What should I do? Is there even anything that I can do? Does the USA have any laws that can protect me against the same? I am too scared to publicly accuse the company of doing the same because a) I will sound misogynistic if I do the same b) I cannot rat on the two people, and without them I have no proof. This job was really really important for me, and me being a very young graduate from a less than stellar college do not exactly have recruiters running after me.
So my question is,
A) Do I have any legal recourse? Are there any lawyers that I should contact?
B) Should I publicly reveal the incident in order to expose the company?