Skip to content
@drupflare/spool v1.0.0 GitHub
    Preparing search index...
    Documentation
    GitHub

    Trust

    Security Policy

    Security fixes go into the latest minor release only.

    Version Supported
    1.0.x yes
    0.4.x no
    0.3.x no
    0.2.x no
    0.1.x no

    A fix ships as a new patch version on npm and on cdn.drupflare.com. Release files on the CDN are immutable, so a site that pins a version and its SRI hash keeps the old file until it moves to the new version and hash. The release notes carry both.

    Do not open a public issue for a vulnerability. Report it privately through GitHub's private vulnerability reporting, or by email to the maintainer at [email protected].

    Include the spool version, the server runtime, the browser and its version, the steps to reproduce, and what an attacker gains. A failing test or a minimal page is the fastest way to a fix.

    The maintainer confirms the report, works on a fix in private, and publishes a GitHub security advisory with the patch release. Reporters are credited in the advisory unless they ask not to be.

    In scope:

    • the @drupflare/spool package: the server half, the service worker, the page runtime, proxy mode and the stores
    • the files published under cdn.drupflare.com/spool/
    • the wire protocol in docs/protocol.md

    Out of scope:

    • a site's own routes, templates, renderers and load functions, and what they choose to send
    • third-party services a site loads, and analytics sinks
    • a compromised server, a compromised browser, or malware that reads the device's disk

    The full threat model, with the code path and test behind each claim, is docs/security.md. In short:

    • Authorisation stays on the server. The device holds only what the server already sent that principal. The worker decides when a stored page is fresh enough to show, and never who may see it.
    • Signed-in data is partitioned per principal. The partition id is an HMAC of the principal under a server secret, so the browser can tell partitions apart without learning who they belong to. A change of partition destroys the previous one.
    • Stored principal data is sealed at rest with AES-GCM under a non-extractable key. Deleting the key makes the data unreadable (crypto-shredding). This is not a defence against script running on the site's origin.
    • A site pack holds public data only. Principal datasets are left out of it. It is served without credentials and stored in the clear on the device, and a logout does not remove it.
    • Logout wipes before the request leaves, offline too, for every tab of the origin.
    • Revocation is bounded by freshness. A principal route is hard-bounded at five minutes by default, and the first required sync after a permission change drops the page.
    • The page runtime loads from the site's own origin by default. With cdn set, it loads from the CDN with an SRI hash. If it fails to load, the page works as it did without spool.
    • Analytics are deferred. Held events go to their original endpoint later, and events past their age cap are dropped and counted. Spool sends no vendor event of its own. The worker's immediate reply to a held request is synthetic.

    Spool lists what it does not protect against, rather than leave it to be found. The current list is the Open Limitations table. Read it before you put signed-in data behind spool.

    Four limits concern the site pack and the network-read families. Anyone can fetch any version the server's store holds at /.spool/bundle/<version>, and a version is a small integer, so do not declare a dataset public that the site would keep private. A device keeps its pack through a logout. A signed-in read of a family takes its row from a copy of the family's dataset that the device holds per partition, so that dataset must be declared as a principal dataset.

    Gregory Mitchell maintains spool. Dependencies are kept current through Renovate. Pushes and pull requests to master, ver/*, feat/* and renovate/* run the gate in CI. build.yml runs the typecheck, the unit and node suites, the check that the published impact page matches its readings, and the build. browser.yml runs the browser lane in Chromium, Firefox and WebKit. Prettier and coverage run in their own workflows.

    Security-relevant contributions are welcome through pull requests. A fix for a reported issue lands with a regression test that fails without it. Keep exploit details out of public pull requests until the advisory is published.