How do I block OS X's auto detection of shared drives?
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.