I knew in Melbourne even though they did handle through the terminal, x-ray was done by shipboard staff - when Majestic paid a port visit (shorex) just before Covid shutdown and we went onboard as invited by CAU, the terminal is absolutely deserted and everyone was screened onboard, both visitors and passengers.
Only difference was security swap visitors' IDs for an onboard visitor badge inside the terminal before we went up the gangway.
Michael