alexandria.marketplace

airlock

Lets an untrusted app read only files you pick.

Benjamin a. Mowinckel

Airlock lets an app you don't yet trust read the files you pick, and nothing else you own. The app gets a private room holding only those files, and whatever it writes back arrives as a note your own model reviews, never an instruction it follows.

Once it is added, tell your model Airlock this new tool: and the app's name or web address. Your model sets up the room, gives you one message to send the app, and checks that the app's first test note came back. Each app gets a room of its own, so trying a second one leaves the first as it was. To stop a room, tell your model to turn that airlock off; to remove an app for good, revoke its GitHub access and delete its room.

Why

  • An app can only leak what it can reach. So it reaches the files you chose and nothing else, and the files you chose are the whole of what the room offers.
  • The wall has to be an account, not a label. Some apps ask for access to a whole GitHub account, so a private repository inside your normal account would show them every repository you have. A separate account holding nothing of yours is a wall no instruction has to hold up.
  • Words from an app you don't trust are data. Anything it sends back may be written to steer your model, so it arrives marked untrusted and changes nothing on its own.
  • One room per app. It keeps clear what came from whom, and it lets you retire one app without touching the rest.
  • What you approved is what leaves. Public pages may stay current on their own, because anyone can read them already; anything else leaves at the exact version you approved and no other.

How

What you do, and what your model does

GitHub keeps a few steps for a person: you create the second GitHub account once and sign into it, and you approve, and later revoke, each app's access to it. Everything around those steps is your model's: it prepares the files, runs the checks and gives you each command.

Saying Airlock this new tool: <name or URL>, or pasting the request from the untrusted-tool door on https://alexandria.place/connect, is your yes to prepare the room on your computer and one private repository named for the app, in a room of its own that leaves every other room as it is. Your model then hands you one ready-to-send message for the app with the real repository address filled in, and once the app has written a labelled test note, imports it and checks it reached your record. If you pick anything beyond your public Library pages, your model shows you exactly what will go, with each file's content hash, and waits for a separate yes before it leaves.

For example, to try a new notes app on your published essays alone, you say Airlock this new tool: <the app's address>, pick the essays, send the app the message your model hands you, and its first note lands in your capture folder marked untrusted.

What the app sees

Each room has three parts:

  • context/ holds only the files you chose.
  • inbox/ is where the app writes back. An app on your team (the team module) keeps its team work under inbox/team/.
  • GitHub issues labelled airlock-capture take notes from apps that can open issues but not write files.

The repository only carries your files there and carries the app's notes back, and the app's name on it is only so you can tell the rooms apart.

If everything you picked is already public on your Library page, the room keeps itself current. Anything else waits for your approval of the room's plan. After that, Library pages you approved for another audience (members, an invite, a group) follow the versions you approve for that audience, and every other file stays exactly as you approved it, so the room is frozen as a whole until you approve the changed version.

What comes back

Everything the app sends lands in your capture folder marked trust: untrusted, except team work under inbox/team/, which goes to data/input/external/digital/active/communications/team/<tool>/ for the model that runs your team (the team module), marked the same way. Nothing it sends can change your files, run a tool or become part of your canon on its own.

The second GitHub account

The Airlock account holds one private repository per app, each named for that app, and belongs to no GitHub organization. It never gets your Apple login, a credential for your own repositories, your private Git history or any unrelated repository. A repository made under the older <tool>-airlock spelling is the same Airlock.

The access you grant is what keeps each app in its room. Give every app access to its own repository only. Access limited to one repository reaches nothing else in the account, even with other rooms beside it. Access to the whole account does reach them, so an app that demands it signs in as the Airlock account itself, reads every room, and is told to write only to its own, which keeps clear what came from whom as long as it does. Never make a further account for it: GitHub allows each person one free personal account and one machine account, and a third can put your main account at risk.

Which kind of access an app has is recorded when it is connected, as you say it. The plan for every further room names each app recorded as signed in as the whole account, which will read that room too, and keeps a general warning while any room's access was never recorded. The README of a room whose app is recorded that way tells it to write only to its own repository and never to add a collaborator, deploy key or webhook.

Rooms on your computer

Each room has its own name (airlock for the first, airlock-<name> for each after it), state, approval and repository, and every session start imports them all. A new room never replaces another, and never shares another's checkout or repository; a room that cannot be read is reported and never stops the others importing.

Importing and refreshing

The signed controller is airlock.py, fetched through the verifier as scripts/airlock.py; its exact commands and consent boundaries are in system/.optional § airlock. It accepts only regular text files you named under data/ (a room written before the data layout names them under files/, read where they are now), and needs your approval of the room's plan whenever any chosen file is not already public on your Library page.

When it imports, it fast-forwards the files the app wrote, checks that what it exported is still byte for byte what you approved, wraps both kinds of return as untrusted captures (team work as untrusted team notes), and closes an issue only once its capture is on your computer and, while your backup is on, only once that capture is in the backup. It may then rebuild the room's context from your own files, but only while your approval still covers it (beyond public pages, an approval you recorded yourself outside the sandbox with permission.sh grant <room>): every Library page at the version approved for its audience, and every other file at its approved version.

Status and turning it off

status shows the account, the app in the room, how that app reaches GitHub as recorded, which other apps can read the room, anything on the room you did not accept with the commands that accept or remove it, the repository, hashes, the issue label and import counts. off stops that room's refresh and import on your computer.

To remove an app for good, import its last return, revoke its GitHub access, then delete or rebuild its repository; the other rooms are untouched. An app signed in as the Airlock account itself is also signed out, with any app, token or key it added to the account and anything it left on any room (a collaborator, deploy key or webhook) removed, and the account's password changed if it ever had it. Deleting or rebuilding the repository clears what the app sent back before the account is used again.

Limits

What the controller checks before anything moves

Before every fetch, push or issue import (the session-start import checks once per run, before its first), the controller checks the credential's identity, the expected repository named for the app, the account's organizations, the repository's visibility, and the complete list of repositories the account can reach: every one must be one of your own declared Airlocks.

Each room is checked too, at the same moments. The controller never adds a collaborator, deploy key or webhook, so before any network step for a room it lists that room's collaborators, pending invitations, deploy keys and webhooks, and anything you have not accepted stops the room: nothing goes to it or comes from it, and the refusal names each one with the command that accepts it and the one that removes it. Accepting is your own step, run outside your model's sandbox and kept where the model cannot write, and covers the item as it stands, so a webhook that later sends somewhere new needs a new yes. Nothing is ever removed on its own, and a list GitHub will not give means the room could not be checked, which stops it the same way.

What it refuses

It refuses a path that climbs out of its folder, a symlink, a binary or oversized file, private content that changed since you approved it, changed exported context, changed protected paths, rewritten history, the wrong GitHub identity, a generic or wrong repository, any organization membership, access to any second repository, and a collaborator, pending invitation, deploy key or webhook on the room that you did not accept. Changed private content never refreshes on its own, and nothing the model writes widens what leaves.

What it cannot promise

An app can send back words meant to steer your model. Airlock makes those words untrusted data; your own model still has to review them, never obey them.

Sharing one account costs something: the wall between rooms is the access you grant, and for an app signed in as the whole account only an instruction, while the wall between the Airlock account and everything else you own stays structural. The controller cannot see how an app actually signed in, so everything that uses the record of an app's access words it as recorded.

When it is off

Airlock reaches outside your computer, so it waits for its own yes: it is never part of the default setup (Foundation) or onboarding, and being listed in the marketplace does not turn it on. Turning a room off or removing an app never touches your own files or repositories.