This repository provides a simple, repeatable way to turn Apple security announcements into short internal email notifications.
All generated mail content is plain-text only with UTF-8 encoding. No rich text and no HTML are used.
Keep the internal notification format stable and concise:
- what Apple released
- which internally used versions are affected
- which versions fix the issue
- how colleagues should update
- when the update should be completed
templates/apple-security-announcement-email.txt: plain text email templateexamples/apple-security-announcement.sample.json: example structured input for a notificationexamples/announcement-automation-config.sample.json: example automation config for scheduled fetchesexamples/apple-security-releases.sample.txt: sample Apple release text for extractor inputscripts/generate_email_draft.py: converts structured JSON into an email draft
The template uses a small set of UTF-8 icons to draw attention to the most important sections, especially affected versions and the required update action.
Use Apple's release overview page as the primary source:
https://support.apple.com/en-us/100100
For each release cycle, collect:
- release date
- product names
- fixed versions published by Apple
- Apple reference links
- Apple update instructions links
Note: the included extractor is designed for copied Apple release text or markdown, not raw website HTML. A practical approach is to paste the relevant part of the Apple page into a text file first, then run extraction.
Apple's announcement usually tells you the fixed version and the supported devices, but not which of your colleagues are still on older versions.
To produce the "affected versions" section, compare the Apple release against internal inventory from your MDM or endpoint platform, for example:
- Jamf Pro
- Microsoft Intune
- Kandji
- Mosyle
- Workspace ONE
Recommended rule:
affected_versions= versions currently installed internally that are below the new fixed versionfixed_versions= version(s) announced by Apple as the remediation target
Create a JSON file shaped like examples/apple-security-announcement.sample.json.
This becomes the reviewable source of truth for the email draft.
Run:
python3 scripts/generate_email_draft.py render examples/apple-security-announcement.sample.jsonOptional file output:
python3 scripts/generate_email_draft.py render examples/apple-security-announcement.sample.json -o draft.txtTo generate an .eml draft that can be opened directly in mail clients:
python3 scripts/generate_email_draft.py render-eml examples/apple-security-announcement.sample.json -o draft.emlTo generate a calendar entry for the update deadline:
python3 scripts/generate_email_draft.py render-ics examples/apple-security-announcement.sample.json -o apple-security-deadline.icsTo fetch the current Apple release page and build a fresh normalized JSON draft automatically:
python3 scripts/generate_email_draft.py prepare-latest examples/announcement-automation-config.sample.json -o out/latest-announcement.jsonRecommended options:
- copy the generated draft into Outlook or Apple Mail
- or generate
draft.emland open/import it in Outlook or Apple Mail - the generated
.emlincludes a plain.icscalendar attachment for the deadline when a deadline is present - attach the Apple source link in the message
- use a mailing list for the relevant colleagues
If command line sending is desired, keep it simple and auditable, for example with mailx or a ticketing/automation platform. The generation step should stay separate from the send step so a human can review the draft first.
Use a two-stage process:
- extract release data from Apple's announcement
- enrich it with internal inventory before sending
Why this split matters:
- Apple provides fixed versions and device scope
- internal tools provide the actually affected installed versions
- mixing both too early makes validation harder
Recommended extracted fields from Apple:
release_dateproductfixed_versionsavailable_forreference_urlupdate_urlhas_published_cves
Recommended enrichment fields from internal systems:
affected_versionsaudience_scopedeadlinenotes
Render the final email from structured data instead of editing free text each time.
Benefits:
- stable wording
- lower risk of missing products or versions
- easier approval and audit trail
- possible future automation
Use a light approval flow:
- script generates draft
- security or workplace team reviews wording and affected scope
- approved draft is sent to the mailing list
This keeps the process easy while preventing accidental over-notification.
P1: actively exploited or emergency Apple advisory -> send same dayP2: major security release for managed devices -> send within one business dayP3: niche or unsupported product release -> track, but do not broadcast broadly unless relevant
- fetch Apple's release page automatically on a schedule
- compare latest release entries with previous saved JSON
- enrich affected scope from MDM exports automatically
- open a pre-addressed Outlook draft or create a
.emlfile - post the same content to Teams or Slack
The repository includes a sample launchd setup for macOS:
scripts/run_scheduled_check.sh- wrapper that generatesdraft.txt,draft.eml, andapple-security-deadline.icslaunchd/com.qbic.apple-security-announcements.plist.template- user-path-independent LaunchAgent templatescripts/install_launchd_agent.sh- installer that expands the template for the current local repo path
What the sample job does:
- runs at
08:00,12:00, and16:00 - fetches the Apple security release page and builds
out/latest-announcement.json - compares that prepared JSON hash with the last processed hash
- only generates new artifacts when the input changed
- shows a macOS notification when a new draft is ready
- opens
draft.emlautomatically for review
Install it as the logged-in user:
chmod +x scripts/run_scheduled_check.sh
chmod +x scripts/install_launchd_agent.sh
mkdir -p out
./scripts/install_launchd_agent.shUseful commands:
launchctl kickstart -k "gui/$(id -u)/com.qbic.apple-security-announcements"
launchctl print "gui/$(id -u)/com.qbic.apple-security-announcements"
launchctl bootout "gui/$(id -u)" "$HOME/Library/LaunchAgents/com.qbic.apple-security-announcements.plist"Important:
- the sample uses
examples/announcement-automation-config.sample.jsonfor audience, deadline, support, and sender defaults - web fetching is done inside
prepare-latest, which pullshttps://support.apple.com/en-us/100100on each scheduled run - the current automation derives affected versions from Apple's fixed versions; add MDM enrichment later for exact internal impact
- notifications and
open draft.emlwork best when the job runs in the logged-in user session - the installer resolves the local repo path automatically, so different users do not need to edit hardcoded
/Users/...paths