Skip to content

feat(admin): mark official plugins via npm provenance; confirm third-party installs - #8531

Merged
JohnMcLear merged 3 commits into
developfrom
feat/official-plugins
Nov 23, 2026
Merged

JohnMcLear merged 3 commits into
developfrom
feat/official-plugins

Conversation

@JohnMcLear

@JohnMcLear JohnMcLear commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Placeholder ep_* packages (a 0.0.0-* version, no repository) have started showing up in the plugin feed and the admin catalog, next to real plugins and looking just like them. The project can't review every plugin on npm, so the catalog now marks the ones the project publishes as Official and labels everything else Third-party.

How "official" is decided

npm provenance, not anything the package says about itself. The repository field, the maintainer list and the feed's own official flag can all be set by whoever publishes. A plugin is official only when the SLSA provenance attestation for that exact name@version (subject digest checked against dist.integrity) was built in a github.com/ether/* repository with the ether org's numeric owner ID. ether plugins already publish this way via npm trusted publishing. It is worked out at catalog refresh, reusing the existing npm metadata lookup, and cached per version, so browsing gets no extra latency. The feed's official flag is overwritten. Logic is in src/static/js/pluginfw/pluginTrust.ts.

On the live feed today: 86 official, 99 third-party, 9 placeholders.

Behaviour

  • Third-party plugins stay listed, with a badge. Installing one asks for confirmation first (not maintained by the Etherpad project, runs code on your server). Official plugins still install with one click. Updates follow the same rule, and an install fetches the exact version the catalog showed, so a label never covers a different release.
  • Placeholder packages are left out of browsing, but searching for the exact name still finds them, so a developer can find a package they just published.
  • New pluginCatalogThirdParty setting: label (default), hide (official only), all (everything, placeholders included). Documented in settings.json.template and doc/plugins.md.
  • The fix(admin): stop offering deprecated and known-broken plugins (#8246) #8250 / fix(admin): ignore implausible plugin-feed compatibility verdicts #8530 filters run first and are unchanged. pnpm run plugins i is unaffected.

A plugin from the ether org that hasn't been released with provenance yet shows as third-party until its next release.

Badges

Third-party confirmation

Tests

  • tests/backend/specs/pluginTrust.ts: classification, including attestations from another org, a mismatched owner ID, a copied attestation, wrong version and wrong digest.
  • tests/backend/specs/pluginCatalog.ts: a package that claims to be official but isn't, provenance caching, offline behaviour, and the three modes.
  • admin_plugin_trust.spec.ts: badges and the confirm dialog, using fixture search results on the socket with installs swallowed. adminupdateplugins.spec.ts now accepts the dialog if npm can't be reached.
  • Full backend mocha suite: 2102 passing. vitest: 867 passing.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TcYAoDMav4BPPE9JrMtSvw

JohnMcLear and others added 2 commits November 21, 2026 13:20
Anyone can publish an ep_* package, and junk placeholders (0.0.0-stage,
no repository) have started showing up in the plugin feed and the admin
catalog. The project cannot review every plugin, so the catalog now marks
plugins it publishes as Official and everything else as Third-party.

Official is decided by npm provenance, not by self-declared fields: the
SLSA attestation for the exact name@version (digest checked against
dist.integrity) must come from a github.com/ether/* repository with the
ether org's numeric owner ID. It is computed at catalog refresh and cached
per version. The feed's own `official` flag is overwritten.

- Third-party plugins stay listed with a badge; installing one asks for
  confirmation first. Official plugins install with one click.
- Placeholder packages are left out of browsing but still found by an
  exact-name search.
- New pluginCatalogThirdParty setting: label (default), hide, all.
- CLI installs are unaffected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TcYAoDMav4BPPE9JrMtSvw
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

PR Summary by Qodo

Mark official plugins using npm provenance and confirm third-party installs

✨ Enhancement 🧪 Tests 📝 Documentation ⚙️ Configuration changes 🕐 40+ Minutes

Grey Divider

AI Description

• Verify npm provenance before marking catalog plugins Official; treat unverified plugins as
 Third-party.
• Confirm third-party installs and control placeholder visibility with a new catalog setting.
• Cover trust classification, catalog modes, and admin behavior with backend and browser tests.
Merge Risk 🟡 Medium

Blast radius 🟡 Medium 💥 2 capabilities

  • 2 affected capabilities within one bounded functional scope: admin_plugin_management.
  • Catalog refresh, provenance classification, policy filtering, and the admin socket/UI are one bounded plugin-management integration.
  • The path from the changed classifier through getBrowsablePlugins/search to the admin results is directly evidenced by the changed installer and socket consumers; it is not a separate deployment or storage capability.
  • Installation and update are a distinct system outcome from catalog browsing, but both belong to the same bounded admin plugin-management integration: the catalog classification flows through the admin UI/socket into the exact npm release installed.
  • The UI confirmation is a user-interaction boundary, not an independent functional scope.
Behavioral complexity 🔴 High 🧩 Multiple interactions

  • Before: the catalog primarily performed feed/deprecation/compatibility filtering and the admin installed the package name, normally resolving the current release.
  • After: the flow adds exact-package provenance parsing (SRI-to-digest conversion, subject/version matching, repository and owner checks), two asynchronous metadata/provenance sweeps with bounded concurrency and in-flight/cache coordination, policy-dependent browsing branches, and a UI confirmation state that must preserve the classified version through the socket and installer.
  • Before/After/New correctness conditions: (1) Before, feed/deprecation results determined availability; After, the feed flag must not override provenance; New condition: official status must correspond to the exact package name, version, integrity digest, repository URL, and owner ID.
  • (2) Before, concurrent catalog requests shared a simpler cache; After, metadata and provenance have separate caches, in-flight maps, expiry, and timeout behavior; New condition: partial refreshes must not publish or indefinitely reuse an inconsistent classification.
  • (3) Before, install resolved the default/latest release; After, catalog-originated installs carry an exact semver version; New condition: the release classified in the UI must be the release fetched, preflighted, and installed.
  • The existing semver validation and LinkInstaller mechanisms are reused, but the new provenance transformation and multi-stage ordering create these additional correctness conditions.
Sources

src/static/js/pluginfw/pluginTrust.ts[96-100]

/** Whether the given provenance makes a package official. */
export const isOfficialProvenance = (
  source: {repository: string, ownerId: string | null} | null,
): boolean => !!source && isOfficialRepository(source.repository) &&
  source.ownerId === OFFICIAL_GITHUB_OWNER_ID;
Potential damage 🔴 High 🩹 Confidentiality

  • In the false-official direction, an unreviewed npm plugin can be installed through the one-click path without the intended warning.
  • The localized confirmation text states that plugins run code on the server with access to pads and settings, so a malicious or compromised package can expose confidential server-held data.
  • This consequence is limited to the plugin-installation capability, not every catalog consumer.
  • Reverting the PR restores the prior install interaction but does not remove a plugin already installed or undo code that already ran; recovery requires uninstalling/replacing the plugin, restarting as needed, and investigating any data disclosure or external effects.
  • The exact-version handoff limits a release-substitution fault but does not repair a trust-classification fault.
  • Code rollback restores the UI logic, but persistent installed-plugin state and any external disclosure require separate operator remediation.
  • If the plugin was loaded, restart/uninstall and review of server/pad access may be required; disclosed data cannot be recalled.
Assessed commit 1574219
Diagram

graph TD
  Feed["Plugin feed"] --> Filter["Existing filters"] --> Trust{"Provenance verified?"} --> Policy{"Catalog mode"} --> UI["Admin catalog"] -->|"third-party"| Confirm["Install confirmation"] --> Installer["Plugin installer"]
  Npm["npm metadata"] --> Trust
  UI -->|"official"| Installer
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Maintain an official-plugin allowlist
  • ➕ Avoids provenance requests and remains available when npm is unreachable.
  • ➖ Requires manual upkeep and does not establish who published a particular version.
2. Verify Sigstore signatures locally
  • ➕ Reduces reliance on the npm registry's attestation validation.
  • ➖ Adds substantial verification complexity while installs already trust npm for tarballs.

Recommendation: Use the PR's version-specific npm provenance approach: it avoids self-declared trust and manual allowlist maintenance while reusing catalog metadata lookups. Review the registry trust assumption and offline behavior explicitly; local signature verification is a separate, higher-cost hardening option.

Files changed (15) +987 / -35

Enhancement (6) +413 / -33
index.cssStyle trust badges and the install dialog +32/-0

Style trust badges and the install dialog

• Adds distinct Official and Third-party badge styles and styles the third-party confirmation dialog.

admin/src/index.css

HomePage.tsxShow trust labels and confirm third-party installs +60/-1

Show trust labels and confirm third-party installs

• Displays server-provided trust badges in the catalog. Official plugins install immediately; third-party plugins require confirmation before the install request is sent.

admin/src/pages/HomePage.tsx

en.jsonAdd trust and confirmation text +6/-0

Add trust and confirmation text

• Adds English labels, tooltips, and the warning shown before a third-party install.

src/locales/en.json

PackageInfo.tsRepresent catalog trust and placeholder status +11/-0

Represent catalog trust and placeholder status

• Adds optional server-computed official and placeholder fields to catalog package information.

src/node/types/PackageInfo.ts

installer.tsClassify catalog entries during npm metadata refresh +148/-32

Classify catalog entries during npm metadata refresh

• Extends the existing deprecation lookup to collect repository and provenance information, with per-version caching and fail-open catalog behavior. Overwrites feed-provided trust flags after existing filters run and applies the configured visibility mode during search.

src/static/js/pluginfw/installer.ts

pluginTrust.tsDefine provenance-based trust and visibility rules +156/-0

Define provenance-based trust and visibility rules

• Accepts Official status only when the attestation matches the package name, version, and integrity digest and identifies an ether repository with the expected numeric owner ID. Also defines placeholder detection and the label, hide, and all listing rules.

src/static/js/pluginfw/pluginTrust.ts

Tests (4) +475 / -2
pluginCatalog.tsTest catalog trust integration and listing modes +140/-2

Test catalog trust integration and listing modes

• Adds registry and attestation fixtures covering false Official claims, caching, offline classification, placeholder searches, and all three visibility modes.

src/tests/backend/specs/pluginCatalog.ts

pluginTrust.tsTest provenance validation and catalog policy +210/-0

Test provenance validation and catalog policy

• Tests valid provenance and rejection of mismatched repositories, owners, packages, versions, digests, and malformed attestations. Covers placeholder detection and mode normalization.

src/tests/backend/specs/pluginTrust.ts

admin_plugin_trust.spec.tsTest admin trust badges and install confirmation +118/-0

Test admin trust badges and install confirmation

• Uses socket fixtures to verify badges, direct Official installs, and confirmation, cancellation, and Escape behavior for third-party installs without installing real packages.

src/tests/frontend-new/admin-spec/admin_plugin_trust.spec.ts

adminupdateplugins.spec.tsHandle provenance-dependent confirmation in the install test +7/-0

Handle provenance-dependent confirmation in the install test

• Allows the existing admin install test to confirm a third-party dialog when npm provenance cannot be checked.

src/tests/frontend-new/admin-spec/adminupdateplugins.spec.ts

Documentation (3) +72 / -0
Plugin.tsClarify the plugin trust field +4/-0

Clarify the plugin trust field

• Documents that the server computes the Official designation from npm provenance.

admin/src/pages/Plugin.ts

plugins.adocDocument plugin trust and catalog modes in AsciiDoc +35/-0

Document plugin trust and catalog modes in AsciiDoc

• Explains provenance-based labeling, confirmation, placeholder visibility, and the three catalog settings. Clarifies that command-line installs are unaffected.

doc/plugins.adoc

plugins.mdDocument plugin trust and catalog modes in Markdown +33/-0

Document plugin trust and catalog modes in Markdown

• Explains provenance-based labeling, confirmation, placeholder visibility, and the three catalog settings. Clarifies that command-line installs are unaffected.

doc/plugins.md

Other (2) +27 / -0
settings.json.templateExpose the third-party catalog setting +15/-0

Expose the third-party catalog setting

• Adds the environment-configurable pluginCatalogThirdParty setting with label as its default and documents hide and all.

settings.json.template

Settings.tsDefault the catalog to labeled third-party plugins +12/-0

Default the catalog to labeled third-party plugins

• Adds pluginCatalogThirdParty to the settings type and defaults it to label.

src/node/utils/Settings.ts

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Action required

1. One-click installs can run unchecked code ✓ Resolved
Description
requestInstall skips confirmation based on the catalog entry’s official value, but the install
socket sends only the package name and the installer installs the current latest version. If a new
version without qualifying provenance appears after the catalog was classified, an admin can click
an Official entry and install that unchecked version.


Remediation recommended

2. Plugin updates skip the safety warning ✓ Resolved
Description
requestInstall guards the Available-list button, but the installed-plugin update button still
calls installPlugin directly. When an installed third-party plugin has an update, that button
emits the same install event without showing the new confirmation dialog.

3. Hidden plugins still reach catalog clients ✓ Resolved
Description
hideUninstallablePlugins returns classified entries without applying pluginCatalogThirdParty,
and the new listing predicate is used only by search. An admin client requesting the existing
getAvailable socket event therefore receives third-party entries in hide mode and placeholders
in the default label mode.

4. Official plugins show as third-party on slow refreshes ✓ Resolved
Description
fetchPluginRegistryInfo now runs a second, sequential attestation fetch per package inside the
same 15 s DEPRECATION_SWEEP_BUDGET_MS signal and the same 8 workers, which roughly doubles the
network time of a cold sweep. Any package not reached before the budget runs out (or whose
attestation fetch is aborted) gets official = false. hideUninstallablePlugins stores that result
in the availablePlugins cache for up to 10 minutes, so ether plugins show the Third-party badge
and the confirmation dialog, and in hide mode they drop out of the catalog.


Informational

5. Hide mode empties the catalog when npm is unreachable ✓ Resolved
Description
With pluginCatalogThirdParty: 'hide', isListedInCatalog lists only entries with `official ===
true, and official` is true only when the provenance lookup succeeded. When the registry is
blocked or times out, every entry is unknown and therefore hidden. That breaks the documented
fail-open promise ("an admin behind a firewall gets the full catalog, not an empty one"), and no log
or UI message says why the list is empty.

6. Installed-plugin check now also downloads attestations ✓ Resolved
Description
fetchPluginDeprecations, which getInstalledPluginWarnings uses on every getInstalled event,
now wraps fetchPluginRegistryInfo. That function also fetches and parses the provenance
attestation document for each installed plugin version, even though only deprecated is used. This
adds one registry round trip per installed plugin on a cold cache, all inside the same 15 s budget,
which delays the installed-plugins response for no benefit.

Grey Divider

Tip of the day
💡 Did you know, you can keep summaries lean with Findings visible per group, which tucks the rest behind a View link

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

- Installs from the catalog carry the version that was classified, and
  the server installs exactly that version, so an Official label cannot
  cover a newer, unchecked release. The socket still accepts a bare name.
- Updates of installed plugins go through the same confirmation, using
  the catalog version and its classification; unknown means third-party.
- getAvailable applies pluginCatalogThirdParty like search does.
- Provenance is fetched in its own sweep with its own time budget, after
  the metadata sweep. A catalog with unchecked provenance is reused for
  at most a minute so the next search retries.
- The deprecation-only lookup for installed plugins no longer fetches
  attestations.
- Warn when provenance could not be checked, and in hide mode say why
  the list may be empty; document that hide needs registry.npmjs.org.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TcYAoDMav4BPPE9JrMtSvw
@JohnMcLear

Copy link
Copy Markdown
Member Author

Addressed the Qodo review in 1574219:

  1. One-click installs of a newer version: the catalog now sends {name, version} and the server installs exactly that version, which is the one that was classified. Non-semver versions are refused. The socket still accepts a bare name.
  2. Updates skipped the dialog: the update button now goes through the same check, using the catalog version and its classification from getInstalled. If the classification isn't known, it's treated as third-party.
  3. getAvailable leaked hidden entries: it now applies pluginCatalogThirdParty the same way search does (getBrowsablePlugins).
  4. Slow refreshes: provenance runs in its own sweep with its own budget, after the metadata sweep. A catalog where some provenance couldn't be checked is reused for at most 60s instead of 10 minutes, so official plugins don't stay labelled third-party.
  5. Hide mode with npm unreachable: kept strict on purpose, since hide means "verified only". It now logs a warning saying why the list may be empty, and settings.json.template and doc/plugins.md say hide needs registry.npmjs.org.
  6. Installed-plugin check fetching attestations: fetchPluginDeprecations now passes withProvenance: false. If provenance is needed later, it reuses the cached metadata instead of refetching it.

Each one has a backend test in pluginCatalog.ts. The Playwright spec now also checks that the version is sent with the install.

@JohnMcLear
JohnMcLear merged commit 26b0031 into develop Nov 23, 2026
42 checks passed
@JohnMcLear
JohnMcLear deleted the feat/official-plugins branch November 23, 2026 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant