Recruiters are typically not techies and cannot evaluate open source contributions / other projects. As harsh as this sounds, there is an over supply of engineers in India with a marked difference in quality of teaching in tier 1 as compared to tier 2. Companies expect this difference to be reflected in candidates. Of course there are expcetion to the above, but, most companies will not pay to spend to much time giving a fair evaluation to every candidate on an individual basis.
Legally speaking they can do this on candidate attributes except race, gender, ethnicity (anything where right to equality will apply). Right to equality does not apply on academic backgrounds, i.e, people do not have a right to be treated equally in the labor market regardless of educational background. As far as I know there is no precedence going against this.