There is a potential for risk in renting illegal in laws. Definitely consult an attorney or join property management association to find out about more information on renting out your unit.
Oh the mere fact you are asking this... tells me you are concerned and you should be! Jed is correct you need to speak to an attorney to best understand all the ramifications and liability you would incur.
If you would like a list of San Francisco specific Landlord Tenant Attorneys, please email me privately.
Personally - I would NEVER DO IT.
Building Trust for Life - Zephyr Real Estate
Call an attorney - real estate agents are not licensed to advise you on legal questions and if one of us does we are liable if you base your decision on our advice.
Alina Aeby-Broker Associate
Pacific Union International/Christie's International Real Estate