First, you need to define, what exactly "hard disk" means.
Second, you need to express the above definition as a set of udev
rules. This way, device nodes for devices you don't want would not even get created in /dev/
in the first place.
One nice tutorial for udev
rules is here:
http://www.reactivated.net/writing_udev_rules.html
Relevant Q/A: https://unix.stackexchange.com/questions/66897/what-is-the-udev-rule-to-allow-specific-thumb-drive-vendors