Curated plugin and theme catalog for Open BRF. Static JSON index consumed by an instance at install time.
Every instance reads an index from main and offers what it lists. The format is
the one index described under "Distribution and installation" in the
plugin contract,
read with parseCatalogIndex from @openbrf/plugin-sdk. The catalog publishes
it in four files, one for each version of the index:
| File | Index version | Read from |
|---|---|---|
catalog.json |
1 | https://raw.githubusercontent.com/openbrf/catalog/main/catalog.json |
catalog-v2.json |
2 | https://raw.githubusercontent.com/openbrf/catalog/main/catalog-v2.json |
catalog-v3.json |
3 | https://raw.githubusercontent.com/openbrf/catalog/main/catalog-v3.json |
catalog-v4.json |
4 | https://raw.githubusercontent.com/openbrf/catalog/main/catalog-v4.json |
An instance that reads version 1 keeps reading catalog.json. Version 2 adds
six fields to a plugin entry, deviceRoutes
(ADR 0031),
recipients
(ADR 0037),
extensionPoints and extends
(ADR 0030),
processing
(ADR 0035)
and personRecords
(ADR 0047),
and changes nothing else. An instance refuses a version 1 index whole when an
entry carries a field version 1 does not define, so a plugin entry that carries
any of the six, an empty list included, is not listed in catalog.json, and
is listed in catalog-v2.json and the files of the later versions. (A theme's extends, the theme it inherits
from, is a text that version 1 defines, and is listed in both files.) Every
other entry is listed in both files, the same in both, so an instance that
reads version 2 offers what one that reads version 1 does. A pull request that
adds or changes an entry changes both files, or leaves catalog.json alone for
a plugin entry that carries deviceRoutes, recipients, extensionPoints,
extends, processing or personRecords. A plugin that declares personal data states its
processing declaration, so such a plugin is not listed in catalog.json, and an
instance that reads version 1 does not offer it.
Version 3 adds one field to a plugin entry, residentRoutes
(ADR 0051),
and changes nothing else. An instance refuses a version 2 index whole when an
entry carries it, so a plugin entry that carries residentRoutes, an empty list
included, is not listed in catalog-v2.json, and is listed in catalog-v3.json
and catalog-v4.json. Every other entry of catalog-v2.json is listed in
catalog-v3.json, the same in both, so an instance that reads version 3 offers
what one that reads version 2 does. A pull request that adds or changes an
entry that catalog-v2.json lists changes catalog-v3.json the same way.
Version 4 adds nonResidentCallers to a plugin entry, the classes of caller its
resident routes serve besides the residents the address book lists to it, and
showsSubject to a collection of records about a person, whether the plugin may
show a record's subject's name, and a resident's apartment, to those it serves
when that person chooses
(ADR 0053).
It changes nothing else. An instance refuses a version 3 index whole when an
entry carries either, so a plugin entry that carries nonResidentCallers, or a
collection that carries showsSubject (false included), is listed in
catalog-v4.json only, and catalog-v3.json carries none. Every other entry of
catalog-v3.json is listed in catalog-v4.json, the same in both, so an
instance that reads version 4 offers what one that reads version 3 does. No
entry carries either field yet, so catalog-v4.json is catalog-v3.json with
its version set to 4. A pull request that adds or changes an entry that
catalog-v3.json lists changes catalog-v4.json the same way.
A package is listed when:
- its artifact is an asset of an immutable GitHub release of the listing's own
public repository, at
https://github.com/<owner>/<repo>/releases/download/v<version>/<file>.tgz, the tag beingvfollowed by the entry's version, and the release not a draft or a pre-release. That repository is the one its source lives in, or a release-only repository that builds it from source kept elsewhere (see below); - the tarball carries a build attestation from that repository's release
workflow,
.github/workflows/release.yml: made on a GitHub-hosted runner, by a run of that repository on the release's tagv<version>, which that workflow started itself rather than being called by another. An attestation made in any other repository, the source repository of a release-only listing included, is refused. The check reads every verified certificate and compares its claims whole, so a workflow such asrelease.yml.x.ymlis refused whicheverghruns it. It also holds the repository to the numeric ids pinned for it inrepositories.json, so a repository deleted or renamed away and created again under the same name by someone else is refused, since GitHub gives it new ids; - the commits that attestation names, the source it was built from, the commit
its workflow was read at and the one its run's configuration was read at, are
on the repository's default branch. A
tag push runs the workflow as the tagged commit has it, so a release
workflow's own check that the tag is on
maincan be edited away on a branch that is then tagged; the catalog asks GitHub instead; - a package from a release-only repository carries a
source.jsonat its root naming its source, a copy of the release repository's own, as below; - the entry states the tarball's
sha512andbytes, and both match the download and the release asset; - the package agrees with the entry: for a plugin the package name, version,
id, API version, permissions, personal data categories, actions, protected
resource, recipients (each one's id, origin, purpose and categories, the
board reading the entry's before anything is downloaded), extension points
it offers and the ones it extends (each one's id, version and categories, as
below), its
processing declaration (whole, the categories of data subjects as a set: the consent screen
shows it before anything is downloaded, and the install seeds the record of
processing activities from it), the routes a device reaches with a token
(each one's id and path), its collections of records about a person (whole,
their categories and fields as sets: the consent screen shows each with its
categories and its bound before anything is downloaded, and whether it shows
its subject's name, absent meaning it does not), the resident routes it declares (the board
consents to them before anything is downloaded: the sets of paths must be
equal, their order does not matter, and absent means none on both sides;
the entry's title is the curator's text and is not compared with
the manifest's
titleKey), the classes of caller those routes serve who do not live here (as a set, absent meaning none on both sides), whether it is an AI package, and the licence it reads with its release date; for a theme the name, version, contract and parent, the parent being the built-in theme or a theme in this index, and not deprecated unless the theme is too; - the tarball is gzipped and holds files and directories only (no links or
devices): at most 200 files, no file over 4 MiB and 8 MiB unpacked in all,
and every path relative, at most 200 characters, with no
..or empty segment and no backslash. The check reads a plugin with the same strict reader an instance reads a theme with, so a plugin outside these limits is not listed; - a plugin that reads a licence names an issuer that publishes it, declares only keys that issuer publishes, and declares no key id that another plugin in this index declares with a different key (see A licensed plugin);
- a plugin declares no runtime dependencies and passes
pluginPackageProblemsfrom@openbrf/plugin-sdk; a theme passes the install lint from@openbrf/theme-tools; - a plugin connects to nothing outside the instance that it does not declare
in its
recipients(ADR 0037), and it sends personal data only throughhost.recipients.fetch, never by a rawfetch,httporhttpsrequest to a declared origin. The host validates the request's disclosure against the recipient's declared categories and records it only on that route. A declaration is not a fence: a plugin runs with the instance's privileges, and nothing in the host stops a connection it did not declare or a request that skips the route. The check cannot see either, so the maintainer reading the server bundle holds the plugin to both (see below).
The check does not read a listed repository's settings. It proves that the commit a release was built from is an ancestor of the default branch, so that a release is not built off a branch. That means the commit was merged, not that anyone reviewed it. A listed repository should have:
- a tag ruleset on
refs/tags/v*restricting creation, update and deletion, which only the Admin role bypasses, so that anyone who can merely push cannot make a release at all. A maintainer confirms this one when reviewing a listing.
A listed repository is also recommended, not required, to have a ruleset on its
default branch that requires a pull request with at least one approving review,
and approval of the most recent push by someone other than the person who
pushed it, so that a change to the release workflow reaches the default branch
only after a second person has read it. Requiring a code owner's review, with
.github/workflows/ in CODEOWNERS, narrows that reader to the people trusted
with releases. Neither the check nor the reviewer holds a listing to this rule.
A package whose source is not public is listed from a public repository that holds its release workflow and builds the package from the private source (ADR 0044). Its tarball is still a public download, and neither this check nor an instance is given a credential for it.
The release repository pins the source it builds in a source.json at its own
root, and the release workflow copies that file unchanged into the package's
root, beside its package.json or theme.json:
{
"repository": "https://github.com/<owner>/<source repository>",
"commit": "<full commit id>"
}The check reads the release repository's source.json at the commit the
attestation names as the source, and refuses the package unless its own
source.json has the same bytes, or has none when the release repository pins
none. It reads it only after every commit the attestation names is found on
the release repository's default branch, as for any listing: a tag off that
branch runs the release workflow as that commit has it, which can omit the checks
the default branch's workflow makes, and the package copies that commit's own
source.json, so the byte comparison alone would accept it. It also refuses a
record:
- that is not a JSON object with exactly those two fields, each named once;
- whose
repositoryis not exactlyhttps://github.com/<owner>/<repository>, without.git, a trailing slash or a further path. A source on another host is refused, because the check can ask only GitHub whether a repository is public; - whose
repositoryis the release's own repository; - whose
repositoryGitHub reports public. A package whose source is public is released from that repository; - whose
commitis not 40 or 64 lowercase hexadecimal characters.
It cannot read a private source, so it does not check that the commit exists. The record is in the tarball rather than in the release notes because an immutable release's notes can still be edited. The attestation fixes the record but does not prove it: the release workflow writes the package, so the record is the author's statement of the source, pinned in the public history of the repository that signed it.
The check reads a package without source.json, from a release repository that
pins none, as built from the commit its attestation names, and cannot tell a
release-only repository that left both out. The maintainer reviewing the
listing can: a release-only listing without the record is not merged. The
maintainer also checks that the release repository:
- moves its pin by a reviewed pull request for each release and pushes the tag on the merge, with the tag ruleset above;
- reads the pin at the tagged commit and checks out exactly that commit of the
source, with
persist-credentials: false; - keeps the credential that reads the source as an environment secret, of
an environment whose deployment rule allows only
v*tags. A repository secret is open to every workflow and job in the repository, whatever environment a job names; - uses a credential that reads the source repository and nothing else: a
read-only deploy key, a GitHub App installation token minted in the run for
that repository alone with
contents: read, or a fine-grained personal access token limited to that repository withcontents: read. Never a classic personal access token, which reaches every repository its owner can; - builds in a job that holds the credential and has no
id-tokenorattestationspermission, and attests and publishes in a separate job that has those permissions and not the credential.
The credential is never in the package or the release, and neither the catalog nor an instance needs one.
A plugin can offer other plugins a place to contribute to, an extension point,
and a plugin can extend a point another plugin offers
(ADR 0030).
Both are declared in the package's manifest, as extensionPoints and
extends, and the board reads them on the consent screens before anything is
downloaded, so the entry repeats them. A plugin that does either is not listed in
catalog.json.
For a plugin that offers points, extensionPoints lists each one with the
manifest's own fields and the curator's text:
"extensionPoints": [
{
"id": "cards",
"version": 1,
"personalData": ["name"],
"title": { "sv": "<title in Swedish>", "en": "<title in English>" },
"description": { "sv": "<what it accepts, in Swedish>", "en": "<what it accepts, in English>" }
}
]The title and description of each point are required, in Swedish and in
English, and are the curator's rather than the plugin's own, as an entry's
name and description are: an addon's consent screen has to name the point
before the host plugin's locale files exist on the instance. The maintainers
may rewrite them, and the check does not compare them with the package. A
listing without them, or without one of the two languages, is refused by the
index schema.
For a plugin that extends points, extends lists each one exactly as the
manifest does, with no further field:
"extends": [
{ "plugin": "<host plugin id>", "point": "cards", "version": 1, "personalData": ["name"] }
]The check compares both lists with the package's, as a set: the order of the points, and of the categories in each, does not matter, and an entry that leaves the field out has none. It refuses the listing when the package offers or extends a point the entry does not repeat, when the entry repeats one the package does not declare, or when an id, a version or the categories differ. The index schema holds the entry to the manifest's own rules (an addon declares no points of its own, a point accepts only categories the plugin itself handles), and, when the index lists both plugins, to the rule between an addon and the plugin it extends: that the host offers the point, at the version the addon names, and accepts the categories the addon hands it, and that their permissions and the plugins joined by extensions do not put a register reader beside a plugin that publishes to the website. A host plugin that this index does not list is held to the same rules by the instance when both are installed.
A plugin that reads the address book can declare residentRoutes, the routes a
resident may call without a board seat
(ADR 0051).
The board reads them on the consent screen before anything is downloaded, so
the entry repeats them, each with its path and the curator's title in
Swedish and English in place of the manifest's titleKey (the plugin's locale
files are not on the instance yet). A plugin that declares them is not listed in
catalog.json or catalog-v2.json:
"residentRoutes": [
{
"path": "offers",
"title": {
"sv": "Erbjud din parkeringsplats några dagar",
"en": "Offer your parking space for some days"
}
}
]The check holds the entry to the package: the paths are the same set, in any
order. The title is the curator's text and is not compared. The index refuses
an entry whose routes the manifest would refuse, by the manifest's own rules
(declaredResidentRoutesSchema and residentRouteRuleIssues in
@openbrf/plugin-sdk): more than eight routes, two that overlap, one over
oauthProtectedResource, and routes beside no address-book permission, a
finance permission or an extension point. The rule on the board's section needs
the view, which an entry does not carry, so it is applied when the check reads
the package's own manifest.
The reviewer reads each resident route's handler in the bundle beside what the board's consent covers (ADR 0051, "What catalog review reads"). A listing whose resident routes fail one of these is not listed:
- what it returns about anybody but the caller: only what a feature the description names needs, and no person id, name, apartment or contact of another person unless the feature is to show it and the description says so;
- what it says when another person's record goes: the same whatever the reason,
and the same for a write refused with
PluginRecordConflictErrorwhether the key is held by a record the plugin cannot read or by a readable one; - what reaches it from elsewhere: no register data read in a job, a board route
or a settings screen, through memory,
host.recordsor a person record's value, and no register read kept in memory to be served across routes; - what it hands a job: no person id the caller supplied;
- what it leaves running: no listener or callback the handler sets up outlives its answer or uses a request other than its own;
- how long it takes: it answers well within its deadline of four and a half
seconds, with no long-poll or wait on an event. The host ends an outbound
call such as
recipients.fetchin time for the handler to answer, whatever itstimeoutMs, so no smallertimeoutMsis required. A handler that waits still holds the plugin's board routes and jobs, and a resident who can make it hang can fail them whenever they like; - what the screen tells a resident before they act: what their neighbours will see of what they offer or claim.
A plugin with resident routes can declare nonResidentCallers, the classes of
caller those routes serve besides the residents the address book lists to it:
board, administrator, propertyManager and pluginAccess
(ADR 0053).
The list is closed and the consent screen names each class in the core's own
words, so the entry repeats the manifest's list and the curator writes no text
for it. A collection of records about a person can declare showsSubject: the
plugin may then show a record's subject's name, and a resident's apartment, to
those it serves when that person chooses. The entry repeats the collection whole, as for any
collection. A plugin that declares either is listed in catalog-v4.json only:
"nonResidentCallers": ["board", "pluginAccess"]The check holds the entry to the package: the classes are the same set, in any
order, and a collection's showsSubject is the same, absent read as false on
both sides. The index refuses nonResidentCallers beside no resident routes, by
the manifest's own rule (nonResidentCallerRuleIssues in @openbrf/plugin-sdk).
The reviewer reads the bundle and the description as ADR 0053 asks under "What
catalog review reads": the description names every class the plugin serves and
what a caller in each sees of other people's records, and a name is shown only
from a tick that is off by default and says who will see it.
A paid plugin declares the instance licence it reads in its manifest's
licence: one entitlement, its issuer's name and url, the issuer's public
keys by key id, and the audiences, the issuer's services it may present the
association's licence to
(ADR 0042).
The plugin reads only the licences its keys verify, so the catalog vouches for
those keys with the issuer's own word. The issuer publishes, at the url its
licensed plugins name, a document of exactly this shape:
{
"format": "openbrf-licence-issuer/1",
"name": "<the issuer's name>",
"keys": { "<key id>": "<base64 of the 32-byte Ed25519 public key>" },
"repositories": ["https://github.com/<owner>/<repo>"]
}repositories lists the repositories the issuer's plugins are released from,
each written as the artifact URL writes it. The url is an exact https
address of a named host, written as a URL prints it: no credentials, port, IP
address or localhost, and nothing a URL parser would rewrite. The check reads
the document at that url with a deadline and at most 64 KiB, without the
GitHub token, and refuses a redirect rather than following it, so the document
is the one the address answers. It refuses a listing when:
- the document cannot be read, is not that shape, or names a field twice in one object;
- the plugin's
licenceis not a declaration of an issuernameandurland akeysobject: one that declares no key, or a key that is not text, is refused; - its
nameis not, exactly, the issuer's name in the plugin'slicence; - it does not list the repository the listing is released from, compared exactly: that issuer does not publish this plugin;
- a key in the plugin's
licence.keysis not in itskeysunder the same key id; - another plugin in this index, a deprecated one included, declares one of the plugin's key ids with a different key. A host tries a licence against every installed plugin's key with the key id the licence names and refuses one that none of them verifies, so a board that installed one of the two would have a licence for the other refused.
An entry repeats the plugin's licence and released, since the board
consents to the licence before anything is downloaded. CORE_REF names a core
whose index schema reads them, so a licensed plugin can be listed.
- Proposing. Open a pull request that adds or changes one entry in
catalog.json,catalog-v2.json,catalog-v3.jsonandcatalog-v4.json(not incatalog.jsonwhen a plugin entry carriesdeviceRoutes,recipients,extensionPoints,extends,processingorpersonRecords, which need index version 2, not incatalog-v2.jsoneither when it carriesresidentRoutes, which needs index version 3, and incatalog-v4.jsononly when it carriesnonResidentCallersor a collection'sshowsSubject, which need index version 4), and link the release it points at. A repository not yet inrepositories.jsonis added there in the same pull request, with the ids GitHub gives it:gh api repos/<owner>/<repo> --jq '{id: (.id | tostring), ownerId: (.owner.id | tostring)}'. Confirm the repository is the one meant first: the ids are what a later release is held to, so they are not asked of GitHub when the check runs. Thenameanddescriptionare the curator's text, in Swedish and English; the maintainers may rewrite them. - The check. The
Listing checksworkflow runs on every pull request, on every push tomainand every night, oncatalog.json,catalog-v2.json,catalog-v3.jsonandcatalog-v4.json. It reads each index with the core's own schema, which refuses a version 1 index in which a plugin entry carriesdeviceRoutes,recipients,extensionPoints,extends,processingorpersonRecords(a theme'sextendsis valid in both), a version 2 index in which one carriesresidentRoutes, and a version 3 index in which one carriesnonResidentCallersor a collection carriesshowsSubject, looks up the release, downloads the artifact, recomputes its digest and size, verifies its attestation and compares its certificate's claims, asks GitHub whether the attested commits are on the default branch, unpacks it and compares its manifest with the entry, checks the package'ssource.jsonagainst the release repository's pin, reads a licensed plugin's issuer document and holds the plugin's key ids to the others in the index, then runs the package check or the install lint. When two neighbouring versions are checked, it also holds them to each other: every entry that can be listed in the older version is the same in both. The pull request cannot merge until it passes. The schema and checks come from theopenbrf/openbrfcommit pinned asCORE_REFin the workflow. - A person. The check says whether a package installs, not whether it is
safe: a plugin runs in the instance's process with its privileges. A
maintainer named in
CODEOWNERSreads the plugin's server bundle as packed in the listed tarball, and the declaration the board will be asked to consent to, checks that every place the bundle connects to outside the instance is one of itsrecipientsand receives no more than that recipient declares, and that every request carrying personal data goes throughhost.recipients.fetchand no other way (a rawfetch,httporhttpscall to a declared origin skips the host's disclosure validation and audit record, so it is refused even though the origin is declared), confirms that the listed repository has the tag ruleset above, and approves the pull request. For a licensed plugin the reviewer reads itslicence.audiencesas they read itspermissions: each is a grant the board consents to, a service the plugin may show that the association holds the licence. Each one is the issuer's own service, at the host oflicence.issuer.urlor a subdomain of it, and one the plugin needs for what its description says. The reviewer confirms that the issuer'snameis the one that holds that host, since the check can hold the document only to what that address answers. The reviewer also checks each new pin inrepositories.jsonagainstgh api repos/<owner>/<repo>, and refuses a change to or removal of an existing pin that the pull request does not explain: a repository's id never changes, so a different id for a listed repository means a different repository. Every file in this repository is owned by the maintainers, the check included, so a change to the check is reviewed the same way. - Delisting. A pull request that removes the entry, or sets
"deprecated": trueto keep existing installs while offering it to no new one. A nightly failure on a listed entry is fixed or delisted the same way.
Report a problem with a listed package privately, as described in SECURITY.md.
The check needs Node and a checkout of openbrf/openbrf at CORE_REF with its
plugin SDK and theme tools built:
git clone https://github.com/openbrf/openbrf .core
git -C .core checkout <CORE_REF from .github/workflows/check.yml>
(cd .core && pnpm install --frozen-lockfile --filter "@openbrf/plugin-sdk..." --filter "@openbrf/theme-tools..." \
&& pnpm --filter "@openbrf/plugin-sdk..." --filter "@openbrf/theme-tools..." build)
node --test check/ # the checks' own tests, offline
GH_TOKEN=$(gh auth token) node check/cli.mjs # all four index filesName the files to check one, or give another file of repository pins:
node check/cli.mjs [--pins repositories.json] [index.json ...].
OPENBRF_CORE points the check at a checkout somewhere other than .core.