Repository navigation
fix(install): prevent interactive installs from consuming stored IPAs - #196
Merged
bitxeno merged 1 commit intoOct 7, 2026
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
bitxeno
added a commit
that referenced
this pull request
Oct 8, 2026
* test(install): resolve the upload path before comparing it validateInstallRequest now stores the symlink-free path, which differs from the temporary directory path on macOS (/var vs /private/var), so the two accepted-path cases of the upload confinement test failed there. Compare against filepath.EvalSymlinks of the upload file, the same adjustment the older validate test already makes. * feat(install): ask which certificate to revoke at the account limit A free Apple ID allows only a few signing certificates, shared by every sideloading tool on the account. The pinned signing engine used to create one anyway and silently revoke an existing certificate to make room, breaking apps other tools had installed (issue #195). The engine now stops with a [certificate_reset_required] marker instead, and this change closes the loop in the UI: - An Apple ID install whose engine reports the marker keeps the staged IPA and opens a dialog listing the account's live certificates; the user picks one or cancels. Cancelling reports the plain failure, so nothing is ever revoked without a named choice. - Confirming resends the exact install request snapshotted before the attempt, with revoke_certificate_serial set. The serial is validated as a hex string and passed as one --revoke-certificate argument; the engine applies it only while its account still lists that certificate. The staged upload file is kept for the retry and swept after 24 hours like any other abandoned upload. - Automatic refreshes never authorize a revocation: they keep failing with the marker until the app is reinstalled from the install page. - The rows of TestValidateInstallRequest that expected an Apple ID install to take any local path are confined to the upload directory like #196 requires. Requires the PlumeImpactor fork commits 2500209..6ef63e8 (unreleased); bump the Docker pin when this ships. Until then the installed engine still revokes silently and the dialog simply never opens. * fix(refresh): report the certificate limit instead of failing vaguely An automatic refresh has no user to ask, so with the engine no longer revoking on its own it stops when the Apple ID account holds as many certificates as Apple allows. Classify that stop as the new RefreshedErrorCertificateLimit (5) instead of the catch-all other error: TryStart matches the [certificate_reset_required] engine marker before any other classification, and the home page explains the badge as "nothing was installed or revoked; choose a certificate on the install page". The app row keeps its previous refresh state; the fix is a manual reinstall, which offers the certificate dialog (previous commit). * chore(docker): bump PlumeImpactor to v2.2.3-patch.8 v2.2.3-patch.8 carries the certificate work the install page and the refresh classification depend on: certificates are reused by private key match regardless of machine name, and nothing is revoked unless a serial was authorized with --revoke-certificate; a run that would need to revoke stops with [certificate_reset_required] instead, which the previous two commits detect and present. The published plumesign binaries for x86_64 and aarch64 were checked to contain the flag, the marker and the new error text before this bump.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The interactive install WebSocket trusts the client-provided local
ipa_pathfor Apple ID installs. External-certificate requests validate local paths, but currently accept both the upload directory and the persistent installed-app directory.That is unsafe for an interactive install because
SaveAppmoves the successful request's IPA into the destination app record. A client can therefore point an install request at another record's<data>/ipa/<id>/app.ipa; if the install succeeds, that persistent IPA is moved away from the original record. The victim record is then left pointing at a missing package, breaking later reinstall/refresh operations. Apple ID requests can currently name any process-readable local path, not just atvloadly-managed uploads.The normal install UI does not need this authority:
POST /api/upload, under<data>/tmp;Fix
Constrain every interactive local IPA path to a regular file that resolves inside
<data>/tmp.resolvePathWithinpath resolver.CodeIPAPathRejectedso external-signing error reporting remains consistent.ResolveClientIPAPathunchanged for internal/background flows that legitimately reuse a stored IPA.This prevents a WebSocket request from borrowing, moving or overwriting an installed app's persistent package without changing supported UI behavior.
Regression coverage
TestValidateInstallRequestConfinesLocalIPAPathToUploadDircovers:tmpresolving to an installed app: rejected;The installed-app/outside-path cases fail on current
master.Scope
Two files, one commit, based directly on upstream
masterat48cb0f52cce0a5d2cb3383139806a7eb8c8756a1. No database, frontend, signing-engine or API-format changes.