Does OS X support a mechanism for security updates similar to apt-get?
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.