macOS Ventura introduces a new security alert that asks the user whether or not he wants to use the USB or Thunderbolt device just plugged into the Mac. It had been part of the batch of novelties of the first beta of the operating system, but it appeared to us only very recently:
This alert appears on portable Macs with an M1 or M2 chip. By validating the connection, the user authorizes the peripherals to communicate with the computer. This additional security does not apply to power adapters, external displays, or connections from an already authorized hub. Also, the Mac may load from an unverified device.
An option to deactivate this function (present by default) is available in the system settings Privacy and Security > Security. It offers four possibilities: Always ask; Ask for new accessories; Automatically when unlocked; and always.
This solution won’t stop malicious USB connection attempts — that would require a formal authentication request — but at least users will know that something has just plugged into their Mac.