Repository navigation
Install the marketplace-verified snapshot by default in omarchy plugin add
#11236
Replies: 4 comments 2 replies
|
Adding a data point as a marketplace plugin author: my listing is snapshot-verified, and its page still tells every visitor that the install command clones current HEAD and is not bound to that verified snapshot. Nothing on the author side can change that today. The marketplace's own Details and a note on why the update side of the PR is load-bearing are in #11242 (comment). |
|
+1. Three additions from keeping pinned plugins in sync across two machines: 1. Let omarchy plugin add https://github.com/owner/plugin.git@<40-char sha>2. Check out the pinned commit before the plugin reaches stage=$(mktemp -d ~/.cache/plugin-stage.XXXXXX)
git clone -q -- "$url" "$stage/$id"
git -C "$stage/$id" reset -q --hard "$sha"
omarchy-plugin-validate "$stage/$id"
[ "$(jq -r .id "$stage/$id/manifest.json")" = "$id" ]
mv -- "$stage/$id" ~/.config/omarchy/plugins/"$id"Updates work the same way: validate the new commit in a scratch 3. A lock file, for anyone with more than one machine. |
|
Updating here: Emailing DHH directly regarding this matter, I received confirmation that these concerns will be addressed in a future update:
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
TL;DR:
omarchy plugin add&updateshould install the latest Marketplace-verified commits by default. Pinning to HEAD is terrible security, AUR-level stuff.No reason not to do it, since the Marketplace is part of Omacom now.
I currently, personally, feel very unsafe using any foreign Omarchy plugins. Even ones from the Omarchy Plugin Marketplace. The reason is quite simple:
omarchy plugin add& update always fetch from HEAD.What if a plugin's latest commit was just approved to be fine by mods - but then the author, who's apperantly a bad actor, pushes a new, malicious commit? And now HEAD is compromised? Currently, I will just download this plugin's latest version, and the update system will just pick it up normally.
Long story short, the Omarchy marketplace - and any Omarchy plugin for that matter - become an even more vulnerable place than the AUR itself.
The plugin marketplace already verifies plugins commit by commit. A listing's "Snapshot verified" badge is tied to one exact SHA, after automated checks and, for some listings, a maintainer review. But the
omarchy plugincommand never looks at that SHA. It clones and fast-forwards to whatever upstream HEAD is at that moment.I see absolutely no reason not to use it there, especially now that the Marketplace has been adopted by Omacom.
The marketplace documents the gap itself in its VERIFICATION.md:
At the time of writing, 814 listed plugins have a verified snapshot that upstream has already moved past, and 218 more have never been verified at all. For those 814, the marketplace knows exactly which commit it checked, but the only install command it can offer gives you the newer, unchecked one. Every other verified plugin is one push away from the same situation.
Proposal
Keep the command people already use (
omarchy plugin add <url>), and have it look the repo up in the marketplace catalog first:plugin addinstalls--headcommand--headpassedomarchy plugin updatestays on the track the plugin was added on:--head, unlisted, unverified), or installed before this change → pulls upstream HEAD exactly as today.omarchy plugin update <id> --headswitches a plugin to following HEAD permanently.The track is recorded as
omarchy.channelin the plugin checkout's own.git/config, so there is no new state file, andomarchy-plugin-validatealready ignores.git.Nothing changes on the marketplace side: it keeps showing the normal
omarchy plugin add <url> --enablecommand, and that command now installs what the badge describes.Why this is cheap and safe
The user supplies the URL and the catalog only supplies a commit, so a bad catalog can at worst pick another commit of the same repo, which is still validated locally. It costs one ~1 MB catalog fetch per command, existing installs keep following HEAD, and if the marketplace can't be reached it falls back to today's behavior with a warning.
Open questions
/api/verified?repo=owner/name) would be lighter than the full catalog, but it would send the repo URL to the marketplace, which currently promises not to store repository URLs. The full catalog keeps lookups private.previousRepositories, butcatalog.jsondoesn't expose them, so an old URL counts as unlisted.Related
plugin add, so it would inherit this)I have a working implementation with tests. I'll open it as a PR when I'm ready
All reactions