Wipe the brake lines clean of all dirt and debris with a paper towel. As you clean the lines, examine them carefully. A cracked or worn line (from rubbing against the frame) needs to be replaced. It only takes a tiny opening in the casing to create enough of a vacuum leak to make your brakes not work properly. If a line is old, or if it is showing signs of sun damage (a whitening and hardening of the plastic or rubber hose covering) then you should replace it.
Clean off the two hydraulic fittings at either end of the motorcycle brake line. One fitting is attached to the brake fluid reservoir and the other enters the actual brake on the wheel. Some motorcycles have a separate brake fluid reservoir for each brake line. The fitting is broken down into three parts: the flare that is inserted into the receiving connector, the locking nut (with a threaded nipple) and a metal crimp holder (which is machine-pressed onto the hose).
Put a few drops of liquid dish soap on where the fitting enters the brake or the reservoir, and directly behind the lock nut on the fitting where the metal crimp holder begins. Then put few drops where the metal crimp holder of the fitting ends and the hose begins. Use your finger to smooth the soap completely around these areas.
Engage the brake by pressing the lever or pedal (depending on which brake line you are trying to detect the vacuum leak in). Pump the brake several times. While you do this, look at where you placed the soap on the fittings and hose. A vacuum leak will make the soap coating bubble. Once you see the bubble, you have found your vacuum leak.