techouse / alfred-gitmoji

Search for Gitmojis using Alfred
https://gitmoji.dev
MIT License
26 stars 0 forks source link

"gm" can't be opened because Apple cannot check it for malicious software #1

Closed loranger closed 2 years ago

loranger commented 2 years ago

I met an issue with the workflow:

Once installed, as soon as I try it, I get a MacOS exception regarding the developer verification

verification

I had to go to the Security & Privacy pane of the System Preferences, then allow the gm execution

I triggered the workflow again, and I had to allow the script execution from the popup displayed.

Now everything works fine πŸ‘πŸ»

I opened this issue in order to give a clue for anyone having trouble with this useful workflow which was not working since python2 is deprecated on mac. Thank you so much @techouse for rewriting it using dart πŸ‘ŒπŸ»

techouse commented 2 years ago

Hi,

I'm aware of that issue https://github.com/dart-lang/sdk/issues/39106.

This feature is coming in Dart 2.17.0 https://github.com/dart-lang/sdk/commit/6ef426d7df7089c033078b2c24b5ab9c14d2dfb9

Once Dart 2.17.0 gets released I'll re-compile and sign the bins. For now, you'll need to allow the exception in your macOS's System Preferences -> Security & Privacy.

techouse commented 2 years ago

@loranger Dart 2.17.0 just got released yesterday, so I'll recompile and sign the binaries as soon as I can. πŸš€

techouse commented 2 years ago

@loranger v1.0.9 is now signed.

You can verify it with codesign if you wish 😊

loranger commented 2 years ago

Thanks, but I'm afraid you won't like it…

https://user-images.githubusercontent.com/6014/168235916-3e0a746d-f65a-42f8-8323-2d08c90cd234.mp4

techouse commented 2 years ago

Every app downloaded from a non-Apple server will say that. Now it at least won't nag about the thing being unsigned and forcing you to go to you Mac's security setting and making an exception.

loranger commented 2 years ago

That's what I did, and everything works fine (as it used to πŸ‘ŒπŸ»)

techouse commented 2 years ago

It's somewhat weird because the binary itself is signed. If you check the signature

cd /path/to/the/alfred/workflow/
codesign -dv --verbose=4 gm

It will print:

Executable=/path/to/the/alfred/workflow/gm
Identifier=com.techouse.alfred-gitmoji
Format=Mach-O thin (x86_64)
CodeDirectory v=20400 size=44415 flags=0x0(none) hashes=1382+2 location=embedded
VersionPlatform=1
VersionMin=658688
VersionSDK=721152
Hash type=sha256 size=32
CandidateCDHash sha256=06510b21c312d52d2c45f3aa800496ad68b532de
CandidateCDHashFull sha256=06510b21c312d52d2c45f3aa800496ad68b532de98934ae11d2dd59c15318e1c
Hash choices=sha256
CMSDigest=06510b21c312d52d2c45f3aa800496ad68b532de98934ae11d2dd59c15318e1c
CMSDigestType=2
Executable Segment base=0
Executable Segment limit=3784704
Executable Segment flags=0x1
Page size=4096
CDHash=06510b21c312d52d2c45f3aa800496ad68b532de
Signature size=9099
Authority=Apple Development: klemen.tusar@live.com (P4674Z4B9E)
Authority=Apple Worldwide Developer Relations Certification Authority
Authority=Apple Root CA
Timestamp=12 May 2022 at 21:26:51
Info.plist=not bound
TeamIdentifier=6LYC36B94Q
Sealed Resources=none
Internal requirements count=1 size=200

EDIT: Seems I'll have to carefully go through Apple's docs again and not just sign it but also notarize it. πŸ€ͺ

techouse commented 2 years ago

@loranger v1.1.0 is now properly signed and notarised.