mirror of
https://github.com/morluto/rea.git
synced 2026-10-27 18:05:45 +00:00
The macOS installer accepted any bundle that passed `codesign --verify` and whose `Info.plist` said `com.cryptic-apps.hopper-web-4`. An ad-hoc signed bundle with that identifier satisfies both, so a substituted DMG could be copied to ~/Applications and launched. Verify a pinned code requirement instead, covering the sealed bundle identifier and the signing team together, and report a distinct `publisher_verification_failed` code so a vendor key change is not confused with a corrupt package.
24 lines
1.1 KiB
TypeScript
24 lines
1.1 KiB
TypeScript
import { describe, expect, it } from "vitest";
|
|
|
|
import { HOPPER_PUBLISHER } from "./MacHopper.js";
|
|
import { setupInstallFailure } from "./SetupInstallFailure.js";
|
|
|
|
describe("macOS Hopper setup failure projection", () => {
|
|
it("projects a publisher mismatch onto its own code and recovery", () => {
|
|
expect(setupInstallFailure("publisher_verification_failed")).toEqual({
|
|
status: "failed",
|
|
code: "publisher_verification_failed",
|
|
remediation: `The mounted Hopper application is not signed by the publisher REA pins (${HOPPER_PUBLISHER.bundleIdentifier}, Apple team ${HOPPER_PUBLISHER.teamIdentifier}); nothing was copied or launched. Install Hopper yourself and set HOPPER_LAUNCHER_PATH to its launcher, then rerun rea setup.`,
|
|
});
|
|
});
|
|
|
|
it("keeps a broken bundle distinct from a publisher mismatch", () => {
|
|
expect(setupInstallFailure("bundle")).toEqual({
|
|
status: "failed",
|
|
code: "bundle_invalid",
|
|
remediation:
|
|
"The mounted package did not contain the expected Hopper application bundle. Retry setup; if it repeats, update REA before installing.",
|
|
});
|
|
});
|
|
});
|