Repository navigation
Harden plugin manifest scan framing and fix plugin lifecycle races - #19961
Merged
Merged
Conversation
Contributor
[Critical impact] The PR appears safe to merge; both previously reported lifecycle bugs are fixed. SummaryThis PR tightens manifest scanning and prevents old plugin loads from completing after removal or reload.
Reviews (2) · Last reviewed commit: "Fail closed on empty firstPartyDir and c..." · Reviewed by Greptile |
cursor Bot
pushed a commit
to mark-groves/omarchy
that referenced
this pull request
Nov 24, 2026
…macom#19961) * Harden plugin manifest scan framing and fix plugin lifecycle races * Fail closed on empty firstPartyDir and cancel stale pending plugin loads
This was referenced Nov 28, 2026
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.
Fixes an in-band delimiter injection vulnerability in
PluginRegistrymanifest scanning and several async plugin lifecycle races inshell.qml:shell/services/PluginRegistry.qml): Previously,rescan()emitted rawmanifest.jsonbodies delimited only by===<kind>::<dir>===/=== EOM ===text markers, allowing a crafted third-partymanifest.jsoncontaining a synthetic===firstparty::...===line to spoof__isFirstParty = true, hijackomarchy.*IDs, and inherit trustedauthenticationcapabilities. Framing each manifest by its exact line count (using bash builtinmapfile -twith zero extra subprocesses) prevents payload lines from ever being parsed as headers, backed by afirstPartyDircontainment check, NUL-delimited first-partyfindtraversal, and rejection of control characters, backslashes, and prototype-polluting plugin IDs.shell/shell.qml): Track in-flight loads inensureService()andloadPluginWidget()with per-load tokens so overlapping rescans or reloads cannot instantiate duplicate services or register stale components after teardown, and destroy completed/abandonedQQmlComponentwrappers.shell/shell.qml): Refreshshell,manifest, andserviceon panels kept across a rescan so they cannot hold a revoked/destroyedPluginShellApiafter a capability profile change.shell/shell.qml): On a normal rescan (pluginReloading === false),onPluginsChangedalready runs_syncServices(),syncPanelEntries(), andsyncPluginWidgets(), soonScanFinishednow runs them only when finishing a full plugin reload.Verified by Codex and Claude