Manage Homebrew with Iru (formerly Kandji)
Use Iru’s macOS Library Items to install Homebrew, check team software and run approved maintenance.
Start with an Apple Silicon Mac in a Homebrew Pilot Blueprint or Assignment Map.
Deploy Homebrew and its configuration
- Provision the managing account using your account workflow or Iru’s Create User Accounts parameter. Follow the shared account and home-directory checks; the account must exist before installation.
- Add the approved Homebrew
.pkgas a Mac Custom App Library Item. Use a pre-install script for the account checks andHOMEBREW_PKG_USERconfiguration, stopping on failure. Follow Iru’s Custom App configuration and assign the pilot Blueprint. - Deliver central configuration and the team Brewfile.
- Verify the owner and working Homebrew command using the post-install checks, then inspect the Custom App’s device status before expanding assignments.
Check and install the team baseline
-
Create a Custom Script Library Item named
Homebrew baselineand choose Run daily for a recurring baseline check. In Audit Script, use the following check after deploying the Brewfile.as-brew-userswitches Iru’s root script to the prefix owner and its home directory:#!/bin/bash set -euo pipefail test -x /opt/homebrew/bin/brew test -r /Library/Management/Homebrew/Brewfile /opt/homebrew/bin/brew as-brew-user bundle check \ --no-upgrade --file=/Library/Management/Homebrew/Brewfile - Set Remediation Script to the Brewfile installation job. Keep its prerequisite checks: a failed audit can mean missing Homebrew or an unreadable file, not just missing packages.
- Assign the pilot Blueprint and inspect the item’s status and recorded output. A non-zero audit result triggers remediation; investigate failures before expanding deployment. See Iru’s Custom Scripts reference.
Collect inventory and security reports
- Add a Custom Script Library Item for the inventory collection job, with daily execution and pilot assignment.
Replace
brewin shared examples with/opt/homebrew/bin/brew as-brew-user: this wrapper runs Homebrew as its owner from Iru’s root script. Use/opt/homebrew/bin/jqwhen processing JSON and includejqin the baseline. - Collect a vulnerability scan with its diagnostics and status and inspect the item’s recorded output. A non-zero scan status can indicate findings or an operational failure; inspect both the report and its coverage.
- Upload full JSON and available SBOMs through your organisation’s collector with device identity and collection time. Custom Script output does not automatically populate Iru’s built-in vulnerability views. Track stale devices and collection failures separately from successful scans without findings.
Schedule updates and offer approved tools
- Add a separate Custom Script for the reviewed maintenance job, with daily execution and pilot assignment. Avoid concurrent update and baseline jobs on the same prefix.
- Review script output and fresh inventory and security reports before assigning more devices. A successful remediation status alone does not establish that security findings are resolved.
- For an approved installation action, create a Custom Script with Run on-demand from Self Service, using the fixed installation example.
- Test Self Service as a standard user and confirm the new package appears in inventory.
Limit administrator access
- Assign Iru team roles for report readers, operators and Library Item maintainers.
- Verify a restricted account can perform its intended tasks without editing root scripts or expanding their assignment.
- For multiple customers, use separate supported tenant boundaries and test report isolation as described in shared administration guidance.