Chrome OS will soon have a feature called USBGuard, which aims to prevent OS from executing the USB device code while the computer is locked.