Skip to content

7.1.0

Latest

Choose a tag to compare

@trufae trufae released this 20 Nov 17:18
· 6 commits to master since this release

Bug fixes, safer temp directories and secrets handling.

Breaking

  • Tool path overrides are now prefixed: APPLESIGN_UNZIP, APPLESIGN_ZIP, APPLESIGN_LDID, APPLESIGN_OPENSSL.. (the unprefixed names from 7.0.0 clashed with zip/unzip's own env vars).

Security

  • Never remove the directory passed to -T, work in a unique subdirectory of it.
  • Stop passing the p12 password to ldid in argv.
  • Refuse a symlinked embedded.mobileprovision before copying it.

Fixes

  • --bundleid now renames app extension and watch app bundle ids too.
  • Warn when the bundle id doesn't match the provisioning app-id, and check that -i is one of the -m certificates (#76).
  • Deep merge the -N entitlements instead of replacing keys.
  • Fix -A, -z, -C, -S, -r and --osversion (#77).
  • Write the resigned IPA next to the input file.
  • --without-signing-files removes the SC_Info directories (#64) and skips directories.
  • Resolve @loader_path from the loading file and match @rpath exactly.
  • Fix nested app signing and codesign verification with --parallel.
  • Fix XCTest stripping: match relative paths, delete emptied directories, don't follow a symlinked PlugIns.
  • Reject instead of crashing when a tool can't be spawned.
  • Depend on the npm plist release instead of the GitHub fork (#184).
  • Document that only the Procursus ldid is supported.

Full changelog: 7.0.1...7.1.0

Compared with 6.0.0:

Release notes: 6.0.0 → 7.1.0

Covers the changes between 6.0.0 and 7.1.0, including 7.0.0 and 7.0.1.
The version that first shipped each change is shown in brackets.
Items marked [SECURITY] affect the safety of signing untrusted IPAs or of the host running applesign.

Security

Before 7.0.0, applesign trusted paths taken from the IPA. A crafted IPA could make it re-sign, modify or overwrite files outside the app bundle. Upgrade if you sign IPAs from untrusted sources. See applesign-ADVISORY.md.

  • [SECURITY] Validate CFBundleExecutable for the main app and its app extensions. Names with path separators, NUL, . or .. are rejected, and the resolved real path must stay inside the .app. Before this, a crafted IPA could get host binaries signed, or with -I patched, outside the bundle (CWE-22/CWE-59). [7.0.0]
  • [SECURITY] Apply the same validation to getExecutable(). This also covers checkProvision(), so --self-sign-provision can no longer read entitlements from a binary outside the bundle. [7.0.0]
  • [SECURITY] Every bundle signing target must resolve inside the app directory before it reaches codesign. This holds in serial, --parallel and app extension signing, so a regression in discovery can't sign an external file. [7.0.0]
  • [SECURITY] Reject a Payload/*.app that is a symlink. Refuse to read or write Info.plist, embedded.mobileprovision, .entitlements files and injected libraries through a symlink planted in the bundle. [7.0.0]
  • [SECURITY] The bundle walker never follows symlinked directories (@nodelib/fs.walk replaces the old fs-walk fork), so a walk can't leave the bundle or loop forever. [7.0.0]
  • [SECURITY] Ignore dependency libraries that resolve outside the app bundle. Untrusted load commands using @executable_path/../, relative install names or symlinks could otherwise get external files signed. [7.0.0]
  • [SECURITY] Never remove the directory passed to -T. It was used as the work directory itself, and cleanup removed it recursively, so -T ~/Documents wiped it. applesign now works in a unique subdirectory. [7.1.0]
  • [SECURITY] Refuse a symlinked embedded.mobileprovision before copying it. After the move to node:fs, copyFileSync followed a planted symlink and overwrote its target with the profile. [7.1.0]
  • [SECURITY] With -p, don't move XCTests out of a symlinked PlugIns directory. Before, the *.xctest entries were moved from wherever the symlink pointed into the app. [7.1.0]
  • [SECURITY] Stop passing the .p12 password to ldid on the command line, where any local user could read it with ps. openssl reads it from the environment and re-exports the key without a password into a private temporary directory that is removed on exit. [7.1.0]
  • [SECURITY] Remove the directories under the XCTest exclusion by their path relative to the app. Before, an app under a path containing xctest (for example ~/xctest-builds/), or named XCTestHost.app, was deleted entirely. [7.1.0]
  • [SECURITY] Replace rimraf with fs.promises.rm. rimraf 3 expanded glob patterns in the path, and fs.rm removes the path literally. [7.0.0]
  • [SECURITY] Dependency audit fixes: js-yaml 4.1.1, brace-expansion 1.1.13, minimatch 3.1.5, picomatch 2.3.2, npm 10.9.8, plus npm audit fix. Archived or flagged packages were removed (pkg, mocha, uuid, colors, fs-extra, rimraf, minimist, uniq, simple-plist). [7.0.0]

New features

  • Linux support: passing a .p12 file to -i signs with the Procursus ldid, using the APPLESIGN_P12_PASSWORD environment variable. Main executables are shallow-signed as their bundle so resources are sealed like codesign does. Off macOS, the mobileprovision is decoded with openssl -noverify, so Apple's root CA does not need to be installed. [7.0.0]
  • Prebuilt standalone binaries: the CLI is shipped as a Node.js single executable application, built with esbuild and node --build-sea (scripts/dist.sh), and ad-hoc signed on macOS. [7.0.0]
  • Every external tool can be overridden with an APPLESIGN_<TOOL> environment variable: APPLESIGN_UNZIP, APPLESIGN_ZIP, APPLESIGN_LDID, APPLESIGN_OPENSSL and so on. [7.1.0]
  • --bundleid also renames the bundle ids of app extensions and watch apps, keeping each suffix (com.old.app.share → com.new.app.share). It also updates WKCompanionAppBundleIdentifier and WKAppBundleIdentifier. Before, -b broke every IPA with PlugIns/*.appex (#167). [7.1.0]
  • --without-signing-files also removes the FairPlay SC_Info directories (#64). [7.1.0]
  • --osversion also updates DTPlatformVersion when it is present (#77). [7.1.0]
  • Fail early when the -i identity is not one of the -m provisioning certificates, because iOS would refuse to install the app (#76). [7.1.0]
  • Warn when CFBundleIdentifier doesn't match the provisioning application-identifier. [7.1.0]
  • --run / -R hooks are loaded with import(), so both CommonJS and ESM hooks work. [7.0.0]

Behaviour changes

  • Node.js >= 22.22 is required. CI runs on Node 22 and 24, and the SEA is built with Node 26. [7.0.0]
  • Command line parsing uses node:util parseArgs. Unknown options are now an error instead of being silently ignored. This includes the undocumented spellings --entitlement, --self-signed-provision and --deviceProvision. [7.0.0]
  • Documented options that were silently ignored before now work: -T, --entitlements, --self-sign-provision, --device-provision and --no-entitlements-file. [7.0.0]
  • The tool overrides are prefixed with APPLESIGN_. The unprefixed UNZIP, LDID… names from 7.0.0 are gone, because unzip and zip read UNZIP and ZIP as default options. [7.1.0]
  • -i is no longer resolved through security when given, because the result was unused and the call fails on Linux. [7.0.0]
  • Without APPLESIGN_P12_PASSWORD, ldid prompts for the password instead of receiving an empty -U. [7.1.0]
  • The resigned IPA is written next to the input file, and the CLI prints its full path. Before, with -T DIR it landed inside DIR. [7.1.0]
  • With -r, the CLI prints the replaced input file as the output. [7.1.0]
  • -N entitlements are deep merged: arrays are unioned and dicts are merged recursively, so adding a keychain group or app group no longer drops the existing ones. [7.1.0]
  • With --parallel, nested apps (for example Watch/W.app) are only signed. Library injection and Info.plist changes stay on the main app. [7.1.0]
  • -C only applies to -S, and the help says so. [7.1.0]
  • Only the Procursus ldid is supported. The README documents how to install it with brew. [7.1.0]

Improvements

  • Dependencies were replaced with Node built-ins: colors → util.styleText, fs-extra → node:fs, rimraf → fs.rm, uuid → crypto.randomUUID, minimist → parseArgs, mocha → node:test, pkg → SEA. uniq was removed. [7.0.0]
  • simple-plist was replaced with plist 5, which parses binary plists natively. 4- and 8-byte binary integers now match plutil, where large values used to be misread as negative or truncated. 16-byte integers are handled until TooTallNate/plist.js#192 ships. The package depends on the npm release again instead of a GitHub fork (#184). [7.0.0 / 7.1.0]
  • Upgraded to TypeScript 7, with bundler module resolution. ts-node was dropped, and the tests run with Node's native type stripping. [7.0.0]
  • Other upgrades: which 7, macho 1.5, @types/node 22 (pinned to the minimum Node version). [7.0.0]
  • npm packaging is fixed: the CLI path is correct, the build runs before packing, and all type declarations are shipped (#185). [7.0.0]
  • Concurrent Applesign instances no longer share use7zip and useOpenSSL through module globals. [7.1.0]
  • App directory resolution no longer relies on implicit state. The runtime fchk argument checks were replaced by strict TypeScript types. Unused code was removed: filterLibraries, the macho-mangle branch, stale TODOs. [7.0.0 / 7.1.0]
  • Tests were added for symlinked extensions outside the bundle and for apps under paths containing xctest. [7.0.0 / 7.1.0]

Bug fixes

  • --verify --parallel now runs codesign verification. Before, it mapped the libraries to the function without calling it, so nothing was verified. [7.1.0]
  • --parallel signs nested apps in their own directory. Before, it re-signed the main app and never signed the nested one. [7.1.0]
  • Nested apps are detected relative to the app directory. An app under a directory like Old.app/ was taken as nested in itself, so its frameworks were skipped and the binary was signed twice. [7.1.0]
  • @loader_path is resolved from the loading file instead of the main executable, and @rpath matches by path suffix instead of substring. Libraries that used to be left unsigned or resolved to the wrong file are now handled correctly. [7.1.0]
  • Stripping XCTests deletes the directories it leaves empty, because an empty .framework made the IPA fail to install. It no longer aborts with EPERM on directories (#169). [7.1.0]
  • --without-signing-files skips directories named like *.entitlements instead of aborting with EPERM. [7.1.0]
  • -S keeps the self-signed provision. Before, it was overwritten by a copy of the original profile. [7.1.0]
  • -A works: only Payload/ is archived unless -A is given. -z ignores unzip errors again. [7.1.0]
  • A missing or misconfigured tool rejects with an error instead of crashing the process with an unhandled spawn ENOENT. [7.1.0]
  • require() calls in ESM code always failed and were removed. --run .js hooks work again. [7.0.0]
  • The .entitlements file is written with the entitlements content instead of the temporary file path. [7.0.0]
  • zipIPA awaits fs.rename, and unlink error handling is narrower. An unreachable workdir check in unzipIPA was removed. [7.0.0]
  • Node 22 CI installs were fixed. [7.0.1]