|
| 1 | +--- |
| 2 | +title: "macOS Release: Binary is blocked by Gatekeeper as from an 'unverified developer'" |
| 3 | +labels: enhancement, build, documentation |
| 4 | +--- |
| 5 | + |
| 6 | +### What is happening? |
| 7 | + |
| 8 | +When a user on macOS downloads and tries to run the `template-engine-v...-macos` executable from a GitHub release, they receive a security warning: |
| 9 | + |
| 10 | +> "Apple could not verify 'template-engine-...' is free of malware..." |
| 11 | +
|
| 12 | +This is the expected behavior of **macOS Gatekeeper**. Because the application is not signed with a paid Apple Developer ID certificate and has not been notarized by Apple, the operating system treats it as untrusted by default. |
| 13 | + |
| 14 | +### Why is this a problem? |
| 15 | + |
| 16 | +This creates a significant barrier to adoption for macOS users. It makes the tool seem untrustworthy and requires users to know the specific security workarounds to even run the application. |
| 17 | + |
| 18 | +### What is the solution? |
| 19 | + |
| 20 | +There is a two-part solution: a necessary short-term fix and a correct long-term enhancement. |
| 21 | + |
| 22 | +#### Short-Term Solution (Immediate Priority) |
| 23 | + |
| 24 | +We must provide clear instructions to the user. This involves updating the `README.md` to add a section explaining the warning and the standard, safe procedure to run the application. |
| 25 | + |
| 26 | +**Proposed `README.md` addition:** |
| 27 | + |
| 28 | +```markdown |
| 29 | +### Note for macOS Users |
| 30 | + |
| 31 | +When you first run the `template-engine-macos` executable, you may see a security warning from macOS stating that the developer cannot be verified. This is expected behavior for applications that are not notarized through the Apple App Store. |
| 32 | + |
| 33 | +To run the application, you must grant it a one-time security exception: |
| 34 | +1. Right-click (or Ctrl-click) the `template-engine-macos` file and select "Open". |
| 35 | +2. You will see the same warning, but this time it will include an "Open" button. Click "Open". |
| 36 | + |
| 37 | +You will only need to do this once. After you grant this exception, you can run the executable normally by double-clicking it or calling it from your terminal. |
| 38 | +``` |
| 39 | + |
| 40 | +#### Long-Term Solution (Future User Story) |
| 41 | + |
| 42 | +To remove the warning entirely, the application must be officially signed and notarized by Apple. This is a complex process that involves: |
| 43 | + |
| 44 | +1. Enrolling in the paid Apple Developer Program. |
| 45 | +2. Generating a "Developer ID Application" certificate. |
| 46 | +3. Updating the `release.yml` workflow to use this certificate (stored as a secret) to sign the macOS binary. |
| 47 | +4. Adding a step to submit the signed binary to Apple's notarization service and "staple" the resulting ticket to the executable. |
| 48 | + |
| 49 | +This should be tracked as a separate, future enhancement. |
0 commit comments