USB is fundamentally broken and insecure. It simply isn't possible to keep a bad actor who plugs in from hijacking your system ports.