In 2014 a major outbreak of food poisoning in 29 states was traced to cucumbers grown in Virginia that were contaminated with a strain of Salmonella. To protect yourself, wash cucumbers well and scrub them with a clean vegetable brush before slicing, even if you plan to peel them—that way if there are bacteria on the surface, the knife won't carry them into the sliced vegetable. This same advice goes for most firm produce, including melons and avocados, according to the USDA and CDC.
Soap or special produce cleansers are not necessary and not recommended. In addition, keep cucumbers refrigerated in order to prevent multiplication of any bacteria present. For more advice on preventing foodborne illness, check out our Food Poisoning Facts slideshow.
See also: Pointers on Produce Safety