feat: Add Bazaar Search Provider for Launcher - #139
Conversation
The launcher query is interpolated into a shell command using single quotes, but embedded quotes are replaced with '. POSIX single-quoted strings do not treat backslashes as escapes, so a crafted /bzr query can terminate the argument and execute arbitrary shell commands. Noctalia executes string-form runAsync calls through /bin/sh. A harmless reproduction using the same quoting logic successfully created a marker file. The plugin runs unsandboxed in the user's session, making this arbitrary command execution. The same unsafe construction affects Bazaar-provided result IDs at bazaarsearch/launcher.luau:137 and bazaarsearch/launcher.luau:170. Every dynamic argument must use correct POSIX shell quoting, or the process API must accept and execute an argument vector without a shell.
The declared dependencies list bazaar and busctl, but activation also spawns date through command substitution at bazaarsearch/launcher.luau:170. Declare and document date, or remove the external command dependency by obtaining the timestamp without spawning it. |
Plugin
dumbasaroc/bazaarsearchplugin.toml)What it does
Bazaar Search allows users to search for Flatpaks directly though the Noctalia Launcher. It works very similarly to KDE's Discover search in KRunner and Gnome Software search in GNOME's application search bar. Users search via
/bzr <search terms>and can select Flatpak entries in the launcher. When clicked, they bring the user to the specified page in the Bazaar application.External dependencies
busctl(part ofsystemd)Testing
All of this was tested on my development machine, currently running
CachyOS Rolling, Noctalia v5, and niri 26.04.
Changed
max_entriesto0(shows nothing),5(shows five or less entries),10(shows 10 or less entries), and 50 (shows 50 or less entries).Attempted with both Flatpak and binary versions of
bazaarOpened plugin launcher provider without having the service online
pacman), plugin worked fine - it automatically opened the application via invoking the DBus interface.Clicked on entries - brings the user directly to the Flatpak's store page within Bazaar.
Tested on Niri
Tested on Hyprland
Tested on Sway
Tested on another compositor:
Noctalia version tested against: v5.0.0 (712144465c44)
Plugin API level: 3
Screenshots / Videos
plugin_trailer.mp4
Checklist
idafter the/inplugin.tomlexactly.plugin.toml,README.md,thumbnail.webp, andtranslations/en.json.README.mdfollows theREADME template, documents
every entry id and dependency, and includes exact panel IPC commands and launcher prefixes where applicable.
thumbnail.webpwith the thumbnail generator.versionfollows semver and is bumped in this PR;plugin_apiis the oldest API level this plugin requires.understand that language well enough to review and maintain it (no unreviewed machine/LLM translations).
catalog.toml; CI generates it.Code review attestation
Plugins run as trusted, unsandboxed Luau in the user's session. Confirm:
licensedeclared inplugin.toml.