LEAN

Reference

Security

What Lean does to stay out of trouble, and what is on you.

The engine is the system's

Pages are drawn by the WebKit that comes with macOS, the same engine as Safari. Lean ships no engine of its own, so security fixes for it arrive with macOS and Safari updates. Keep macOS current. An old macOS means an old engine, in Lean as in Safari.

Pages cannot reach Lean

  • The scripts Lean adds to a page (for scrolling, link labels, filling logins) run in a world of their own. The page cannot see or call them.
  • A page cannot open new tabs unless you clicked.
  • Downloads are marked as coming from the internet, so macOS checks them when you open them.

The server for Claude Code

  • Listens on 127.0.0.1 only.
  • Needs a token, compared in a way that leaks nothing through timing.
  • Refuses requests from web pages and under any host name other than 127.0.0.1 or localhost.
  • Drops half-sent requests after 5 seconds and serves at most 32 connections.
  • Its tools read and navigate. None clicks, types, runs a script or touches passwords.

More on the Claude Code page.

Passwords

Touch ID before the vault is used, a sign-in that belongs to Lean alone, a check of the saved address before every fill, and nothing written to disk. Details on the Passwords page.

Files

~/.config/lean is readable by you alone, and so are the session and the token inside it.

It is attacked on purpose

A test that ships with Lean's source starts a throwaway copy and goes at it: requests without the token, look-alike host names such as 127.0.0.1.evil.example, a stolen token sent from a web page, oversized and deeply nested requests, connection floods, and a hostile page that breaks the JavaScript built-ins and fakes Lean's functions. It runs after every change to the server, the page scripts or the password code.

Reporting a problem

Write to [email protected]. Say which version you run (Lean menu) and how to reproduce it.