The US government is sensitive about matters of national security. One of the expressions of this sensitivity is its unwillingness to have certain kinds of work performed by citizens of countries that the US considers likely to be hostile – e.g . Iran, Cuba, Yemen. etc. Thus it is forbidden by US law for companies doing certain kinds of work for some agencies of the US government to hire nationals of those countries for that work.
Canadian law prohibits discrimination in employment on the ground of national origin, among other things. This is governed by human rights codes and employment standards laws, both subject to the Charter of Rights and Freedoms, which guarantees equal protection of law regardless of national origin etc.
So what do Canadian companies do when they contract with US government agencies for sensitive work? There is a defence sharing agreement between Canada and the US, is there not? Do Canadian companies ignore human rights laws and refuse to offer jobs to people from the US prohibited list, or do they conform with Canadian law and hope the US does not find out? Or is there an exception somewhere to the non-discrimination rule that would apply? Is ability to work for the US government a bona fide occupational requirement?
Are there cases on this? It must come up from time to time.