Here's the MSDS off of WD-40's web site.
http://www.wd40company.com/files/pdf...d482671453.pdf
I use WD40 as a rinse after I clean guns and parts in my ultrasonic cleaner. After I use the WD, I blow it off with compressed air and give a wipe down with my normal lube. I've never had any trouble with buildup or varnish.