ci(signing): Linux tools for the DEV sign job (archive, plist, Sparkle key, signed-app checks)

Merged
TE
25d ago
+668-0

Second of three PRs that move cmux NEXT DEV signing off a Mac. This one adds only the Linux tools the switch needs, plus their tests. Nothing calls them yet:

  • #25390 is the signer;
  • the third PR switches cmux-next-dev-daily.yml.

Change

  • scripts/ci/dev_app_linux.py is the Linux stand-in for the macOS tools the sign job uses today:
    • unzip / zip replace ditto -x -k / ditto -c -k --keepParent. Unix modes are kept in external_attr, and symlinks (framework Versions/Current and top-level links) round-trip as S_IFLNK entries.
    • unzip creates links only after every file exists, so nothing is written through a link. It refuses absolute or .. entries and any link whose realpath leaves the destination, and drops AppleDouble data.
    • identity / stamp make the PlistBuddy edits through plistlib, keeping the plist's format.
    • sparkle-public-key ENV_NAME derives the Ed25519 public key from the base64 Sparkle private key in the named variable (a 32-byte seed, or the old 96-byte form). Only the variable's name is on argv. The seed reaches openssl pkey -pubout on stdin, and the result matches RFC 8032 test vector 1.
  • scripts/ci/verify_signed_dev_app.py makes the codesign -d checks the Mac signer used to make after signing, for the Mac verify job to run on the Linux-signed app:
    • every entitlement in the entitlements file present with the same value, and the four personal-information keys true;
    • no NetworkExtension entitlement and no SystemExtensions;
    • bin/cmux-tui and bin/acpmux links to cmux;
    • no application-identifier on Mach-O helpers or the Computer Use app;
    • Computer Use passing --verify --strict;
    • Developer ID plus the hardened runtime on the app and nested code.
  • scripts/ci/install-rcodesign.sh DEST installs the stock apple-codesign 0.29.0 x86_64 musl release. Its sha256, dbe85ced…0002, matches the release's .sha256 and SHA256SUMS assets. It prints RCODESIGN= for $GITHUB_ENV.
  • Tests:
    • tests/test_dev_app_linux.py: archive round trip incl. framework links and exec bits, traversal and link-escape refusals, plist edits, and the Sparkle key vector.
    • tests/test_verify_signed_dev_app.py: 10 cases with a fake codesign. Each changes one fact and asserts the exact failure message.
    • Both run in ci-guards.yml's release-notary group.

Numbers

None: no job uses these yet.

Agent session: agent session

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Summary by CodeRabbit

  • Chores
    • Linux release checks now validate signed development apps, including signing, required entitlements, and app permissions.
    • Development app archives are checked for preserved file permissions and links, and unsafe archive contents are rejected.
    • Linux release tooling can prepare and verify app bundles, update version information, and convert Sparkle public keys.
  • Tests
    • Added automated coverage for app packaging and signed-app validation.