How do I block OS X's auto detection of shared drives? I'm a little concerned that I have a bunch of drives from other people's computers showing up in Finder whenever I'm at a company site. I don't plan to access those at all. 

I have sharing disabled, yet they still appear. How can I block their being detected? 

And is there any security risk in their showing up? I ask because I noticed that one of these drives, without my asking at all, showed up in my Dock!
OS X uses Bonjour to allow you and your computer to discover services offered by compatible networked devices.

Amongst Finder's uses of Bonjour: show which other devices are able to share their volumes with you. Simply browsing the list of computers will not make any significant connection. 

If you choose to access the shared data of a computer other than your own, there should be no risk to data on your own computer. If you choose to run a shared application, Finder should present an alert. 

Without blocking detection, Finder preferences allow you to not view Bonjour computers in the sidebar: 


Mac Help: Organize the sidebar
How to: prevent sidebar 'Shared' clutter in OS X | MacFixIt - CNET Reviews


Whatever your preference for the sidebar, the main Finder view of the network (Command-Shift-K) will remain comprehensive.