Contract work and discrimination

No this is not a situation I am in. Just curious.
If I work for ABC Consulting and they have me work with XYZ Corporation and while at XYZ I suffer from a discriminitory work environment

  1. Is XYZ shielded since I do not actually work for them but merely at their site?
  2. If I complain to my company ABC about my treatment but I do not complain to XYZ, then do any rights to sue/arbitrate with XYZ on my treatment after I leave?