Utilize your financial knowledge, give your answer or opinion to the input question or subject . Answer format is not limited.

Claiming income/deductions on an illegal apartment
The IRS demands and expects to be paid tax on all taxable activity, including illegal activity.  If they expect drug dealers, hit men, and smugglers to pay tax, they expect you to pay tax on your basement apartment. The flip side of this is that the IRS keeps reported tax activities confidential.  They only share what is required (for example, your taxable income with your state).  You can read the details in their disclosure laws.   Deductions will work just as they would if your apartment was perfectly legal.  In the eyes of the IRS, whether your income is legal or not is none of their business.  They care only about whether it is being taxed appropriately. They will not share any information with your zoning authority without a court order.