Web site developers should exclude what they don't want checked by the search bots like google using robots.txt file.
User-agent: *
Disallow: /cgi-bin/
Or any other locations that they don't want indexed. Google isn't responsible for poor site security. At least Google is giving a way to remove data that it has indexed.