The usbguard software framework helps to protect your computer against rogue USB devices by implementing basic whitelisting/blacklisting capabilities based on USB device attributes.
more here........https://github.com/dkopecek/usbguard
more here........https://github.com/dkopecek/usbguard