Open
Description
Issue
When running the package you get a message like this
"powershell-7.0.0-preview.5-osx-x64.pkg" can't be opened because Apple cannot check it for malicious software.
Workaround - Finder
- Click Ok in the dialog.
- Find the package in Finder.
- Control Click (click while holding the
ctrt
key) on the package icon. - Click open on the context menu that comes up.
Workaround - Command Line
- run
sudo xattr -rd com.apple.quarantine <path to package>
, replace<path to package>
with the actual path to the.pkg
file. - Then install the package as you normally would.
Required changes
1. Opt-in to use runtime hardening when developing your app.
a. Insert the following key by editing your info.plist: CSFlags of type int, 65536 is the hardening value
<key>CSFlags>
<integer>65536</integer>
i. Create entitlements file
ii. Pass a directive to codesign with entitlements file
Same entitlements file and syntax are used for both hardening and sandboxing but they are orthogonal to each other.