beetlebug▾
/

Security

Report a security problem in private, with a new security advisory. Do not use a Discussion or an issue for it. A problem of ztcl itself (an isolation level, a capability, a limit) goes to the advisories of ztcl.

What jcode can reach

An agent reads and writes the files of its work folder. With --run, it runs commands at its isolation level. The daemon calls AWS Bedrock with the AWS credentials of the user. It listens on 127.0.0.1 only.

What protects what

Part Protection
The file tools Each path is resolved, with each link followed, and refused outside the work folder. A file larger than 16 MiB is refused.
The commands The isolation level (Isolation). none, and --net at the level process, give the agent the power of the user.
The checks A check runs at the level none with a command that the agent cannot change. The agent can change the files that the command reads.
The API The token of the state folder (mode 0600), or a passkey session. A request with another Host gets 421. A request with the token and an Origin is refused.
The web page A passkey; the first one needs the one-time code of the terminal (5 tries). A session cookie that is HttpOnly and SameSite=Strict. Each POST needs the Origin and the CSRF token. A Content Security Policy with no inline script.
The shared secret Off by default (serve --secret-login). 160 random bits in the file web-secret (mode 0600). A compare in constant time. 5 wrong tries lock it for 10 minutes. It gives the same session cookie as a passkey, with the same Origin and CSRF checks.
Agent text Data only. The page puts it into the page as text. The command line and the terminal client replace each control character.
The server At most 64 connections, a head of 16 KiB, a body of 1 MiB, and 30 s for each request.

What it does not protect

Known gaps