How to disable USB Mass Storage Device in macOS Mojave

Is it okay if the usb is recognized, but isn't mounted? When a drive is recognized but not mounted, and your SIP is enabled, system apps with the right entitlements might still be able to read/write directly to the disk, but most system and 3rd-party applications won't be able to write to the disk. If so, try disk arbitrator (download: https://github.com/aburgh/Disk-Arbitrator/releases). I'm sure most people know this already, but maybe someone will benefit from knowing this. I hope this helps.