There is a bit of a catch-22 with this one. The person applying for a PR visa will often be tempted to not disclose, in the application process, illegal work history in Canada. Failing to disclose work history is misrepresentation. Misrepresentation in the process of obtaining PR status is grounds for revoking status in Canada, forever.
No misrepresentations made in the process of coming to Canada, applying for status in Canada, or in applying for citizenship, there is no provision (unless Harper-like minions regain control and change the law) which would lead to the loss of citizenship.
To what extent there is much if any practical risk involved (for someone who failed to disclose part of their work history in applying for PR), once one has become a citizen, is a more complex matter. Mostly, probably, the risk would be very small, except for rather blatant and substantial misrepresentations.
However, this risk also depends in part on whether there is a Harper-like successor becoming PM, one who similar to Harper might be inclined to have the government aggressively pursue past misrepresentations by PRs and naturalized citizens. It can depend on whether there is a falling out with a business or romantic partner who could and would send a so-called fraud tip to IRCC. It would depend, too, on how extensive the misrepresentation was and the extent to which the government would have, in its hands so to say, objective proof there was a significant, material misrepresentation.
My sense is this happens more than occasionally, and that many do indeed not disclose working illegally in Canada. And that notwithstanding the possibility of misrepresentation proceedings, there is very, very little chance of that happening.