MacOS security update mechanism
softwareupdate

Software Update checks for new and updated versions of your software based on information about your computer and current software.

See softwareupdate -h and man softwareupdate for the equivalent functionality on macOS.
To install the recommended updates, issue the command:
sudo softwareupdate --install --recommended