Earlier quoted context omitted.
I’ve always heard the IRS doesn’t care where your income comes from, just that’s it’s reported. IRS website even talks about how to report “illegal income” and “bribes”. And the IRS has no authority beyond tax collection. They can’t do a (non-tax) criminal investigation. Now, could they flag it for the FBI? Sure.
The IRS accepts payments from those living illegally in the country. Not sure how it is now iirc proving a history of paying taxes was part of a successful naturalization process.
I had a friend go through naturalization. The illegal presence is dealt with separately, but the tax check is basically "Do you file taxes each year? Do you owe the IRS any money? Ok, you're good."