copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

Copilot app blocked by macOS Gatekeeper under corporate security policy

Open jdesulme opened this issue 10 months ago • 8 comments

Describe the bug

Everytime after upgrading copilot cli through HomeBrew the following message appears: Apple could not verify “copilot” is free of malware that may harm your Mac or compromise your privacy.

Afterwards, to get it working correctly, I need to go to Privacy & Security to explicitly allow "copilot"

We have the Security option set: Allow applications from: App Store & Known Developers

Affected version

0.0.381

Steps to reproduce the behavior

  1. On a corporate‑managed Mac with Gatekeeper enforced to App Store & Known Developers by profile.
  2. brew install copilot-cli
  3. Attempt to trigger copilot from the terminal
  4. A pop-up appears with the message ‘Copilot’ was blocked to protect your Mac…

Expected behavior

Copilot should launch normally on managed Macs when signed with a valid Apple Developer ID and notarized, satisfying the “App Store & Known Developers” requirement.

Additional context

Mac OS: Sequoia 15.7.3 Shell: Zsh Terminal: Ghostty

Image Image Image Image

jdesulme avatar Jan 14 '26 22:01 jdesulme

This is a huge pain, so after every version update, I created a function that clears it each time the CLI is updated.

function removeCopilotQuarantine(){
for f in /opt/homebrew/Caskroom/copilot-cli/*/copilot; do
  [[ -e $f ]] || continue
  # Check if attribute present
  if xattr -p com.apple.quarantine "$f" >/dev/null 2>&1; then
    # Try removing without sudo first, fall back to sudo
    if xattr -d com.apple.quarantine "$f" 2>/dev/null; then
      echo "Removed quarantine from: $f (no sudo)"
    else
      echo "Permission denied; retrying with sudo for: $f"
      sudo xattr -d com.apple.quarantine -- "$f" && echo "Removed quarantine from: $f (with sudo)"
    fi
  else
    echo "No com.apple.quarantine on: $f"
  fi
done
}

jdesulme avatar Mar 04 '26 19:03 jdesulme

copilot does not open anymore since v1 on Mac OS :/

rxe2fe avatar Mar 08 '26 17:03 rxe2fe

What is the method to cause it to provide the button "open anyway"?

I am getting stung by this and I didn't install it via homebrew but just gh copilot install and so I'm not sure where the copilot binary is 🤔

justinmchase avatar Mar 18 '26 16:03 justinmchase

@justinmchase you need to go to Settings > Privacy and Security, scroll down where you should find the option to Allow Anyway. On the next run, you'll see the Open Anyway option.

Settings - privacy and security
Before After
before after

msrutek-paylocity avatar Mar 25 '26 08:03 msrutek-paylocity

I figured out that gh copilot just wraps the copilot command so simply doing which copilot works for locating the binary and the above xattr script works to unblock it.

justinmchase avatar Mar 25 '26 12:03 justinmchase

Bumping this issue. It's still a problem under v1+ and MacOS Tahoe. Also, overriding via "allow anyway" is not a solution: lots of companies do not allow this. The only real solution is for Github to get the app signed properly.

JamesCatt avatar Jul 08 '26 16:07 JamesCatt

It's also a pain when installed through homebrew as the formula started including shell completion setup which invokes the copilot cli but fails due to gatekeeper. And homebrew 6 removed all gatekeeper workarounds.

SC-CTS avatar Jul 09 '26 11:07 SC-CTS

We found that we need to add an SSL Bypass rule to our corporate proxy for api.apple-cloudkit.com. It was presenting a different certificate, which blocked the connectivity check when it tried to validate the app. Once we added the rule, it went away and installed normally. Details on apple URLs: https://support.apple.com/en-us/101555#appscontent

jdesulme avatar Oct 12 '26 15:10 jdesulme