taper / DEPENDENCIES.md
abr00kx's picture
Upload Taper: hardened ephemeral E2EE messaging protocol (Matrix hard fork)
d40e568 verified
|
Raw History Blame Contribute Delete
12.4 kB
# Dependency inventory
Every piece of third-party software Taper uses, and why it's needed. The full
transitive inventory, with versions, hashes, licenses and the dependency
graph, is in the CycloneDX 1.6 SBOMs in [`sbom/`](sbom/):
| SBOM | Describes |
|------|-----------|
| [`taper-server.cdx.json`](sbom/taper-server.cdx.json) | The homeserver in `server/` |
| [`taper-spec-site.cdx.json`](sbom/taper-spec-site.cdx.json) | The specification website and the tooling that builds and validates it |
Regenerate them with `env/sbom/bin/python scripts/sbom/generate.py` after any
dependency change. The [local CI gate](scripts/ci/gate.sh) fails if they are
stale or invalid, if any direct dependency below isn't listed in this file, or
if `grype` finds a High or Critical vulnerability.
## Rules
1. **Each dependency must earn its place.** If the platform or the standard
library can do the job, use that instead. Everything listed below has a
stated reason.
2. **Everything is pinned exactly and verified by hash.** npm uses exact
versions with lockfile integrity hashes, Python uses
`pip install --require-hashes` from a lock, and Go uses `go.sum`.
3. **No release under 14 days old.** New releases are where supply-chain
attacks land. Use `npm install --before=<date>` and hold Python packages
back with `pip-compile -P name==previous`.
4. **Permissive licenses only.** The whole tree is currently MIT, ISC, BSD,
Apache-2.0, BlueOak-1.0.0, PSF/Python-2.0, OFL-1.1 or CC-BY-4.0, with no
copyleft.
5. **Nothing from GitHub that can be avoided.** See
[GitHub-hosted dependencies](#github-hosted-dependencies).
## Clients
The dev web client (`client/`) is plain HTML, CSS and JavaScript with no
build step, hosted by the server itself under its gateway path (see `scripts/dev.sh`)
and linted with the server's pinned ESLint. Its dependencies:
| Package | Version | Scope | Why it's needed |
|---------|---------|-------|-----------------|
| `@matrix-org/matrix-sdk-crypto-wasm` | 19.0.1 | runtime | End-to-end encryption. It is [vodozemac](https://github.com/matrix-org/vodozemac) (the audited Olm/Megolm implementation) plus the Matrix Rust SDK's crypto state machine (device tracking, key sharing, sender checks), compiled to WebAssembly. Rust, about 8 MB of WebAssembly, no npm dependencies of its own. It is the only maintained Olm/Megolm implementation for browsers; libolm is deprecated, and [Cryptography and Transport](content/security.md#implementations) forbids writing our own. |
| `@serenity-kit/opaque` | 1.1.0 | runtime | OPAQUE password authentication ([RFC 9807](https://www.rfc-editor.org/rfc/rfc9807)), so the password never leaves the device. It is [opaque-ke](https://github.com/facebook/opaque-ke) 4.0.0 (Meta's Rust implementation of the final RFC; NCC Group audited an earlier version in 2021) compiled to WebAssembly, with ristretto255, SHA-512 and Argon2id, reviewed by 7ASecurity. About 430 KB, with its WebAssembly inlined, no npm dependencies, and no network access. Writing our own would break the rule against implementing primitives. Shared with the server. |
Development only:
| Package | Version | Scope | Why it's needed |
|---------|---------|-------|-----------------|
| `playwright-core` | 1.65.0 | dev | Drives the system Chromium headlessly for `client/test-browser.mjs`, which tests registration, invites and encrypted messaging through the real UI. The `-core` package never downloads browsers of its own. |
The library speaks Matrix names (`m.*`). `client/crypto.js` translates event
types at the boundary and adds the room version 13 checks the library doesn't
do: the `binding`, Padmé padding, the sender-device check and replay detection.
The test harnesses (`server/test.js`, `server/test-e2ee.js`) use Node's
built-in `WebSocket` and `fetch`; the E2EE tests load the client's crypto
library through its Node entry point.
## Desktop app (`desktop/`)
The GNU/Linux desktop app is Python on the distribution's GTK stack. It has
**no PyPI dependencies**: everything comes from the distribution, signed by
its maintainers and updated through its security channel. It also bundles
the web client and its two libraries (see [Clients](#clients)). Declared in
`sbom/declared-components.json`, in `sbom/taper-desktop.cdx.json`.
| Package (Debian name) | Tested version | Scope | Why it's needed |
|-----------------------|----------------|-------|-----------------|
| `python3` | 3.14 | runtime | Runs the shell (window, Tor, web view settings). It does no cryptography. |
| `python3-gi` | 3.58.1 | runtime | PyGObject: the Python bindings for the three libraries below. |
| `gir1.2-gtk-4.0` | 4.24.1 | runtime | GTK 4, the window toolkit. |
| `gir1.2-adw-1` | 1.10.0 | runtime | libadwaita: the GNOME header bar, status page and styling. |
| `gir1.2-webkit-6.0` | 2.54.3 | runtime | WebKitGTK: the web view that runs the bundled client. The most security-sensitive desktop dependency: keep it updated. |
| `tor` | 0.4.9.16 | runtime | Every connection the app makes goes through Tor. |
| `lyrebird` | 0.8.1 | optional | Bridges, for networks that block Tor: WebTunnel, obfs4, Snowflake and meek. It's the program Tor Browser ships for them. Tor runs it as a separate process. Licence GPL-3.0-or-later (some files BSD-2-Clause). |
| `snowflake-client` | 2.10.1 | optional | Snowflake bridges when lyrebird isn't installed. |
| `python3-cryptography` | 49.0.0 | optional | Checks the signature on the desktop app's release notice (Ed25519). Without it no notice is shown. Licence Apache-2.0 or BSD-3-Clause. |
| `ruff` | 0.17.4 | dev | Lints the desktop code in the CI gate, including its security checks (pinned with hashes in `scripts/requirements.lock`). |
The SBOM names these packages with Debian package URLs and CPEs, so `grype`
can match vulnerabilities in WebKitGTK and Tor by CPE. Without a
distribution context it may miss Debian-specific advisories: track your
distribution's security announcements as well.
## Server (`server/`)
Three components are required at runtime: Node.js, `ws` and
`@serenity-kit/opaque`. Everything else is development tooling that never
ships.
| Component | Version | Scope | Why it's needed |
|-----------|---------|-------|-----------------|
| Node.js | 24 (`>=22`) | runtime | Runs the server. Its built-ins cover what would otherwise be dependencies: `crypto` (Ed25519 signing and verification, AES-256-GCM, SHA-256, random values), `node:sqlite` (storage) and TLS 1.3 with hybrid post-quantum key exchange (bundled OpenSSL 3.5). |
| `ws` | 8.22.1 | runtime | WebSocket server. Node has a built-in WebSocket *client* but no server. `ws` has no dependencies of its own. |
| `@serenity-kit/opaque` | 1.1.0 | runtime | The server half of OPAQUE: registration responses, KE2, and KE3 verification. Same package as the client's (see above). Version 1.1.0 can be pushed into a broken state by malformed input; `server/index.js` checks the exact size and encoding of every OPAQUE message before passing it on. |
| `eslint` | 9.39.5 | dev | Lints the server in the CI gate. Brings in 84 transitive dev packages. |
| `@eslint/js` | 9.39.5 | dev | ESLint's recommended rule set, used in `eslint.config.js`. |
| `globals` | 17.14.0 | dev | Tells ESLint which Node globals exist. |
## Specification site
### Build tools (declared in `sbom/declared-components.json`)
| Component | Version | Scope | Why it's needed |
|-----------|---------|-------|-----------------|
| Hugo (extended) | 0.155.3 | build | Renders the specification. The extended edition is needed for the theme's SCSS. |
| Node.js | 24 | build | Runs PostCSS and Pagefind during the Hugo build. |
| CPython | 3.13 | tooling | Runs the validation and changelog scripts in `scripts/`. |
| `@redocly/cli` | 2.31.5 | tooling | OpenAPI lint in the CI gate (run through `npx`, not installed). |
| Inter font | 3.x | shipped | Site typeface, vendored into `static/fonts/` so pages load nothing from a CDN. Each file's SHA-256 is in the SBOM. |
### npm (`package.json`)
All of these are build-time only. 91 packages in total, including transitive
ones.
| Package | Why it's needed |
|---------|-----------------|
| `postcss` | CSS pipeline that Hugo's `css.PostCSS` runs (see `postcss.config.js`). |
| `postcss-cli` | The executable Hugo calls to run PostCSS. Hugo requires it on the path. |
| `autoprefixer` | Adds vendor prefixes to the theme CSS (`layouts/_partials/head-css.html`). |
| `@fullhuman/postcss-purgecss` | Strips unused CSS from the production build (`postcss.config.js`). |
| `pagefind` | Builds the static search index, so search needs no server or third-party service. |
### Go modules (`go.mod`, Hugo modules)
| Module | Why it's needed |
|--------|-----------------|
| `github.com/matrix-org/docsy` | The site theme (a fork of Docsy). It brings in Bootstrap 5.3.8 (layout and CSS) and Font Awesome (icons). |
### Python (`scripts/requirements.txt`, locked in `scripts/requirements.lock`)
| Package | Why it's needed |
|---------|-----------------|
| `jsonschema` | Validates event and OpenAPI examples against their schemas. Version 4.18 or later is needed for `referencing` support. |
| `referencing` | Resolves `$ref`s across the schema files. |
| `python-jsonpath` | Finds inline examples in `check-json-schemas.py`. |
| `attrs` | Data classes in `check-json-schemas.py`. |
| `pyyaml` | Reads the YAML schema and API files. |
| `towncrier` | Builds release changelogs (`scripts/generate-changelog.sh`). |
Removed: `requests` (listed but never imported) and `node-fetch` (replaced by
Node's built-in `fetch`).
### SBOM tooling (`scripts/sbom/requirements.txt`)
| Package | Why it's needed |
|---------|-----------------|
| `cyclonedx-bom` | Generates the Python part of the site SBOM from the installed tooling environment. |
| `cyclonedx-python-lib` | Validates every SBOM against the strict CycloneDX 1.6 JSON schema. |
The npm parts come from `@cyclonedx/cyclonedx-npm@6.0.1` (run through `npx`).
Vulnerability scanning uses `grype`, and `go` resolves the Hugo module graph.
These are developer-machine tools, not dependencies of anything that ships.
## Known issues
None of these is High or Critical, and none affects the server. All of them
are in build or validation tooling.
| Component | Advisory | Severity | Status |
|-----------|----------|----------|--------|
| Hugo 0.155.3 | GHSA-fw87-fv5r-9fpw, GHSA-vxgm-5rmg-5w8g, GHSA-c54g-xjwj-8g82, GHSA-x597-9fr4-5857, GHSA-mcv8-8m8x-48pg, GHSA-c3wq-j5vh-68rc, GHSA-q76j-gcg9-vxc6 | Medium | Fixed by 0.163.3 and later. Upgrade to 0.169.0 once Hugo is installed and the site is confirmed to build with it. |
| `@redocly/cli` 2.31.5 | GHSA-657c-g7qc-r9j2 | Medium | Fixed in 2.33.2, but newer releases' YAML parser rejects flow-mapping indentation used throughout `data/api/`. Reformat those files, then upgrade. Only runs locally on our own files. |
| `glob` 10.5.0, `minimatch` 9.0.9 | GHSA-3g3m-2fjr-6pw4, GHSA-g3hv-75wg-m249 | Medium | Come in through `@fullhuman/postcss-purgecss` 6 → `purgecss` 6. The fixes need a major-version bump of purgecss. Only touches our own files at build time. |
### SBOM coverage gap
`@matrix-org/matrix-sdk-crypto-wasm` and `@serenity-kit/opaque` are each
listed as one npm component, but their WebAssembly contains many Rust crates
(opaque-ke, curve25519-dalek, argon2 and others for the latter) (vodozemac, the Matrix Rust SDK and
their dependencies). The npm package doesn't ship its `Cargo.lock`, so those
crates aren't in the SBOM yet, and `grype` can't scan them. "No
vulnerabilities found" for the client covers the npm package only. To close
the gap: take `Cargo.lock` from the library's source at the 19.0.1 release,
generate its crates with a Cargo SBOM tool, and add them as nested
components of the npm package.
## GitHub-hosted dependencies
Taper does not use GitHub, but these still come from it:
- **Hugo modules:** the Docsy fork, Bootstrap and Font Awesome are fetched
from `github.com` through the Go module proxy. To remove this, vendor them
with `hugo mod vendor` and commit `_vendor/`.
- **`scripts/proposals.js`** fetches Matrix MSC proposals from the GitHub API
for the proposals page. It's upstream Matrix process, so it should probably
be removed along with that page.
- **The `origin` remote** still points at the upstream Matrix repository on
GitHub.