Exactly. This is exactly why HR will want to know this is happening. So they can shut it down. A half decent HR department will recognize that this carries major risk of lawsuits, and want it killed. You bringing information to about another part of the company trying to do something illegal doesn't make you a "problem" employee.
There are a lot of cases where I'd recommend against talking to HR, but getting a spreadsheet from your boss and asking "hey this seems weird, is it legal?" is one of the things they are good for. Your boss is far more likely to hold a grudge than HR.
Obviously, don't go in screaming it's illegal and they must do something on the off chance it was your Chief People Officer's shitty idea.
And again, nothing wrong with going to an employment lawyer first. But when I've seen blatantly illegal stuff like this it's usually that HR isn't involved in the hiring process and they want to know when it happens so they can educate the relevant parties.