Passing secrets as command-line arguments is a bad default, because a process's arguments are among the easiest things on a computer to read. On Linux, /proc/<pid>/cmdline is open to every user unless /proc is mounted with hidepid. On a Mac, /bin/ps runs as root and prints every process's arguments to every account. We still put one secret there: the engine takes each profile's cookie password as --os-crypt-password. This is why, and the threat it does not cover.
Passing secrets as command-line arguments: who can read them
Three readers, in the order people forget them:
- Other processes on the machine. Linux's
proc(5)page says it plainly forhidepid=0: "Everybody may access all /proc/pid directories. This is the traditional behavior, and the default if this mount option is not specified." The command line is one of the files in there. - Your shell's history. A secret typed after a command name lands in
~/.zsh_historyor~/.bash_history, in plain text, for ever. - Anything that logs command lines. Process monitors, CI logs that echo each step, and crash reports that record how a program was started.
On macOS we checked the first one on our own machine, macOS 26.7.1, from an ordinary account. Asking the kernel directly for another user's arguments, through the KERN_PROCARGS2 sysctl, fails with EINVAL. Then ps -axww -o user,args prints root's daemons with their arguments anyway: /usr/sbin/systemstats --daemon, /usr/sbin/securityd -i. The reason is in the file listing: -rwsr-xr-x root wheel /bin/ps. It is setuid root, so the restriction on the sysctl does not apply to it, and every account on the Mac can read every process's command line.
If you are writing a launcher from scratch, pipe the secret into the child's stdin, or hand it an open descriptor (3< in a shell, stdio: ['pipe', 'inherit', 'inherit', 'pipe'] in Node), or write it to a 0600 file and pass the path. An environment variable is a half step: on Linux /proc/<pid>/environ is mode 0400, owner and root only, but every child you start inherits it unless you scrub it.
Your profiles, cookies and proxies stay on your computerIn Mosaic: Local first. Profiles, cookies and proxies stay on your computer. Free covers 3 profiles with no card, and Pro is $25 a month for any number of them.
Mosaic is a desktop app
Email yourself the link and open it on your computer.
The threat it answers
Every Mosaic profile launches with --use-mock-keychain. A Mac has one login Keychain, and a machine running three hundred profiles cannot answer a Keychain dialog for each of them. The flag leaves Chromium's cookie encryption on and swaps the password for mock_password, a constant anyone can read in Chromium's source. Before 0139, we pointed one command at a real profile's Cookies file and had a live session cookie back in about a second:
DECRYPTED -- password "mock_password", offset 32
.dev.to _Devto_Forem_Session = "bb0cbcf3b126b691797c6126a7f3ae48"
That is a threat about files. Somebody walks off with the laptop, or copies a Time Machine disk, or pulls the SSD out of a Mac that died, and every cookie in the folder was theirs.
For that threat argv is a fine place, because Mosaic never writes argv to disk. launcher.ts calls Node's spawn with an argument array and no shell, so nothing lands in ~/.zsh_history. The password itself is not stored anywhere: vault.ts derives it at each launch with scrypt over the library's data key and the string mosaic-cookies:<profile id>. Delete the profile and its key is gone with it. The data key is wrapped under your Mosaic account, so a copied folder opened by a different account, or by nobody signed in, decrypts nothing. How Chromium turns that password into an AES key, and what our change does in keychain_key_provider.mm, is in how every profile's cookies get their own key.
The threat it does not cover
The header of that change names code already running as you. A process with your user id can attach a debugger to the engine or read Mosaic's memory, and the key is in both no matter how it got there. A pipe instead of argv would not stop that, and the header does not claim otherwise.
Writing this post found a second one the header understates. The header says ps can read the key "for the user who started it". On a Mac that is too narrow: through the setuid ps, any account on the computer can read a running profile's cookie password while the browser is open. What that account cannot do is read the jar. The profile lives under ~/Library/Application Support, and ~/Library is drwx------, so the other account sees the password of every profile that is open, and none of the files those passwords open. Joining the two takes someone who can watch the process list while the profile runs and also carry the folder away, which is the stolen-laptop case plus a second account on the same machine.
One question is still open. Chromium can copy some of its switches into a crash report, and whether a crash of our engine would ever put this one in a report on disk is a measurement we have not made. Until we have, "never written to disk" is a statement about what Mosaic writes.
The same trade, made shorter, for launch tokens
The engine also takes a signed launch token on its command line, and there the ps reader shaped the design. An offline launch could have used one long token, but a token valid for a day on argv is a day of replay for anything that can run ps. So a token expires about five minutes after it is made. Pro's offline day works through a key this computer generates and the account server certifies for a day; the engine checks that certificate, and the key's private half never goes on the command line. Everything on the command line is short-lived.
Today no setting moves the cookie password off the command line. App lock (Settings › Security) wraps the data key under a password nobody stores, so a copied disk is ciphertext, and a running profile still gets its key on argv all the same. What the server knows and what stays on the Mac is listed under local-first. If a second person has an account on the Mac where your profiles run, this post is about you; each profile's sessions are in its own cookie jar.
Sources
- proc(5), Linux manual page (hidepid), read November 3, 2026
- proc_pid_cmdline(5), Linux manual page, read November 3, 2026






