;;; Copyright (c) 2021 Apple Inc. All Rights reserved. (version 1) (deny default) (deny file-map-executable process-info* nvram*) (deny dynamic-code-generation) (deny mach-priv-host-port) (import "system.sb") (import "com.apple.corefoundation.sb") (corefoundation) ;;; Homedir-relative path filters (define (home-regex home-relative-regex) (regex (string-append "^" (regex-quote (param "HOME")) home-relative-regex))) (define (home-subpath home-relative-subpath) (subpath (string-append (param "HOME") home-relative-subpath))) (allow file-read* (home-subpath "/Library/UnifiedAssetFramework/") (literal "/private/var/db/eligibilityd/eligibility.plist") ) (allow file-read* file-write* (subpath "/private/var/db/com.apple.modelcatalog/") ) (define (home-prefix home-relative-prefix) (prefix (string-append (param "HOME") home-relative-prefix))) (define (home-literal home-relative-literal) (literal (string-append (param "HOME") home-relative-literal))) (allow process-info* (target self)) (allow process-info-dirtycontrol (target self)) ;; For resolving symlinks, realpath(3), and equivalents. (allow file-read-metadata) ;; For validating the entitlements of clients. (allow process-info-codesignature) ;; Your preference domain (allow user-preference-read user-preference-write (preference-domain "com.apple.modelcatalog") (preference-domain "com.apple.modelcatalog.ajax")) (allow user-preference-read (preference-domain "com.apple.UnifiedAssetFramework") (preference-domain "kCFPreferencesAnyApplication") (preference-domain "com.apple.CloudSubscriptionFeatures.gmBypass") (preference-domain "com.apple.spatialphotosrelive") (preference-domain "com.apple.MobileSMS")) (allow managed-preference-read (preference-domain "kCFPreferencesAnyApplication")) (allow mach-lookup (global-name "com.apple.modelmanager") (global-name "com.apple.modelcatalog.catalog") (global-name "com.apple.siri.uaf.service") (global-name "com.apple.mobileasset.autoasset") (global-name "com.apple.mobileassetd.v2") (global-name "com.apple.duetactivityscheduler") (global-name "com.apple.SystemConfiguration.configd") (global-name "com.apple.biome.access.user") (global-name "com.apple.biome.access.system") (global-name "com.apple.biome.compute.publisher.service") (global-name "com.apple.biome.compute.publisher.service.user") (global-name "com.apple.biome.compute.source") (global-name "com.apple.biome.compute.source.user") (global-name "com.apple.system.opendirectoryd.api") (global-name "com.apple.siri.uaf.subscription.service") (global-name "com.apple.coreservices.launchservicesd") ) (allow iokit-open (iokit-user-client-class "AppleKeyStoreUserClient")) ;; Read/write access to a temporary directory. (allow file-read* file-write* (subpath (param "TMPDIR")) (subpath (param "DARWIN_CACHE_DIR")) (mount-relative-literal "/.TemporaryItems") (mount-relative-regex #"^/\.TemporaryItems/folders.[0-9]+(/|$)")) ;; Allow read of AppleIntelligencePlatform availability secure check (allow file-read* (subpath "/private/var/db/AppleIntelligencePlatform") ) ;; Allow read of UAF subscription db (allow file-read* (subpath "/private/var/db/assetsubscriptiond") ) ;; Allow issuing extensions to cfprefsd for AppleIntelligencePlatform availability secure check (allow file-issue-extension (require-all (extension-class "com.apple.cfprefsd.read-write") (subpath "/private/var/db/AppleIntelligencePlatform") ) (require-all (extension-class "com.apple.cfprefsd.read") (subpath "/private/var/db/AppleIntelligencePlatform") ) ) ;; Allow read-only access to $HOME/Library/Trial (allow file-read* (home-subpath "/Library/Trial"))