The level of confidentiality depends on what legal protections are held by specific persons receiving the information and should be addressed with them before specific facts are disclosed. If you feel you have been sexually harassed, do not remain silent. Ignoring sexual harassment does not make it go away. Indeed, it may make it worse as the harasser may misinterpret a lack of response as approval of the behavior. Know your rights.
Sexual harassment is illegal.
Stanford University has a specific policy prohibiting sexual harassment. Familiarize yourself with this policy. If you can, tell the person to stop. State clearly and firmly that you want a particular behavior to cease. This is not a time to be polite or vague.