Sub topic 16
Keeping apps updated
Updates fix security holes, and they are also a point where an app's trust can change. This chapter covers how each install source delivers updates, how to turn on automatic updates, and how to check that an update is legitimate. It assumes you can find System Settings and the Applications folder. It also assumes you know what a signature and Gatekeeper do, from the earlier chapters. The Terminal sections are optional.
Why updates matter
Attackers often exploit bugs that the developer has already fixed. An app that is months behind keeps those bugs, even if it was safe when you installed it. Updates also carry changes to the app's code, so a bad update can do harm. Trust in an app is therefore not a one-time decision, and you re-evaluate it each time the code changes.
Three kinds of software need updating, and each uses a different mechanism:
| Layer | Updated by | Where you control it |
|---|---|---|
| macOS and built-in apps such as Safari | Software Update | System Settings > General > Software Update |
| Mac App Store apps | The App Store | App Store app > Updates, and App Store settings |
| Web-downloaded apps | The app's own updater, or you by hand | Inside the app, or the developer's site |
Updating macOS itself
macOS updates include XProtect and system security fixes, so they come first. Open System Settings > General > Software Update. Click the info button next to Automatic Updates and review the options:
- Check for updates finds updates but leaves the install to you.
- Download new updates when available fetches them in the background.
- Install macOS updates installs them automatically, usually overnight.
- Install Security Responses and system files applies small security patches and XProtect data between full releases. Leave this on.
You can also list pending system updates from Terminal:
softwareupdate --listUpdating Mac App Store apps
The App Store has one update channel for all its apps. Open the App Store and choose Updates in the sidebar. Click Update next to one app, or Update All.
To make this automatic, open the App Store menu, choose Settings, and turn on Automatic Updates. The App Store then installs updates when the app is not running. If an app is open, the update waits until you quit it.
The App Store gives you three safeguards:
- Every update passes through the same review as the first version.
- The update stays signed by the same developer account.
- The app stays inside the sandbox, so an update cannot quietly gain new file access.
Sandboxing does not stop an update from asking for new permissions. macOS still prompts you the first time an app requests access to something, such as the camera.
Updating web-downloaded apps
Apps from the web update themselves, or they do not update at all. There are three common patterns:
- A built-in updater. Many apps use Sparkle, a widely used open-source update framework. It checks a feed, downloads the new version, verifies a signature, and replaces the app. Some vendors ship a separate helper instead, such as Microsoft AutoUpdate.
- Manual download. The app has no updater. You return to the developer's official site, download the new version, and replace the old copy.
- A package manager. If you installed with Homebrew, Homebrew handles updates, as described below.
Check your apps to find which pattern each uses. Look for a "Check for Updates..." item in the app's own menu. It is usually the first or second item in the menu that carries the app's name.
Spotting a fake update prompt
Updates are a common disguise for malware. A web page or pop-up that says "Your Flash Player is out of date" or "Your Mac needs a critical update" is a scam. Real updates arrive from places you already trust:
- Software Update in System Settings.
- The App Store's Updates tab.
- The app's own menu, or a notification from an app you installed.
Do not install an update from a browser pop-up, a search ad, or an email link. If you doubt a prompt, close it. Then open the app yourself and use its Check for Updates command, or go directly to the vendor's site.
Verifying an update
After a web-based update, check that the app still looks like it comes from the same developer. The Team ID, which identifies the signing developer, should not change between versions. Use the commands from the signature chapter:
#!/bin/bash
app="/Applications/Example.app"
# Version now installed
defaults read "$app/Contents/Info" CFBundleShortVersionString
# Signer identity and Team ID
codesign -dv --verbose=4 "$app" 2>&1 | grep -E 'Identifier|Authority|TeamIdentifier'
# Signature intact?
codesign --verify --deep --strict --verbose=2 "$app" && echo "signature valid"
# Gatekeeper's verdict
spctl --assess --type execute --verbose=4 "$app"Record the Team ID after your first install. If a later update shows a different one, stop and investigate. A developer can legitimately change accounts, but it is rare. Look for an announcement from the developer before you accept it.
Homebrew casks
If you use Homebrew casks, updates run from Terminal:
brew update
brew outdated --cask
brew upgrade --caskSome apps update themselves and are marked as auto-updating in Homebrew. By default, brew upgrade --cask skips them. To include them, run brew outdated --cask --greedy and upgrade them by name. Homebrew checks the downloaded file against a checksum recorded in the cask, which gives you a verification step that manual downloads lack.
Common problems
- The update will not install while the app is open. Quit the app, then retry. In the App Store, an update waits until the app closes.
- An app stops updating. The developer may have abandoned it. Look at the app's version history and the date of the last release. An app with no release in several years and no stated plan is a risk. Consider replacing it.
- An update asks for permissions again. This happens when the app's signing identity or location changes. Check that the Team ID is unchanged, then review the permission request in System Settings > Privacy & Security.
- Two copies of an app. If you kept the old copy in Downloads or on a disk image, you may launch the outdated one. Delete the extras, so that the only copy is in /Applications.
- An old version still works. An outdated app can run for years. It will not tell you it has known flaws, so make updating a habit.
A simple routine
- Turn on automatic macOS updates, including Security Responses and system files.
- Turn on automatic updates in the App Store.
- Once a month, open each web-downloaded app and use its Check for Updates command.
- Remove apps you no longer use. Fewer apps mean less to update.
Exercise
You get a browser pop-up saying "Your Mac is out of date. Click to install the latest security update." What should you do, and how do you update a web-downloaded app safely instead?
Show answer
Close the pop-up without clicking. macOS never delivers updates through a web page. For the system, use System Settings > General > Software Update. For a web-downloaded app, open the app and use its own Check for Updates command, or download the new version from the developer's official site. Afterward, optionally run codesign -dv --verbose=4 on the app and confirm the Team ID matches the one you recorded at first install.
Exercise
A Homebrew cask app is missing from the output of brew upgrade --cask, even though the app has a newer version. What is the likely reason, and what command shows it?
Show answer
The app probably updates itself, so Homebrew skips it by default. Run brew outdated --cask --greedy to list it, then upgrade it by name or let its built-in updater handle it.