Repository navigation
Keep plugin scan fields separate from manifest contents - #17283
acrogenesis wants to merge 1 commit into
Conversation
[Critical impact] Plugin scans control provenance at the authentication-service boundary. The incomplete-scan fallback needs to reject failed scans that stop between records before this is merged. Findings
SummaryThe PR separates scanner-issued origins and source paths from manifest contents using three NUL-terminated fields.
|
| var fields = String(text || "").split("\0") | ||
| if (fields.pop() !== "" || fields.length % 3 !== 0) { |
There was a problem hiding this comment.
If the scanner stops between records, this check accepts its partial output as complete. Each whole record has three fields and ends with NUL, so even empty output passes. scanProcess.onExited also ignores exitCode.
The parser then replaces installedPlugins with the partial map, causing the shell to remove missing services and widgets instead of keeping the previous registry. Require successful scan completion before replacing the map, and test truncation between records alongside the existing missing-final-NUL case.
|
Closing this. The scanner change hardens a framing path that add and update never publish: both require one JSON manifest before the plugin directory is visible to discovery. After enable, the plugin is already unsandboxed code in the shell, so a later rewrite of its own manifest does not cross a new boundary. The Muro proof checks a separate framing model, and the incomplete-scan guard still accepts a scan that stops on a finished record. That is not enough to keep a new formal-check workflow in tree. |
Plugin discovery uses line markers around raw manifest contents. A malformed manifest already present in the discovered directory can be interpreted as a scanner-issued record, enter the first-party map and replace a bundled registry entry.
The supported
omarchy plugin addpath validates JSON and reserved IDs in a hidden staging directory before publishing the plugin. It rejects the malformed payload used by this regression, installs nothing and never requests a rescan. The regression writes directly into a discovered directory; it does not demonstrate an installation-path vulnerability. This change is parser hardening, and a reachable security issue has not been established.Use three NUL-terminated fields for origin, source and manifest, and retain the previous registry when a scan is incomplete. Newlines and old markers remain payload data. The scanner and consumer change together inside
PluginRegistry.qml.The included Muro 0.20.3 evidence proves that framing and reading any field preserves both its contents and the entire following stream. A checksum-pinned CI job checks that evidence and audits mutations of the two modeled functions.
test/formal/README.mddescribes the proof boundary and its connection to the Bash/QML implementation.Validation:
1843592f2when a local manifest replaces the bundled authentication source, and passes with the fix.Process/StdioCollectorand newlines in source paths. Truncated scans retain the previous registry.The Muro proof establishes the framing property of the model. It does not establish attacker reachability or security severity.