macos: Support new Secure Config API's
With MacOS Sanoma, I get the following message for Gaphor (packaged as a macOS app):
... WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.
Implementing this interface method is supposed to fix a process injection vulnerability on macOS.
See also:
- https://developer.apple.com/documentation/appkit/nsapplicationdelegate/3762521-applicationsupportssecurerestora?language=objc
- https://sector7.computest.nl/post/2022-08-process-injection-breaking-all-macos-security-layers-with-a-single-vulnerability/
- https://stackoverflow.com/questions/77283578/sonoma-and-nsapplicationdelegate-applicationsupportssecurerestorablestate
Edited by Arjan Molenaar