Skip to content
Releases

Security model

Flint protects two things: the vault file, wherever it is copied, and access to an unlocked vault on your own machine. The first is settled. The second is where Flint is heading next, and this page says plainly where it stands today.

Whoever copies the file (from a cloud folder, a backup, a stolen disk) gets nothing without the master password:

  • the whole file is encrypted with SQLCipher (AES-256), hostnames, users, notes and known host keys included;
  • passwords, private keys and passphrases are sealed again with XChaCha20-Poly1305, each bound to its own field, and opened only to connect;
  • the key comes from the master password through Argon2id (256 MiB), so guessing it is slow;
  • a weak master password can be replaced (flint vault passwd, Settings → Vault): the vault is re-encrypted under a new salt and key in one rename, so a copy taken before the change still opens only with the old password. Flint shows a strength estimate as you type it, and a remote vault will need Strong (3 of 4) or better.

Vault format has the details.

No flint command prints a stored password, key or passphrase, with or without --json, and Flint never takes a secret from a command-line argument or an environment variable, where it would leak into ps and shell history. The desktop app shows a saved password only when you press reveal, and copy writes it to the clipboard without passing it to the page, then clears it after 30 seconds. A remote desktop’s Type host’s password types it into that host’s session the same way, opened and typed by the core, never in the page, and only after your presence check (Touch ID, the system’s password, or the master password), each time.

The window’s web view keeps nothing you type: its form autofill and password saving are off, and on Windows what WebView2 had stored before Flint 0.31 is removed once, at the first start. A release build has no web inspector and no browser menu, so nothing in the window can read the page while a vault is open; FLINT_DEVTOOLS=1 turns the inspector on for diagnosis (Build from source).

So a script or an AI agent that uses Flint gets results, never credentials. See Use Flint with an AI agent.

Flint asks before it trusts a new server key, records it in the vault, and always refuses a changed key before any credential is sent. It does not read ~/.ssh/known_hosts. Jump hosts are checked the same way, one hop at a time. See Connecting.

A remote desktop server’s certificate is checked by Flint, not by FreeRDP: the first one is shown with its SHA-256 fingerprint and kept in the vault once you trust it, and a changed one is refused before the password is sent, with no way to continue. The old Standard RDP Security, where no certificate is checked, is refused. The password goes to FreeRDP only to sign in and is wiped from its memory once the session is up. The desktop’s frames reach the page over a channel on 127.0.0.1 that answers only requests carrying a 256-bit random token, made per tab, sent to that port by number, and readable by no other web page. See Remote desktop → Security.

Flint never leaves a process of its own running on a server. The one thing it starts there for itself is the server resources loop of a terminal tab: a read-only sh loop on a second channel of the tab’s own connection, which reads files under /proc and runs df, writes nothing, and ends when the tab, its connection or the setting ends it. It sends Flint numbers only, and nothing it reads is stored. Commands you or an approved program run (flint exec) are yours, not Flint’s.

A password, key or passphrase opened from the vault is overwritten as soon as SSH or RDP has it, and so are the bytes it was opened from; the keys derived from the master password are overwritten once the vault has been opened with them. Locking wipes the vault’s key itself. This is done with libsodium’s sodium_memzero, and it is best effort: the libraries Flint hands a secret to keep their own copy while they need it.

The key of an unlocked vault lives in the running Flint app. The flint CLI never reads it from the OS keychain: it asks the app over a local socket (mode 0600 in the config folder; a connection from another user is closed unread), or you type the master password for one command (details).

Who Today
You, in the app Unlock with the master password. The app reopens the last vault on launch without it only if you ticked Remember on this computer, which saves the key in the OS keychain; on a Mac with Touch ID that key opens only after Touch ID, at launch and, when you click Unlock with Touch ID, after a lock. Nothing recovers a forgotten master password
You, in a terminal Through the app while the vault is unlocked there; otherwise the master password, for that one command
An AI agent you started Only once you approve it in Flint’s window: the hosts, actions and time you chose, as the host’s login user. Never a password or a key. While the vault is locked, locked, and Flint’s window asks you to unlock, naming the command
Another program running as you The same as an agent: Flint asks you before it runs anything, naming the program. On Linux, if you ticked Remember on this computer, it can read that key from the Secret Service, which has no per-app access list
A person at your unlocked computer Nothing from a window you closed to the menu bar or tray: it opens with Touch ID, polkit or the master password. Everything in a window left open
A person with your file but not your computer Nothing, without the master password

The vault locks on its own: after the idle time in Settings (1 hour by default), when the screen locks and before sleep. Locking wipes the key from memory; until you type the master password again, nothing (the CLI, an agent, a new session) can use the vault. Sessions already open keep running. See Locking.

Every flint command that reaches the app is checked against a grant before it runs. Flint identifies the caller from the socket itself (the kernel gives the peer’s process id, never a claim the caller makes), walks up its parent processes past flint and any shell, and ties the grant to the first real program by its process id and start time: Claude Code, a terminal, tmux. A grant is scoped (hosts or groups; read, run commands, change the vault) and expires; it ends when the vault locks and when Flint quits, and it is never written to disk.

Allowing needs presence: Touch ID or the Mac’s password (macOS), the login password through polkit (Linux: the dev.flint.approve action, which the .deb and .rpm install, or a build from source copies from packaging/linux/dev.flint.policy), or the vault’s master password. A program that can click Flint’s window still cannot approve itself. Denying needs nothing.

Tokens (flint token create) are for programs nobody starts from an approved terminal: a cron job, CI. A token is a grant with a secret, kept in the vault: Flint stores only a BLAKE2b hash of the secret (libsodium) and compares it in constant time; the token is printed once, to whoever created it. Creating one is approved in Flint’s window every time, with presence, and no grant or token covers it, so an approved agent cannot turn its hour into a month. A request with FLINT_TOKEN is decided by the token alone and refused at once outside its scope, after it expires (90 days at most) or once revoked. A token never unlocks the vault.

The activity log records every command a caller ran or changed through Flint and every request refused: when, which program (and token), the host and the whole command (up to 16 KB), never a flag’s value or a secret. The entry is written before the command runs and completed when it ends, with its exit status, how long it took, and Flint’s error code when Flint stopped it (a refused sudo password, a timeout); a vault locked meanwhile leaves it without a result. Allowed reads are not recorded. It is this machine’s: a file of its own in the config folder, encrypted with a key derived from the vault’s, and never inside the vault, so a vault that syncs carries no log and is not rewritten on every flint exec. It keeps entries for 30 days, 90 days (the default), 1 year or with no limit, set on each machine in Settings → Access and nowhere else: no CLI command changes it, so a program allowed to change the vault cannot shorten the record of what it did. Past about 50 MB the oldest entries go whatever the setting. Read it, or Back up activity… (a copy of the file, still encrypted), in Settings → Access.

What a grant runs is on screen. Each command a grant allows shows in a notice in Flint’s window, one per grant, with Stop (unless you turned that off for the grant or by default). The notice and the event behind it carry the program’s name and the host, never the command: only View, opened by the person at the screen, shows commands, as the activity log does.

What you approve is what runs. The approval window shows the command read from the arguments Flint is about to run, not from words the program sends to describe itself, and Show full command opens all of it. Viewing a command needs no Touch ID or password: presence protects allowing, not reading. A whole command never leaves the vault and the app: it is not written to Flint’s own log or to any error.

sudo you approve (flint exec --sudo): a command as root is approved in Flint’s window one at a time, with presence, showing the exact arguments; no grant or token covers it. Flint runs sudo -S -k -p <random prompt> -- <arguments>, each argument one shell word, and writes the host’s sudo password (sealed in the vault, or the login password) to sudo’s stdin only when that random prompt appears, so a command printing a fake prompt gets nothing. The prompt and the password never reach the caller, the log or the activity; -k leaves no sudo session cached for a later command. It runs only in Flint, never on a typed master password.

Root for a while is the one exception to one at a time, and only with Allow sudo for a while turned on in Settings → Access (off by default). A root period is a grant of its own kind, given in the root approval window with presence once: one caller anchor, one host, exec --sudo only, 2, 5 or 15 minutes from the approval, never until the vault locks. Each command it allows shows in its notice while it lasts. No grant, token or exec grant implies root, and no period covers a group or the whole vault, another host or a plain exec. A command that starts inside the period runs; one already running is never cut. Turning the setting off ends every period, as revoking one, locking or quitting does. Flint still types the password per command and keeps -k, so the period exists only in Flint’s memory, never as a sudo session on the server. A sudo password typed in that window, if not saved for the host, is kept in that memory for the period and dropped when it ends. The setting is this computer’s, like the grants it allows: turning it on gives nothing by itself, since a period is still given in the window, for one host, with presence.

What a grant does not stop: a program running as you that is a child of an approved program shares its grant, and a program that can control the approved one (debug it, type into its terminal) can act through it. Limits today shows how to narrow what an agent can reach.

Closed to the menu bar or tray, Flint keeps serving approved callers but locks its window: until Touch ID (or the Mac’s password), polkit or the master password opens it, the window’s page gets nothing from the vault (the app refuses it every read) and cannot type into the sessions behind it. The vault’s own lock is the stronger one: it wipes the key and ends every grant.

Remember on this computer is a choice at unlock, off by default, with the risk in plain words: it saves the vault key in the OS keychain so Flint reopens without the master password. Without it no key is written there; the keys earlier versions cached on every unlock are removed once.

On a Mac with Touch ID, a release of Flint keeps those keys (on by default; Settings → Vault → Touch ID turns it off, an explicit choice Flint confirms with Touch ID) in the data-protection keychain behind a user presence access control: macOS releases a key only after Touch ID or the Mac’s password, one prompt per open, with a two-minute deadline. Only a release of Flint can use that keychain: it needs Flint’s Developer ID signature and its provisioning profile, which no other program, ad-hoc build or the flint CLI carries. The first start of such a Flint moves the keys already remembered behind Touch ID. See Touch ID to open a vault.

flint-vault-server stores each vault file exactly as Flint uploads it, encrypted in full, with a version and the vault’s id. One server keeps all of one person’s connected vaults, each under its id. Beside each it keeps the label you may give a vault when you connect it, in clear: it is the one thing the server holds that you wrote, so leave it empty when a vault’s name is itself private. It never receives the master password or any key and never opens the file, so whoever holds the server or its token reads only ciphertext; your master password is then what stands against an offline attack, which is why Flint asks for a strong one before it connects.

The token says who may talk to the server. The server can keep only its BLAKE2b hash (libsodium), compares it in constant time, refuses a short one at start, and locks a client out after 10 wrong tokens in 10 minutes. Every request has a size cap and a deadline, and each client a rate limit; the number of vaults is capped too. The log never holds a token, a header’s value, a label or a file. A stolen token can still upload to every vault on that server, so the server keeps the last 10 versions of each and any of them can be restored; a machine never replaces its own copy with a download, it merges it.

On each machine (Sync a vault across machines):

  • The token lives in the OS keychain, apart from the vault’s key (which the CLI never reads from it), and travels only to the server, in the Authorization header. It is never printed, logged, written to the config folder or part of an error. Typed or pasted in the desktop app, it goes from the form to the keychain and never comes back to the page: Settings shows only that one is saved. A replaced token is tried against the server before the old one is dropped.
  • On macOS the token’s Keychain item is open, with no question, only to the desktop app and the flint CLI inside it, named by their Developer ID signature (so an update signed by the same developer still matches); every other program gets the Keychain’s question. The vault’s key, kept by Remember on this computer, stays the app’s alone: the CLI, which never uses it, would be asked too.
  • The desktop app’s Connect to a remote vault (and flint vault connect --list) learns only what the server can tell without a key (each vault’s id, label, size, version and last change) until the master password you type opens the download.
  • Flint refuses http:// for any server but this machine, follows no redirect, and bounds every request (10 s to connect, 2 minutes in all, 64 MiB at most).
  • A vault connects only with a Strong master password, typed for that command.
  • A downloaded copy is opened with the vault’s key through a private file (0600) in the config folder and must carry the vault’s id; then it is merged into the vault in one transaction, never written over it. An upload names the version it merged (If-Match), so a machine never uploads over a change it has not seen.
  • remotes.json holds the vault’s path and id, the server’s URL, a version and a hash of the encrypted file: nothing from inside the vault.

The same server carries the relay for a paired iPhone: see A paired iPhone.

The desktop app checks for a new version at launch and every hour (it can be turned off: Updates). The check is two GET requests over HTTPS, to Flint’s latest release on GitHub: manifest.json and manifest.json.sig. They carry no cookie, no identifier and nothing about the machine or its vaults; each has a deadline (10 s to connect, 30 s in all) and a size cap, and redirects are followed over HTTPS only.

  • Signed with Flint’s own key. The release workflow signs each manifest with an Ed25519 key kept only in its protected release environment and the maintainer’s secret store, never in the repository or a package. Flint carries the public key and verifies the signature (libsodium) before it reads a byte of the manifest. A manifest that does not verify is ignored and the app says the update information did not pass verification.
  • Only this project’s releases. A verified manifest must name a release version and point at this repository’s releases on GitHub; anything else is refused. Drafts and pre-releases are never offered.
  • Nothing unverified is unpacked. Download fetches the package the verified manifest names, over HTTPS with a connect deadline and a stall deadline (30 s with nothing received ends it), capped at the size the manifest gives. Its SHA-256 (libsodium) must match the manifest’s before it is unpacked, beside the installed app; a mismatch deletes it and nothing is retried on its own.
  • The same developer, on macOS. From 0.38.0 releases are signed with a Developer ID (hardened runtime, the microphone as the only entitlement) and notarized. The unpacked app must pass codesign --verify --deep --strict, and over a Developer ID-signed Flint it must carry the same Team ID; it is checked after Download and again before the swap, and a failure deletes it like a SHA-256 mismatch. An unsigned install (a build from source, a version before 0.38.0) takes any app that verifies, so the first signed version reaches it. This adds to the manifest’s signature; it does not replace it.
  • You decide when. Nothing is applied until you choose Relaunch, and nothing at the next launch if you don’t. Relaunch starts flint update-apply from a copy of the new flint outside the app, which waits for the app (and any flint running from it) to quit, swaps the two folders by renaming them, and starts the new app. Until the new app says it has started, the old folder is kept; if it does not, the old one is put back and opened. No file in use is ever overwritten.
  • On Linux, root checks again. A .deb or .rpm is installed by the package manager as root, and the app runs as you, so the app’s own check is not enough: a program running as you could swap the file between the app’s check and the install, and gain root with the password you typed for Flint. So Relaunch runs pkexec /usr/lib/flint/flint-update-root under its own polkit action, dev.flint.update, which asks for the system password every time (auth_admin, never remembered). The helper takes no argument and no path: it reads only ~/.cache/flint/update/ of the user pkexec names, opening each folder and file without following a link and taking only plain files that user owns; copies them into a folder only root can write; and on that copy verifies the manifest’s signature against the key compiled into it, that it names a release newer than the installed one (never a downgrade or a reinstall) with a package of the installed format, and the package’s size and SHA-256. Only then is the copy handed to apt-get install or dnf install, with a deadline. Any failure installs nothing. The helper links libsodium and nothing else of Flint’s: no SSH, no vault.

Nothing leaves the machine to tell you something unless you turned it on: phone alerts are off by default (Alerts on your phone). When on, Flint sends one POST to an ntfy topic per request that waits for you, with one of two fixed texts (An agent is waiting for your approval, Flint is locked and an agent is waiting), a title and a priority. The text is chosen by kind inside Flint; nothing of the request (no host, user, command, program, vault or count) reaches the code that sends it. An alert answers nothing: approving, denying and unlocking still happen at the machine.

The topic is random (libsodium, 120 bits), per machine and kept in its settings, not in the vault. Whoever knows it can read those two texts or send alerts to your phone, and nothing more. Each publish has a deadline (10 s to connect, 15 s in all), is never retried, and its failure never changes the request it was about.

A phone paired in Settings → Phone (Approve from your iPhone) can answer what an agent asks for. What it can and cannot do:

  • Off until you turn it on. Each phone’s Approve from this phone is off when it pairs. With no phone paired, Flint opens no connection to the relay and sends nothing.
  • Pairing proves both ends. The link carries a one-time secret, works once for 10 minutes and reaches the page only while the pairing waits; no log names it. The phone’s offer is sealed to this computer’s key and authenticated with that secret, and both screens show a 12-digit code from both keys that you compare before anything is kept. The pairing is kept in a file of its own, encrypted under a key held in the activity file, so it is as protected as the activity log.
  • The phone holds nothing secret. It gets a request’s details (program, command, host, jump host, user, root, times), sealed end to end (X25519 session keys, XChaCha20-Poly1305, padded to 512-byte blocks) and kept in memory; never the vault, a password, a key or a command’s output.
  • An Allow is signed by the phone and checked by the computer. The phone signs the request id, a hash of the command, the host, root or not, the duration, an expiry and a nonce, in one canonical encoding, with a P-256 key made in the iPhone’s Secure Enclave: it never leaves the phone, and every signature needs Face ID. The computer verifies the signature against what it asked (with OpenSSL: libsodium has no P-256, the one exception to libsodium only) and refuses a changed command, host or duration, a replay, or an answer past its expiry. A verified Allow stands for the presence check at the desk; a root period from the phone keeps every rule of a root period (Allow sudo for a while on, one program, one host, at most 15 minutes, a notice for each command).
  • The server only relays. Besides the vault API it keeps machine and phone ids, each phone token’s BLAKE2b hash and times on disk, and sealed messages in memory only, capped and dropped after 30 minutes. It never logs a token or a message’s body, and cannot read, approve or forge an answer.
  • Unpairing removes the phone on the server, which closes its connection, and then on the computer.

Windows (a named pipe and Windows Hello), a headless flint serve, and the same presence check before a remembered key on Linux (polkit, fingerprint). The design and the reasons behind the access model are in the repository: docs/vault-access-model.md.