Repository navigation
Description
Found during a Strict post-merge review of #691 (release promotion development → beta, merged 2026-09-29) — 🔴 blocker. Present on beta and on development (checked at c133377; file paths and line numbers below are at 5b729df).
Introduced by: #809 (second revoke), #805 (source resolution), #703 (cascade)
Location ("this line" below): lib/AppInfo/SuiteLifecycleEventRegistrar.php:117
Finding
🔴 Blocker — A compromise force-revoke during a migration misses the source owners of every shared copy on the second suite
Priority 10 makes SuiteCompromiseOnRevokeListener run before EncryptionSuiteRevokedListener within one dispatch. But a compromise force-revoke of a suite in an open migration dispatches two revoke events for the same user (forceRevoke() line 482, then endMigrationForCompromise() line 546), and the first event's EncryptionSuiteRevokedListener calls ShareTargetMapper::deleteByTargetUser($userId) — every ShareTarget where that user is recipient, for every suite, not only the revoked one. When the second event's cascade walks findByEncryptionSuiteId($otherSuite), resolveTarget() gets DoesNotExistException for each shared copy and quietly falls back to the copy itself. So for the copies on the second suite (during a migration, the received copies are split across both ends) the SOURCE is not stamped or flagged and the notification goes to the revoked user instead of the source owner — exactly the keepiq#802 defect the priority was added to fix. The same happens on any retry of a force-revoke (s1-f2) and on a force-revoke of a user's second suite.
Impact: in the attack the #809 path exists for (an attacker holding the session leaves a migration open), the owners who have to rotate the secrets they shared with the compromised user are only partly warned.
Suggested fix: resolve sources before anything is swept for the whole containment — e.g. have endMigrationForCompromise() collect both suites' blast radius (copy → source) before the first revokeSuite(), or scope deleteByTargetUser() to the copies sealed under the revoked suite (secret_id IN findByEncryptionSuiteId($suiteId)).
Done when:
- an integration-style test (real listeners, mocked mappers that honour deletes) force-revokes suite A with
markCompromised=trueduring a migration A→B where a shared copy sits on B, and asserts the copy's source owner is notified and the source is stamped - the same test is red on the head
Verification status
Verified by reading code at 5b729df; not executed.
Related: #817.
Activity
github-actions commentedon Oct 1, 2026
Thank you for opening this issue! It has been assigned to @rubenvdlinde for review.
What happens next:
Triage labels:
triage:accept-feature— accepted as a new featuretriage:accept-bugfix— accepted as a bug fixtriage:needs-info— more information neededtriage:wontfix— will not be addressedtriage:duplicate— duplicate of another issuedocs(openspec): archive admin-suite-revocation
fix(suites): contain the whole account on a compromise force-revoke (#…
rubenvdlinde commentedon Oct 2, 2026
Fixed by #890, merged into development (d77dc31). The PR body describes the change and the test that fails without it.