diff --git a/build/macosx/hardenedruntime/developer.entitlements.xml b/build/macosx/hardenedruntime/v1/developer/browser.xml similarity index 100% rename from build/macosx/hardenedruntime/developer.entitlements.xml rename to build/macosx/hardenedruntime/v1/developer/browser.xml diff --git a/build/macosx/hardenedruntime/production.entitlements.xml b/build/macosx/hardenedruntime/v1/production/browser.xml similarity index 100% rename from build/macosx/hardenedruntime/production.entitlements.xml rename to build/macosx/hardenedruntime/v1/production/browser.xml diff --git a/build/macosx/hardenedruntime/v2/developer/browser.xml b/build/macosx/hardenedruntime/v2/developer/browser.xml new file mode 100644 index 0000000000..81f280065f --- /dev/null +++ b/build/macosx/hardenedruntime/v2/developer/browser.xml @@ -0,0 +1,37 @@ + + + + + + + com.apple.security.cs.allow-unsigned-executable-memory + + + com.apple.security.cs.allow-jit + + + com.apple.security.cs.disable-library-validation + + + com.apple.security.cs.allow-dyld-environment-variables + + + com.apple.security.get-task-allow + + + com.apple.security.device.audio-input + + + com.apple.security.device.camera + + + com.apple.security.personal-information.location + + + com.apple.security.smartcard + + diff --git a/build/macosx/hardenedruntime/v2/developer/media-plugin-helper.xml b/build/macosx/hardenedruntime/v2/developer/media-plugin-helper.xml new file mode 100644 index 0000000000..86d376d87c --- /dev/null +++ b/build/macosx/hardenedruntime/v2/developer/media-plugin-helper.xml @@ -0,0 +1,18 @@ + + + + + + + com.apple.security.cs.disable-library-validation + + + com.apple.security.cs.allow-dyld-environment-variables + + + com.apple.security.get-task-allow + + diff --git a/build/macosx/hardenedruntime/v2/developer/plugin-container.xml b/build/macosx/hardenedruntime/v2/developer/plugin-container.xml new file mode 100644 index 0000000000..33c2c9f2af --- /dev/null +++ b/build/macosx/hardenedruntime/v2/developer/plugin-container.xml @@ -0,0 +1,25 @@ + + + + + + + com.apple.security.cs.allow-unsigned-executable-memory + + + com.apple.security.cs.allow-jit + + + com.apple.security.cs.allow-dyld-environment-variables + + + com.apple.security.get-task-allow + + + com.apple.security.cs.disable-library-validation + + diff --git a/build/macosx/hardenedruntime/v2/developer/utility.xml b/build/macosx/hardenedruntime/v2/developer/utility.xml new file mode 100644 index 0000000000..3c4f73e80b --- /dev/null +++ b/build/macosx/hardenedruntime/v2/developer/utility.xml @@ -0,0 +1,20 @@ + + + + + + + com.apple.security.cs.allow-dyld-environment-variables + + + com.apple.security.get-task-allow + + + com.apple.security.cs.disable-library-validation + + diff --git a/build/macosx/hardenedruntime/v2/production/browser.xml b/build/macosx/hardenedruntime/v2/production/browser.xml new file mode 100644 index 0000000000..d149595309 --- /dev/null +++ b/build/macosx/hardenedruntime/v2/production/browser.xml @@ -0,0 +1,27 @@ + + + + + + + com.apple.security.cs.allow-unsigned-executable-memory + + + com.apple.security.cs.allow-jit + + + com.apple.security.device.audio-input + + + com.apple.security.device.camera + + + com.apple.security.personal-information.location + + + com.apple.security.smartcard + + diff --git a/build/macosx/hardenedruntime/v2/production/media-plugin-helper.xml b/build/macosx/hardenedruntime/v2/production/media-plugin-helper.xml new file mode 100644 index 0000000000..8ea97fc742 --- /dev/null +++ b/build/macosx/hardenedruntime/v2/production/media-plugin-helper.xml @@ -0,0 +1,12 @@ + + + + + + + com.apple.security.cs.disable-library-validation + + diff --git a/build/macosx/hardenedruntime/v2/production/plugin-container.xml b/build/macosx/hardenedruntime/v2/production/plugin-container.xml new file mode 100644 index 0000000000..0d911c979c --- /dev/null +++ b/build/macosx/hardenedruntime/v2/production/plugin-container.xml @@ -0,0 +1,15 @@ + + + + + + + com.apple.security.cs.allow-unsigned-executable-memory + + + com.apple.security.cs.allow-jit + + diff --git a/taskcluster/ci/config.yml b/taskcluster/ci/config.yml index b38342dc9d..9c5334d4e2 100644 --- a/taskcluster/ci/config.yml +++ b/taskcluster/ci/config.yml @@ -295,8 +295,8 @@ mac-notarization: by-platform: macosx64.*: by-release-level: - production: comm/build/macosx/hardenedruntime/production.entitlements.xml - default: comm/build/macosx/hardenedruntime/developer.entitlements.xml + production: comm/build/macosx/hardenedruntime/v1/production/browser.xml + default: comm/build/macosx/hardenedruntime/v1/developer/browser.xml default: '' mac-requirements: by-platform: @@ -310,18 +310,85 @@ mac-signing: - deep: false runtime: true force: true - entitlements: comm/build/macosx/hardenedruntime/production.entitlements.xml + entitlements: comm/build/macosx/hardenedruntime/v2/production/plugin-container.xml + globs: + - "/Contents/MacOS/plugin-container.app" + + - deep: false + runtime: true + force: true + entitlements: comm/build/macosx/hardenedruntime/v2/production/media-plugin-helper.xml + globs: + - "/Contents/MacOS/media-plugin-helper.app" + + - deep: false + runtime: true + force: true + # These files are signed without entitlements + globs: + - "/Contents/MacOS/crashreporter.app" + - "/Contents/MacOS/updater.app" + - "/Contents/Library/LaunchServices/org.mozilla.updater" + - "/Contents/Library/Spotlight/thunderbird.mdimporter" + - "/Contents/MacOS/XUL" + - "/Contents/MacOS/pingsender" + - "/Contents/MacOS/minidump-analyzer" + - "/Contents/MacOS/*.dylib" + - "/Contents/MacOS/rnp-cli" + - "/Contents/MacOS/rnpkeys" + + - deep: false + runtime: true + force: true + entitlements: comm/build/macosx/hardenedruntime/v2/production/browser.xml globs: - "/Contents/MacOS/thunderbird-bin" - - "/" + - "/" # The .app + default: - deep: false runtime: true force: true - entitlements: comm/build/macosx/hardenedruntime/developer.entitlements.xml + entitlements: comm/build/macosx/hardenedruntime/v2/developer/plugin-container.xml + globs: + - "/Contents/MacOS/plugin-container.app" + + - deep: false + runtime: true + force: true + entitlements: comm/build/macosx/hardenedruntime/v2/developer/media-plugin-helper.xml + globs: + - "/Contents/MacOS/media-plugin-helper.app" + + - deep: false + runtime: true + force: true + entitlements: comm/build/macosx/hardenedruntime/v2/developer/utility.xml + globs: + - "/Contents/MacOS/crashreporter.app" + - "/Contents/MacOS/updater.app" + - "/Contents/Library/LaunchServices/org.mozilla.updater" + - "/Contents/Library/Spotlight/thunderbird.mdimporter" + - "/Contents/MacOS/pingsender" + - "/Contents/MacOS/minidump-analyzer" + - "/Contents/MacOS/rnp-cli" + - "/Contents/MacOS/rnpkeys" + + - deep: false + runtime: true + force: true + # These files are signed without entitlements + globs: + - "/Contents/MacOS/XUL" + - "/Contents/MacOS/*.dylib" + + - deep: false + runtime: true + force: true + entitlements: comm/build/macosx/hardenedruntime/v2/developer/browser.xml globs: - "/Contents/MacOS/thunderbird-bin" - - "/" + - "/" # The .app expiration-policy: by-project: diff --git a/tools/lint/license.yml b/tools/lint/license.yml index 255d06595a..f83eedb073 100644 --- a/tools/lint/license.yml +++ b/tools/lint/license.yml @@ -5,8 +5,15 @@ license: - comm/ exclude: # By design - - comm/build/macosx/hardenedruntime/developer.entitlements.xml - - comm/build/macosx/hardenedruntime/production.entitlements.xml + - comm/build/macosx/hardenedruntime/v1/developer/browser.xml + - comm/build/macosx/hardenedruntime/v1/production/browser.xml + - comm/build/macosx/hardenedruntime/v2/developer/browser.xml + - comm/build/macosx/hardenedruntime/v2/developer/media-plugin-helper.xml + - comm/build/macosx/hardenedruntime/v2/developer/plugin-container.xml + - comm/build/macosx/hardenedruntime/v2/developer/utility.xml + - comm/build/macosx/hardenedruntime/v2/production/browser.xml + - comm/build/macosx/hardenedruntime/v2/production/media-plugin-helper.xml + - comm/build/macosx/hardenedruntime/v2/production/plugin-container.xml # License not super clear, Firefox excludes its branding - comm/mail/branding/ # Mostly empty file