Why is the codesigned app still quarantined by macOS

applescriptcode-signinggatekeeper

I have a .app that is quarantined. But I am super confused – how can my .app be properly codesigned and yet still be quarantined by Apple? I have an app called iTest.app that I downloaded from my server and made sure that it was codesigned correctly but yet it is still quarantined? I thought that having a valid code signature was the whole point of getting past Gatekeeper?

MyMac-7:Downloads user$ ls -l@ iTest.app
total 0
drwxr-xr-x@ 7 user staff  238 Apr 21 08:05 Contents
com.apple.quarantine     67 

MyiMac-7:Downloads user$ codesign --verify --deep --strict -vvvvvvv 
iTest.app
iTest.app: valid on disk
iTest.app: satisfies its Designated Requirement

MyiMac-7:Downloads user$ spctl -a -t exec -vvvvvvv iTest.app
iTest.app: accepted
source=Developer ID
origin=Developer ID Application: myID

Best Answer

The com.apple.quarantine is an OS X feature, this happens every time you download from the internet : https://developer.apple.com/library/content/releasenotes/Carbon/RN-LaunchServices/index.html