Apple added a new build setting to Xcode last year, ENABLE_USER_SCRIPT_SANDBOXING, which controls whether any "Run Script" build phases will be run in a sandbox or not. From the Xcode 14 Release Notes:You can now enable sandboxing for shell script build phases using the ENABLE_USER_SCRIPT_SANDBOX