build: override unnecessary permissions #970
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, a bunch of unnecessary permissions end up in the macOS
Info.plist
file, in particular theseAfter some googling, there is a (not very well documented) way to override these.
Below is the before and after of this change. From my local testing,
Play Sound
events still happenBefore
``` CFBundleDisplayName Gitify CFBundleExecutable Gitify CFBundleIconFile icon.icns CFBundleIdentifier com.electron.gitify CFBundleInfoDictionaryVersion 6.0 CFBundleName Gitify CFBundlePackageType APPL CFBundleShortVersionString 5.2.0 CFBundleVersion 5.2.0 DTCompiler com.apple.compilers.llvm.clang.1_0 DTSDKBuild 23A334 DTSDKName macosx14.0 DTXcode 1501 DTXcodeBuild 15A507 LSApplicationCategoryType public.app-category.developer-tools LSEnvironment MallocNanoZone 0 LSMinimumSystemVersion 10.15 NSAppTransportSecurity NSAllowsArbitraryLoads NSAllowsLocalNetworking NSExceptionDomains 127.0.0.1 NSIncludesSubdomains NSTemporaryExceptionAllowsInsecureHTTPLoads NSTemporaryExceptionAllowsInsecureHTTPSLoads NSTemporaryExceptionMinimumTLSVersion 1.0 NSTemporaryExceptionRequiresForwardSecrecy localhost NSIncludesSubdomains NSTemporaryExceptionAllowsInsecureHTTPLoads NSTemporaryExceptionAllowsInsecureHTTPSLoads NSTemporaryExceptionMinimumTLSVersion 1.0 NSTemporaryExceptionRequiresForwardSecrecy NSBluetoothAlwaysUsageDescription This app needs access to Bluetooth NSBluetoothPeripheralUsageDescription This app needs access to Bluetooth NSCameraUsageDescription This app needs access to the camera NSHighResolutionCapable NSHumanReadableCopyright Copyright © 2024 Emmanouil Konstantinidis NSMainNibFile MainMenu NSMicrophoneUsageDescription This app needs access to the microphone NSPrincipalClass AtomApplication NSQuitAlwaysKeepsWindows NSRequiresAquaSystemAppearance NSSupportsAutomaticGraphicsSwitching ElectronAsarIntegrity Resources/app.asar algorithm SHA256 hash 2456016e24de91be53df536330a32198bfa17aefb0528cd708a08e854ee56948 ```After
``` CFBundleDisplayName Gitify CFBundleExecutable Gitify CFBundleIconFile icon.icns CFBundleIdentifier com.electron.gitify CFBundleInfoDictionaryVersion 6.0 CFBundleName Gitify CFBundlePackageType APPL CFBundleShortVersionString 5.2.0 CFBundleVersion 5.2.0 DTCompiler com.apple.compilers.llvm.clang.1_0 DTSDKBuild 23A334 DTSDKName macosx14.0 DTXcode 1501 DTXcodeBuild 15A507 LSApplicationCategoryType public.app-category.developer-tools LSEnvironment MallocNanoZone 0 LSMinimumSystemVersion 10.15 NSAppTransportSecurity NSAllowsArbitraryLoads NSAllowsLocalNetworking NSExceptionDomains 127.0.0.1 NSIncludesSubdomains NSTemporaryExceptionAllowsInsecureHTTPLoads NSTemporaryExceptionAllowsInsecureHTTPSLoads NSTemporaryExceptionMinimumTLSVersion 1.0 NSTemporaryExceptionRequiresForwardSecrecy localhost NSIncludesSubdomains NSTemporaryExceptionAllowsInsecureHTTPLoads NSTemporaryExceptionAllowsInsecureHTTPSLoads NSTemporaryExceptionMinimumTLSVersion 1.0 NSTemporaryExceptionRequiresForwardSecrecy NSHighResolutionCapable NSHumanReadableCopyright Copyright © 2024 Emmanouil Konstantinidis NSMainNibFile MainMenu NSPrincipalClass AtomApplication NSQuitAlwaysKeepsWindows NSRequiresAquaSystemAppearance NSSupportsAutomaticGraphicsSwitching ElectronAsarIntegrity Resources/app.asar algorithm SHA256 hash 1c45b1214edc4ab7c477bda7406d3f55b5d22dd9c602c0726c428f6572a06401 ```