Gatekeeper
/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" /private/var/db/gkopaque.bundle/Contents/Info.plist
XProtect
defaults read /Library/Apple/System/Library/CoreServices/XProtect.bundle/Contents/Info.plist CFBundleShortVersionString
Check XProtect Version on MacOS Catalina (10.15.x) & MacOS Mojave (10.14.x) and later:
system_profiler SPInstallHistoryDataType | grep -A 5 "XProtectPlistConfigData"
MRT (Malware Removal Tool)
defaults read /Library/Apple/System/Library/CoreServices/MRT.app/Contents/Info.plist CFBundleShortVersionString