The problem isn't technological, it's social. You found an unidentified item on the floor of unknown origin, picked it up and inserted it into your computer. It's the equivalent of running an unsigned installer in spite of Gatekeeper's warnings that it cannot be trusted. Or opening an email attachment from someone you don't know. Or scanning an unlabeled QR code and being surprised when your phone sends you to pr0n sites (presumably you object to QR codes as well, since they share much in common with webkeys).
It would also be quite possible to build a PKG installer that wipes your entire computer. I could make one in about 60 seconds. If I email it to you as "Unidentified.pkg", will you just blindly run it because it was there?
The solution isn't to prevent your computer from running any PKG, or to change your email account so it can never receive an attachment, or to disable the camera in your phone.
The failure was with you, and the solution is simple: do not insert USB devices into your computer that you do not recognize or trust. Do not open attachments from people you do not know. Do not scan QR codes that have no identification. Windows users live with this every day because they're always at risk. Macs are more robust, but they are not impenetrable and being a Mac user doesn't mean you shouldn't precede everything else with common sense.
If you really must solve the problem with technology, try this:
http://www.amazon.com/dp/B0054U6O24
followed by this:
http://www.amazon.com/dp/B000LGPD64