Does OS X support a mechanism for security updates similar to apt-get? I have used brew to install software, is there a similar command line mechanism to download the OS's security updates?
softwareupdate can perform updates to macOS.
List updates with softwareupdate -l and install recommended updates with

sudo softwareupdate -ir


where -i installs specified updates and -r selects all recommended updates.