Entitlement App Sandbox Disabled

ID

swift.entitlement_app_sandbox_disabled

Severity

high

Remediation Complexity

trivial

Remediation Risk

medium

Remediation Effort

medium

Resource

Misconfiguration

Language

Swift

Tags

ASVS50:v13.2.4, CWE:732, MASVS:MSTG-PLATFORM-1

Description

App Sandbox is the kernel-enforced confinement that macOS applies to a Mac process when the com.apple.security.app-sandbox entitlement is set. Apps distributed through the Mac App Store must run sandboxed; explicitly setting the key to false strips that confinement and grants the binary unrestricted access to the file system, network, and IPC primitives that the sandbox otherwise denies.

<key>com.apple.security.app-sandbox</key>  <!-- FLAW -->
<false/>

The rule only fires when the key is explicitly present and false. Plain absence means "not a sandboxed macOS target" (typical for iOS-only entitlements) and is not flagged.

Rationale

Disabling the sandbox is occasionally a deliberate choice for a developer tool that needs root-equivalent capabilities, but it is the single biggest reduction in macOS attack surface — a sandboxed app that compromises an attacker-controlled file cannot pivot the same way an unsandboxed one can.

Remediation

Remove the key (or set to true) and use the granular App Sandbox sub-entitlements (com.apple.security.network.client, com.apple.security.files.user-selected.read-write, …) to grant only the capabilities the app actually needs.

References