Five rounds of adversarial review hardened the CLI’s filesystem writes. What remains is a short list of races Node gives no way to close — and, kept apart at the end, two limits with no attacker at all: one that is Cloudflare’s rather than ours, and one that is the terminal’s.
They are written down here because a limit nobody recorded reads as a limit nobody saw.
The threat model, first
What the kit does guarantee is compatibility. The limits below mostly concern the config directory, where secrets live on your machine and pithy secrets writes them.
Every item below needs an attacker who can already write to your project directory.
Somebody with that access can add a postinstall to package.json, drop a .git/hooks/pre-commit, or edit pithy.config.ts. Each is arbitrary code execution as you, immediately, with no race to win.
Against that adversary, hardening a generated .dev.vars against a planted symlink is a lock on one door of a building with no walls.
So these are accepted, not ignored. The bar they fail is relevance, not severity.
The lstat → readlink window
The path walk lstats each component, checks the owner, then reads it as a link. Two syscalls, one name, and the name is the attacker’s to change between them.
Closing it needs openat(2) against a directory descriptor, which Node does not expose for a relative walk.
The inode check → rename window
The inode at the temp name is compared against the file the bytes actually went into, immediately before the rename.
rename is path-based and Node ships no renameat, so a swap landing inside that gap still wins.
The check turns a reliable escape into a narrow race. It does not close it.
A pre-positioned file the kit already owns
An existing target’s mode is carried onto the temp file, so your deliberate 0600 survives a write — and a mode read off a file another uid owns is refused.
Somebody with directory-write can still move a world-readable file the kit owns into place.
What holds is the ceiling: a mode wider than the one the caller asked for is never adopted. The residue is exotic.
Bind mounts and hard-linked directories
Recursive deletes resolve the target with realpath and require the result under the resolved project root.
realpath resolves symlinks and nothing else. A bind mount at apps/ presents a path that resolves inside the project while the bytes live somewhere else entirely — and the delete follows it.
Detecting one means reading the mount table, which is platform-specific and not portable.
Windows has no uid model
The rule separating your symlink from a planted one is ownership — symlink(2) stamps the creating uid, and only root may change it afterwards.
Windows has nothing to compare, so the ownership check returns early there and a mode is adopted from anyone.
The mode ceiling still holds, and that is the half that stops a widening. The source says so at both sites.
An editor the kit has nothing to say about
pithy secrets edit refuses a known GUI editor given no wait flag — and names the flag to add.
There is no portable way to ask a program whether it will block, so an editor absent from that table is spawned and waited on, and one that returns immediately hands back a draft nobody has typed into yet.
What that costs is bounded on purpose. An untouched draft is byte-identical to the file it came from, so the run reports unchanged and writes nothing. It never overwrites the edit still in progress in your window — your later save lands in the draft file beside the real one.
pithy secrets edit is not the command that loses an edit.
Windows runs .cmd files through a shell
Every .cmd the CLI runs goes through one resolution — the package managers and their runners, wrangler, and the editor. Node refuses to spawn a .cmd directly, and its own shell: true re-quotes a line that is already quoted, so the CLI builds the cmd.exe /d /s /c line itself: the command word caret-escaped, every argument quoted whole with its metacharacters escaped.
The quoting is not optional, and neither are the escapes. A Windows home directory with a space in it is the common case, and a registry range like zod@^3.23.8 or a path like C:\work\R&D\app is syntax to cmd.exe if it arrives bare. What reaches that shell unescaped is your own $EDITOR, which is what $EDITOR means on every other tool too — so an unquoted EDITOR whose path has a space in it is split there, and quoting it is your half. Measured on Windows 11: the file argument arrived whole, and only the unquoted variable split.
Verified on a Windows host. CI runs a .cmd shim from a directory with a space in its name through the real editor path on a Windows runner and checks the file path arrives whole, and runs a package-manager spawn through the same resolution and checks hostile arguments arrive at the child byte for byte.
The tripwires read source text
Three build-failing rules guard the filesystem writes. The import half is decidable and hard to evade; the rest is a heuristic over source text, and its blind spots are on record beside it:
- A path arriving as a function parameter is invisible.
- A fresh name appended to a cleared path reads as cleared.
- A path that never names
appsorcapabilitiesin its own module is never examined. - The recursive-delete rule matches call text, so an aliased import evades it.
- A mutating call’s created path is read from its first argument — and
symlink(target, path)creates its second.
Neither obvious alternative is the right home. A lint rule matching expressions cannot express a conjunction of a module fact and a call, and TypeScript 7 ships no standalone parser — its AST arrives only through a compiler server that needs a resolved project and says in its own specifier that it is unstable.
Internationalized domain names
This one has no attacker. It is a thing Cloudflare will not do, which the kit refuses rather than pretends to support.
A Worker cannot answer on an internationalized domain, so pithy.config.ts refuses one. müller-shop.de is refused, and so is xn--mller-shop-9db.de, which is the same name encoded — the form DNS actually carries.
The limit is Cloudflare Workers’, not ours. Tested against a live zone on 2026-10-03: adding an internationalized hostname as a Worker Custom Domain returns “Internationalized Domain Names not supported” in Cloudflare’s own dialog. DNS accepts the record, and Cloudflare issues a valid certificate for it. It is the routing to a Worker that does not exist.
So the refusal happens where you declare the domain, where the message can name the reason, rather than at a deploy that would never answer. If Cloudflare starts routing them, Pithy can support them — the kit’s side is a validator change, not a redesign.
Rebuilding pithy dev’s screen erases the shell output on it
This one has no attacker either. It is what a terminal that rewraps does to a screen being redrawn.
The live roster is the one region pithy dev redraws, and it is redrawn by erasing the rows of the last frame, counted up from the cursor. A terminal that rewraps on resize — Windows Terminal does — moves those rows, so the count goes stale and the erase lands on the wrong ones. That used to stack a stale rule and header on the screen at every tick of a drag.
Now nothing is redrawn by a count while the terminal is reflowing. The cursor rests on the roster’s first row, and every resize event erases from there down — an erase writes no rows and scrolls nothing. The roster’s own resize redraw is held for the length of a drag, and it runs once, when the size has held for 150 ms, at the final width. A drag that crossed more than one size also rebuilds the screen: the visible rows are erased, and the tail of your output that fits is restated at the new width, measured in rows rather than lines, so it fits the screen with the roster under it. Three earlier repairs tried to make the erase count right instead; each moved the debris and none removed it, because the count is a value the terminal does not disclose.
What the rebuild costs is what was on screen before pithy dev started. Its erase covers the visible rows, so the shell output above pithy dev’s first line — the command that started it, and what it printed — goes, and it is not in scrollback to come back. Your own output that had already scrolled up is untouched, one copy each, and what the rebuild erases it restates.
The rebuild stays because the erase alone provably misses. With it removed, one of five identical runs left a fragment of the roster’s rule on screen. The alternative that reaches everything — erasing scrollback and replaying the session into it — takes your shell history above pithy dev with it and grows with every line the session wrote. A screen that is right, at the cost of the shell output on it at the first rebuild, is the trade. Verified on a Windows host: CI drags a real ConPTY wide to narrow to wide and reads the whole buffer, scrollback included — one header, two rules, every line of output in order, and no line more than three times, since a redraw racing the terminal’s reflow can deliver a line at the edge of the screen again. Before the fix the settled screen read four headers.