Plan · cross-cutting

Trust model

This page covers who a napplet acts for, what it can reach in each scope, when Flotilla asks the user, and what Flotilla withholds so that a leak reveals less. Every other area page implements a part of it.

Parties#

PartyTrusted with
The userTheir keys, through Flotilla's signer
FlotillaEverything the user does, as the shell
The space's relay and its adminsEverything posted in the space, which they already store
A napplet's authorWhatever the napplet reads, since the sandbox can't stop a napplet from leaking data it holds
Other membersWhat they can already read in the space

The sandbox keeps a napplet away from keys and from Flotilla's storage, and it can't stop the napplet from leaking what it reads (see the research page). Opening a napplet in a space therefore shares the space with its author. The question for each napplet is who decides to do that.

Scopes#

Each napplet instance runs in one scope, which the shell enforces.

ScopeOpened fromReadsWritesStorage partition
GlobalA link or card outside any spaceNormal outbox routingThe user's outbox relays, by requestNapplet and user
SpaceThe space menu, the directory or a content surfaceThe space relay. Public profiles and relay lists through normal routing.The space relay onlyNapplet, user and space
RoomAn app room, or a content surface inside a roomThe space relay with the room's #hThe space relay, with the room's h addedNapplet, user and space

A scoped napplet can't name another relay. NAP-RELAY's optional relay field and NAP-OUTBOX's relays and toOutbox options are refused outside the scope. The napplet learns where it runs from the proposed context NAP, which returns the space's relay URL or the room's url'h.

Who decides#

Admins decide for the apps they install, and members decide for everything else.

ActionAdmin-installed, in its spaceOther app, in a spaceAny app, global scope
Read events in the spaceAllowAsk onceAsk once
Read public profiles and relay listsAllowAllowAllow
Publish a declared kind to the spaceAllow, with undoAsk per kindNot available
Publish an undeclared kind to the spaceAsk per kindAsk per kindNot available
Publish to the user's outbox relaysRefuseRefuseAsk per kind
Publish kinds 0, 3, 5 or 10002Ask every timeAsk every timeAsk every time
Read or send DMsNot offeredNot offeredNot offered
Upload to the space's Blossom serverAllowAsk per uploadNot available
StorageAllowAllowAllow
Open a Flotilla page through an intentAllowAllowAllow

An admin's install covers the space where they installed it, and only actions that stay in that space. The same napplet opened from a chat card in another space, or from a link, gets the normal prompts. Admins already hold the space's content, so installing an app vouches for one more party, as adding a bot does in a Discord server. Users can still turn off any app for themselves in Settings → Apps.

The first-open prompt for a non-installed app says what sharing means: "This app can read messages in Makers Guild. Anything it reads can be sent to its author."

Posting as the user#

Publishing without a prompt is the riskiest grant, because an app could post as the user without the user noticing. Every napplet publish goes through PublishBuilder.withDelay, with a toast that names the app and offers undo: "Wiki posted as you · Undo". Flotilla also limits how fast one app can publish. With a NIP-46 signer, the bunker may prompt as well.

Pinned versions#

A pin names an exact artifact hash. An update from the author doesn't run in a space until an admin accepts it, so prompt-free grants always cover bytes an admin chose. The hosting panel shows what an update changes: its domains, kinds and intents.

Grants a user gives are keyed by napplet address, artifact hash and scope, so an update asks again. Storage is keyed by napplet address, user and scope, so an update keeps its data and two spaces never share it.

Withholding data#

Flotilla gives a napplet less than the protocol allows, so a leak proves and reveals less.

  • No signatures. Events reach napplets without sig, and keep their id for references. A leaked event can't be proven to come from its author. This matches the policy_strip_signatures setting hosted relays already have. It limits proof, not disclosure, and a signed copy leaked elsewhere still matches. Napplets that repost ask the shell to do it.
  • No resource prefetching. Sidecar pre-resolution stays off, as NAP-RELAY requires by default.
  • No DMs. The dm domain and publishEncrypted aren't offered.

Residual risks#

RiskStatus
A napplet leaks what it reads through its own navigation or WebRTCInherent. The host page applies Kehto's WebRTC and nested-frame locks.
An admin installs a malicious appThe admin is responsible for the space, members see who installed it, and members can turn it off
A napplet hides data in content it publishesUndo and rate limits narrow it. Content inspection is heuristic.
Side channels between frames in one processOutside NIP-5D's guarantees. Capacitor runs every frame in one WebView process.