Selecting Crashlytics inserts a downloaded script that runs during later builds
Source references: 2When a product name contains `FirebaseCrashlytics`, the tool adds a `/bin/sh` build phase that executes `Crashlytics/run` from the Firebase package checkout. That script's source is not included in the supplied material, so its full behavior cannot be verified here. The phase also declares the dSYM, executable, and GoogleService plist as readable inputs.
Later builds execute code from the resolved Firebase SDK with the developer's local privileges and expose application binaries, debug symbols, and configuration to it. A compromised dependency source or resolved version could therefore become a route to code execution or disclosure of build material.
When a product name contains `FirebaseCrashlytics`, the tool writes a `/bin/sh` build phase that will execute `Crashlytics/run` from the checked-out Firebase SDK during later builds. The phase declares dSYMs, the app executable, and the GoogleService plist as inputs. That script is absent from the supplied source, so its exact network or data-handling behavior cannot be verified here. A user can request documentation and pinning for Firebase, or restrict the phase's inputs and execution environment.
var inputPaths = [ "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}", "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${PRODUCT_NAME}", "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist", "$(TARGET_BUILD_DIR)/$(UNLOCALIZED_RESOURCES_FOLDER_PATH)/GoogleService-Info.plist", "$(TARGET_BUILD_DIR)/$(EXECUTABLE_PATH)" ] if isUserScriptSandboxingEnabled(project: project) { inputPaths.append("${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${PRODUCT_NAME}.debug.dylib") } let phase = PBXShellScriptBuildPhase( files: [], inputPaths: inputPaths, outputPaths: [], shellPath: "/bin/sh", shellScript: "\"${BUILD_DIR%/Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run\"\n", runOnlyForDeploymentPostprocessing: falseShow 1 other places
if products.contains(where: { $0.contains("FirebaseCrashlytics")}) { print("Setting the debug format to DWARF with dSYMs") setDwarfWithDsymDebugInformationFormat(project: pbxproj) print("Adding the Crashlytics Run Script Build phase") if !hasCrashlyticsRunScriptBuildPhase(project: pbxproj) { addCrashlyticsRunScriptBuildPhase(project: pbxproj) } else { print("Crashlytics Run Script Build phase already exists") } }