What should be enabled for Enhanced Security?

I am not very well versed in this area, so I would appreciate some guidance on what should be enabled or disabled. My app is an AppKit app. I have read the documentation and watched the video, but I find it hard to understand.

When I added the Enhanced Security capability in Xcode, the following options were enabled automatically:

Memory Safety

  • Enable Enhanced Security Typed Allocator

Runtime Protections

  • Enable Additional Runtime Platform Restrictions
  • Authenticate Pointers
  • Enable Read-only Platform Memory

The following options were disabled by default:

Memory Safety

  • Enable Hardware Memory Tagging
    • Memory Tag Pure Data
    • Prevent Receiving Tagged Memory
    • Enable Soft Mode for Memory Tagging

Should I enable these options? Is there anything I should consider disabling?

Answered by DTS Engineer in 876406022

A good place to start here is Enabling enhanced security for your app.

The only one of these settings that actively reduces security is Enable Soft Mode for Memory Tagging. However, that currently has no effect because our shipping systems run all third-party apps is soft mode regardless of that setting. See this thread for more about that.

Be aware that certain settings can cause problems with deploying to systems prior to xyzOS 26.0. We’ve fixed this in Xcode 26.4 beta. See the Xcode 26.4 Beta Release Notes for more (search for 168185600).

But, generally, my general advice is that you enable all the extra stuff and then only disable something if it causes problems that you can’t otherwise resolve.

Finally, there are a couple of upcoming Meet with Apple sessions focused on security, and those are a great opportunity to learn more about this. See here.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

A good place to start here is Enabling enhanced security for your app.

The only one of these settings that actively reduces security is Enable Soft Mode for Memory Tagging. However, that currently has no effect because our shipping systems run all third-party apps is soft mode regardless of that setting. See this thread for more about that.

Be aware that certain settings can cause problems with deploying to systems prior to xyzOS 26.0. We’ve fixed this in Xcode 26.4 beta. See the Xcode 26.4 Beta Release Notes for more (search for 168185600).

But, generally, my general advice is that you enable all the extra stuff and then only disable something if it causes problems that you can’t otherwise resolve.

Finally, there are a couple of upcoming Meet with Apple sessions focused on security, and those are a great opportunity to learn more about this. See here.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thanks @DTS Engineer,

I have already read that documentation. You advised that I should enable all the settings.

However, I noticed that for Memory Tag Pure Data, the description states that “it may incur a performance overhead”. I am therefore inclined not to enable it.

Regarding Enable Soft Mode for Memory Tagging, the description states that “memory tagging faults will not crash and will be logged instead”. I am inclined to leave this disabled, as I would prefer the application to crash so that I can receive a crash report and potentially fix the issue. I am not entirely sure what is meant by logging in this context, would this appear in the Xcode console when running in Debug mode?

As you are knowledgeable about AppKit and Mac computers, may I ask if you would mind looking at my other post about StoreKit 2? I am at my wits’ end, as I would like to ship the Cocoa app using the API but cannot because it is not behaving as expected. I am tempted to submit a code-level support request for this.

You advised that I should enable all the settings.

Well, yes, if you read that one sentence in isolation. However, I made it clear that one specific setting, Enable Soft Mode for Memory Tagging, reduces security, so if you goal is security then enabling that is probably not a good choice (-:

I am therefore inclined not to enable it.

Or you could profile your app and see if it makes a difference in pratice. That’s generally the best way to approach performance trade-offs.

I am not entirely sure what is meant by logging in [Soft Mode]

Quoting Enabling enhanced security for your app:

This entitlement makes hardware memory tagging operate in soft mode, where the system produces a simulated crash instead of terminating the app if a pointer’s tag doesn’t match the memory allocation’s tag.

I believe that for App Store apps these simulated crash reports will be delivered in Xcode’s organiser. You might also get them via MetricKit (something I really should test, but I’ve no time for that today).

While debugging in Xcode I recommend that you set Diagnostics > Hardware Memory Tagging in your scheme. That’ll force these problems to crash regardless of whether a) you have soft mode enabled, or b) you’re running on xyzOS 26.n, n < 4, which otherwise forces soft mode for third-party programs.

Keep in mind that all the stuff under Enable Hardware Memory Tagging requires a CPU that supports memory tagging, which currently means an A19 or M5. If you’re not able to test on such a machine, you should think carefully about enabling hard mode. For example, it might make sense to enable it for the builds that you send to beta testers but not for your final customer build.


would mind looking at my other post about StoreKit 2?

StoreKit is not within my area of expertise.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

What should be enabled for Enhanced Security?
 
 
Q