govulncheck reports GO-2026-6278: gorilla/websocket v1.5.3 uses a
cryptographically weak PRNG for the WebSocket mask key. The fix is the
upstream commit d67f41855da4, available as
v1.5.4-0.20240701034025-d67f41855da4, and it is reachable from the capture
proxy through go-mitmproxy and from the log sink path.
Bumps the module and go.sum. govulncheck ./... reports no vulnerabilities,
go build ./... and go test ./traffic pass.
The slog migration dropped the [traffic], [egress], [enrich] and [evidence]
tags, so the logs view lost the badge and the level was guessed from the
message text. Put the tag back in each message and teach parseLog to read the
slog level word (2026/11/23 13:48:50 WARN [traffic] ...) before the tag.
Adds parseLog tests for the real slog line, the level words and the legacy
no-level shape.
parseTarget pulls the first URL out of the goal with https?://[^\s'"]+,
which keeps any punctuation that follows it. "Assess http://juiceshop:3000."
matches "http://juiceshop:3000.", url.Parse rejects the port, and the seed
logs "could not parse a target host/IP" even though goalGateCheck accepted
the same goal. A dotted host only survived through the domain fallback,
which takes the scheme from the port, and a sentence-final period stayed
in the host.
Trim trailing punctuation before parsing the URL, including full-width
punctuation from pasted text. A closing bracket is trimmed only when the
URL has no matching opener, so a bracketed IPv6 host like http://[::1]
still parses.
The executor environment kept every name starting with LC_, so a secret supplied under an LC_ name crossed the allowlist even though the comment promised a fixed set of names. The POSIX locale categories are now enumerated and the prefix rule is gone.
Found by jamesKhor in the review of #478.
The Dockerfile and the PostgreSQL service are pinned by digest, so a moved tag no longer changes what a build pulls. A weekly Docker update keeps those pins current without losing the readable tag.
The config comes from #414 by ldevbr; the pins themselves landed in #397.
The timeout trigger used the task id as a watermark, but tasks time out
in deadline order. When a newer task timed out first, the watermark moved
past every older running task, so their later timeouts were never fired.
Keep fired timeouts in a persisted set, the same way met goals are
tracked. On first start the set is seeded with the tasks already timed
out, so nothing replays.
Adding common tools that the agent attempted to use but found unavailable.
This is batch 2 - password cracking utilities.
Tool use evidence
=================
Evidence for agent attempting to use said utilities was obtained by running the
following command from ARTEX repo root:
```
grep -Fr "available" data/transcripts | grep -o -E '.{128}available.{64}' |
grep -Ff <file_with_tool_names>
```
Here's the evidence (with some network addressing info anonymized):
```
rvals). Total about 1–2 minutes. Reasonable.\n\nsshpass is not installed (which sshpass returned nothing). Let me check if it's available… `which sshpass` returned nothing. Alternatives: use expect, or
Python with paramiko. Let me check what's available: python3, paramiko, expect, or hydra/medusa.\n\nLet me check what tools are available.\n"},{"type":"text","text":"Key result: **`Authentications that
XXXXX/XXXXX, XXXXX/XXXX, XXXXX/password, root/root, root/toor, XXXX/XXXX, admin/12345, XXXXX/XXXXX. Let me check if sshpass is available.\n\nAlso, first SSH algorithm enumeration: use `nc` or ssh -v?
,\"tool\":\"Bash\"},{\"is_error\":false,\"kind\":\"text\",\"step_id\":11134,\"summary\":\"I have sshpass, ncrack, hydra, and nc available. Let me first grab the SSH banner and check connecti…\",\"tool\
ot/admin, admin/admin, root/root, XXXX/XXXX, root/(empty).\n\nFor efficiency, let me use hydra or sshpass. Check what tools are available: nmap, hydra, sshpass, curl. Let me check.\n\nFirst, fetch app.
h\n- In parallel, a quick probe of RDP 3389 with default/weak credentials\n\nFirst let me check the environment: what tools are available (Responder, Impacket, hashcat, john), whether I can bind to por
ed ports filtered\" except for the .22 ports listed on the asset.\n\nLet me start with an environment check.\n\nPlan:\n1. Check available tools: responder, impacket-*, hashcat, john, python3, scapy, nm
ocker bridge (gw 172.19.0.1), i.e. L3-NAT to the LAN, **not** on the XXXXXXXXXXX/24 L2 segment; no Responder/hashcat/john/scapy available.\n2. **Service re-probe of both Windows hosts** — TCP 135/139/4
proxy/...\n4. SSH attempts on .1:22 and .6:22 with default credentials (XXXX/XXXX, XXXX/XXXX, root/root, etc.) — use sshpass if available.\n5. Capture evidence and record facts / findings.\n\nFirst, le
te-forcing with common credentials. sshpass is not installed. Check if python3 has paramiko. Or use expect? Let me check what's available.\n\nActually, wait. Let me reconsider. The mock is a \"XXXXXXXX
auth/inform/status. The pre-auth surface is confirmed to be minimal.\n\nNext steps:\n1. Check SSH tools: is python3's paramiko available? What about expect? sshpass?\n2. Try SSH default/weak credentia
n- The host has these services: ssh 22, http 631 (CUPS), nfs 2049, firecrawl 3002, mdns 5353.\n\nPlan:\n1. Check what tools are available (hydra, medusa, sshpass, ncrack?).\n2. Check the working direct
-oracle test with a few users.\n5. Build a user list (~10-15 users) and a password list (~100-200 passwords).\n6. Run hydra (if available) with rate limiting, low concurrency (e.g., -t 2, -f for early
ally, for empty-password testing a better approach is a Python paramiko script or expect. Let me check if python3 + paramiko is available. Or I could use `sshpass -p ''` — sshpass treats an empty passw
attempts failed.\n\nSo the gateway's own SSH credentials have never been tested. This is our line.\n\nPlan:\n1. Check the tools available in the working directory: sshpass, paramiko (python), etc.\n2.
uth is offered.\n\n Alternatively, pure-socket approach: implement minimal SSH transport? Too much work. Better: paramiko, if available; or sshpass if available.\n\n Also, an even simpler pre-check
l: capture id/whoami/hostname and report a finding\n5. HARD: end with a definitive per-line fact\n\nLet me check what tools are available:\n- python3 (no paramiko)\n- sshpass\n- ncrack\n- hydra\n- nc\n
Test with dummy password\n\nFirst, let me grab the SSH banner.\n"},{"type":"text","text":"I have sshpass, ncrack, hydra, and nc available. Let me first grab the SSH banner and check connectivity, then
bin/hydra\n/usr/bin/nc\n```\n\nThere was no `ssh`! So the OpenSSH client is not installed. That's why sshpass failed.\n\nSo the available options are:\n- ncrack (SSH brute-force tool)\n- hydra (SSH bru
nternet access (it's a pentest platform, so probably yes). But wait — do I even want to rely on that? ncrack and hydra are both available, and both are ideal for this use case.\n\nAbout the \"provided
es, hydra has a native ssh module.\n4. For publickey-only vs. password: hydra's sshd module will tell me which auth methods are available (it enumerates them).\n\nAlso check python3 availability and pa
.6`\n\nThis is a scanner on the host — running it solo (no other scanners on this host right now).\n\nThen, if password auth is available, use hydra with a small wordlist (12 combinations, -t 1, low ra
can't type interactive passwords, I should use `ssh` in non-interactive mode with SSH_ASKPASS, or use a tool like `sshpass` if available.\n4. Try a small set of common usernames and weak credentials (
\n\nLet's get started. First, let me check existing credentials and context.\n\nLet me first check the environment — is sshpass available? What tools do I have?\n\nLet me lay out the plan:\n- First, ve
0 seconds. That's within tolerance.\n\nLet's start executing. First, parallel info-gathering:\n- list_task_credentials\n- Check available SSH tools (sshpass, ssh)\n- Quick SSH banner check\n\nLet me ru
6-11-22T12:00:56.02822175Z","type":"message","message":{"role":"assistant","content":[{"type":"thinking","thinking":"sshpass is available, ssh is not in the list output... wait, `which sshpass ssh nc p
o get the banner.\n\nLet me check whether the ssh binary exists somewhere.\n"},{"type":"text","text":"I found that `sshpass` is available but `ssh` wasn't listed, so I'll check if an SSH client exists
both web and SSH to avoid lockout/timeout. Let me check if I have tools like `nmap` NSE (brute) or `hydra`/`ncrack`/`ssh-audit` available. Let me check what's installed.\n\nLet me check available tools
1-20T02:45:50.321611958Z","type":"message","message":{"role":"assistant","content":[{"type":"thinking","thinking":"Let me check available tools (hydra, ncrack, ssh-audit, nmap with NSE, john, etc.) and
type":"message","message":{"role":"assistant","content":[{"type":"thinking","thinking":"No hydra/ncrack/wordlists. nmap 7.93 is available, but the output of NSE brute-force scripts is empty (probably b
T22:27:21.210867438Z","type":"message","message":{"role":"assistant","content":[{"type":"thinking","thinking":"nmap and ssh are available, but hydra and sshpass are not. I'll check what else is availab
ython's paramiko). Let me check python and pip.\n\nFirst, SSH fingerprinting:\n"},{"type":"text","text":"I see nmap and ssh are available but hydra and sshpass aren't, so I'll explore other options. No
ontent":[{"type":"thinking","thinking":"Got a definitive fingerprint: **OpenSSH 10.2p1 Ubuntu 2ubuntu3.8**. Let me check what's available for brute-forcing (hydra/sshpass/paramiko are missing — trying
```
Tool availability evidence
=================
The availability of every tool has been verified from within the contained by running:
```
$ docker compose exec artex bash
root@37bd5b1c2b62:/app# apt-get update
Hit:1 http://deb.debian.org/debian bookworm InRelease
Hit:2 http://deb.debian.org/debian bookworm-updates InRelease
Hit:3 http://deb.debian.org/debian-security bookworm-security InRelease
Reading package lists... Done
root@37bd5b1c2b62:/app# for pkg in hashcat hydra john ncrack openssh-client ssh-audit sshpass; do apt-cache search "^$pkg$"; done;
hashcat - World's fastest and most advanced password recovery utility
hydra - very fast network logon cracker
john - active password cracking tool
ncrack - High-speed network authentication cracking tool
openssh-client - secure shell (SSH) client, for secure access to remote machines
ssh-audit - tool for ssh server auditing
sshpass - Non-interactive ssh password authentication
root@37bd5b1c2b62:/app#
```
Container sizes
=================
Original container size (resulting from `docker compose up -d --build` on base
commit 38c7477):
```
$ docker compose images artex
CONTAINER REPOSITORY TAG PLATFORM IMAGE ID SIZE CREATED
artex-artex-1 artex local linux/amd64 2dabf64dce79 2.11GB 5 minutes ago
```
Container size after the change (this commit):
```
$ docker compose images artex
CONTAINER REPOSITORY TAG PLATFORM IMAGE ID SIZE CREATED
artex-artex-1 artex local linux/amd64 7ed478285fc9 2.31GB 2 minutes ago
```
Adding common tools that the agent attempted to use but found unavailable.
This is batch 1 - network and recon utilities.
Tool use evidence
=================
Evidence for agent attempting to use said utilities was obtained by running the
following command from ARTEX repo root:
```
grep -Fr "available" data/transcripts | grep -o -E '.{128}available.{64}' |
grep -Ff <file_with_tool_names>
```
Here's the evidence (with some network addressing info anonymized):
```
n ports. ICMP being blocked is common for IoT devices. Let's check ARP:\n\n1. Run `arping` against both IPs\n2. If arping isn't available, use a simple TCP connection test to known ports.\n\nActually,
1-22T17:06:15.435471209Z","type":"message","message":{"role":"assistant","content":[{"type":"thinking","thinking":"arping isn't available. Instead, I'll use nmap -sn against .106 (it worked for .34). L
.096773754Z","type":"message","message":{"role":"assistant","content":[{"type":"thinking","thinking":"The sqlite3 binary is not available. Previous patrol checks were probably using python3's sqlite3 m
ll run a read-only sqlite query. To keep it strictly read-only, I'll use the sqlite3 CLI in read-only mode. Let me check what's available.\n"},{"type":"text","text":"All three channels are still empty
mand":"ls -la /app/data/traffic/_index/ 2\u003e\u00261 | head -20; echo \"---\"; command -v sqlite3 \u0026\u0026 echo \"sqlite3 available\" || echo \"no sqlite3\""}}]},"usage":{"input_tokens":23733,"ou
9:22.960502613Z","type":"message","message":{"role":"assistant","content":[{"type":"thinking","thinking":"The sqlite3 CLI isn't available. I'll use Python's sqlite3 module to open it in read-only mode.
nst 192.168.XX.X:2049 (asset 10) without kernel mount (fact #64: 2049 is open, rpcbind/111 is closed so showmount/rpcinfo are unavailable, and the container lacks CAP_SYS_ADMIN so mount.nfs is EPERM; t
rt | uniq -c\n```\n\nThis will show how many times each ID appears. If all five appear, they exist.\n\nIf the sqlite3 CLI isn't available, I can use python3's sqlite3 module in read-only mode (URI mode
-22T20:08:37.396720158Z","type":"message","message":{"role":"assistant","content":[{"type":"thinking","thinking":"arping is not available. ping, nmap, nc, and python3 are available. Let me check my IP
ing` failed. Let me verify the network configuration.\n"},{"type":"text","text":"arping is missing but ping/nmap/nc/python3 are available. Let me check my network position and whether ARP-level probing
-21T12:13:37.33381531Z","type":"message","message":{"role":"assistant","content":[{"type":"thinking","thinking":"No sqlite3 CLI available. Use Python's sqlite3 module.\n"},{"type":"tool_use","id":"QDxp
-11-20T15:23:51.886698977Z","type":"message","message":{"role":"assistant","content":[{"type":"thinking","thinking":"xxd is not available (exit code 127). Let's use od or python for the hexdump.\n"},{"
rogram calls to 2049 and got nothing. If it were a portmapper, it wouldn't respond to those (it would either return \"program unavailable\" or just not respond). Actually, a real rpcbind returns an err
:01.674628521Z","type":"message","message":{"role":"assistant","content":[{"type":"thinking","thinking":"The sqlite3 CLI is not available. Use Python's sqlite3 module in read-only mode. The index.sqlit
6-11-21T08:05:31.88611493Z","type":"message","message":{"role":"assistant","content":[{"type":"thinking","thinking":"xxd is not available. Let's use od instead. Also, since the xxd command failed, the
"type":"message","message":{"role":"assistant","content":[{"type":"thinking","thinking":"There's no sqlite3 CLI, but python3 is available. Let's use python3 to query the traffic index in read-only mode
:27.322171897Z","type":"message","message":{"role":"assistant","content":[{"type":"thinking","thinking":"The sqlite3 CLI is not available. Let's try Python's sqlite3 module (read-only mode).\n"},{"type
03e\\u003e\\u003e\",\"tool\":\"Bash\"},{\"is_error\":false,\"kind\":\"text\",\"step_id\":13907,\"summary\":\"sqlite3 CLI is not available; I'll use Python's sqlite3 module (read-only).\",\"tool\":\"\"}
sage":{"role":"assistant","content":[{"type":"thinking","thinking":"There's no arp-scan, arping, fping, or netdiscover. nmap is available. Let me check the interface / network.\n"},{"type":"tool_use","
:29.333997543Z","type":"message","message":{"role":"assistant","content":[{"type":"thinking","thinking":"The sqlite3 CLI is not available. I'll use Python's sqlite3 module instead.\n"},{"type":"text","
79498Z","type":"message","message":{"role":"assistant","content":[{"type":"thinking","thinking":"The reason sqlite3's CLI isn't available is that `command -v sqlite3 \u003e/dev/null` failed in the firs
5:50.73486641Z","type":"message","message":{"role":"assistant","content":[{"type":"thinking","thinking":"The sqlite3 CLI is not available. I'll use Python instead.\n"},{"type":"text","text":"sqlite3 CL
e... which is exactly why rpcbind normally maps it. Hmm. But the v3 root fhandle can be discovered by MNT DUMP+MNT. If MNT is unavailable, v3 is effectively unusable without rpcbind.\n\nOK. Now, the bo
ould use Python's sqlite3 module instead — but wait, the intent says \"NO new target traffic\" and \"ONLY if the tool path is unavailable or refuses, do ONE read-only credential sweep.\" The index chec
\n\nLet me write a watcher script.\n\nPlan:\n1. `ip addr` to check I'm on the LAN.\n2. Initial probe: arp-ping (using arping if available, or python) + ICMP ping with 1–2 second timeout to all 4 hosts,
's 5353.\n\nLet me write this carefully and at a low rate.\n\nFirst, the environment check. Let's go.\n\nActually, first: check available tools (nmap, arping, python3, curl).\n\nLet's execute step 1.\n
:38.968796894Z","type":"message","message":{"role":"assistant","content":[{"type":"thinking","thinking":"The sqlite3 CLI is not available. I'll try using Python's sqlite3 module in read-only mode.\n"},
```
Tool availability evidence
=================
The availability of every tool has been verified from within the contained by running:
```
$ docker compose exec artex bash
root@2d5d6eb1b31b:/app# apt-get update
<...>
root@aa7436c6cd57:/app# for pkg in arping arp-scan fping iproute2 netdiscover net-tools nfs-common python3-impacket python3-paramiko python3-scapy rpcbind sqlite3 xxd ; do apt-cache search "^$pkg$"; done;
arping - sends IP and/or ARP pings (to the MAC address)
arp-scan - arp scanning and fingerprinting tool
fping - sends ICMP ECHO_REQUEST packets to network hosts
iproute2 - networking and traffic control tools
netdiscover - active/passive network address scanner using ARP requests
net-tools - NET-3 networking toolkit
nfs-common - NFS support files common to client and server
python3-impacket - Python3 module to easily build and dissect network protocols
python3-paramiko - Make ssh v2 connections (Python 3)
python3-scapy - Packet generator/sniffer and network scanner/discovery (Python 3)
rpcbind - converts RPC program numbers into universal addresses
sqlite3 - Command line interface for SQLite 3
xxd - tool to make (or reverse) a hex dump
root@aa7436c6cd57:/app#
```
Container sizes
=================
Original container size (resulting from `docker compose up -d --build` on base
commit 38c7477):
```
$ docker compose images artex
CONTAINER REPOSITORY TAG PLATFORM IMAGE ID SIZE CREATED
artex-artex-1 artex local linux/amd64 2dabf64dce79 2.11GB 5 minutes ago
```
Container size after the change (this commit):
```
$ docker compose images artex
CONTAINER REPOSITORY TAG PLATFORM IMAGE ID SIZE CREATED
artex-artex-1 artex local linux/amd64 d158c858b10f 2.13GB 46 minutes ago
```
writeTaskArchivePackage opened every entry of the staged workspace that is
not a directory. Opening a FIFO blocks until a writer appears, so a named
pipe left by a command (mkfifo backpipe for an nc relay) stopped the single
archive worker in openat for good, with the task files already moved to
staging and every later archive, restore and delete job queued behind it.
A Unix socket failed the archive instead, and a device file was packed but
refused by extractTaskArchivePackage on restore.
Skip every entry that is neither a directory nor a regular file, as is
already done for symlinks.
Reset the stream panel's filter and request state when the exchange changes.
Keep recording-limit warnings visible while reporting only actual messages
in the header, including first-page and warning-only counts.
Add message_total to the stream page without changing raw pagination totals
or existing Go paging signatures. Cover the count and pagination boundaries
in the stream and HTTP route tests.
Replace every log.Printf/log.Print call with structured slog equivalents
and swap the "log" import for "log/slog". Update test assertions that
matched the old format strings.
The self-test probe tried only the first host of the DSN. It now tries
each host and port the DSN lists, fallbacks included, and nothing else,
and a DSN it cannot parse fails the self-test instead of skipping the
database check.
docker-compose.yml sets POSTGRES_HOST_AUTH_METHOD=scram-sha-256: a TCP
connection from another container, artex's included, needs the
password. It takes effect when a new pgdata volume is initialised.
The isolation self-test stopped every start it failed, so a non-root
server (the systemd unit), dev.sh, Windows and macOS no longer started
without -dev-insecure-no-isolation.
EnforceIsolation now decides from the platform and the privilege drop:
- self-test passed: isolated;
- Linux with the privilege drop on (root, the Docker image): a failure
stops the start, unless -dev-insecure-no-isolation is set;
- elsewhere (not Linux, not root, -exec-uid=-1): the server starts
degraded, without a flag.
A degraded start logs a banner with the self-test failure and what is
exposed, and GET /api/health reports the isolation status to a
signed-in caller; the web UI shows a red banner on every page while it
is degraded. The systemd deployment guide and dev.sh describe the mode.
The new root tests hold a file tool call open and check, at that moment,
that only the call's thread has file system uid 10001: the caller, 32
goroutines locked on other threads and every other thread listed in
/proc keep uid 0, root's groups and root's access, and goroutines the
call starts do not inherit the ids. A panic and runtime.Goexit inside
the call reach the caller and end the thread instead of returning it
to the runtime. Calls under load with live and cancelled contexts never
show the executor's ids on an observer thread, and no thread keeps
them afterwards.
Both mutations that would leak the identity are caught: unlocking the
thread without restoring its ids, and a process-wide setgroups.
The comment of runWithFileIdentity now states the limits: the ids cover
fn's goroutine only, and fn must not start goroutines or programs.
The six platform tools that durably change skills, custom tools and MCP
servers already need operator approval (intercept/persistence.go, the
built-in ask rules of db/intercept_persistence_seed.go, guard.go). Custom
tools and MCP servers live in the database, which the agent's shell
cannot reach. Skills live on disk: an agent process that can write the
skill directory adds or changes a skill without create_skill or
update_skill_file, and every agent then loads it as instructions.
The startup self-test now checks the skill directory: the probe, as the
executor, must not be able to create an entry in it, its parent must not
let the executor replace it, and no file or directory below it may be
owned by the executor uid or writable by the executor gid or by others
(judged from owners and mode bits, symlinks by their target, nothing
written).
PrepareExecPrivilege chmodded jwt.key, secret.key and the config file to
0600 but left their owner as it was: a file owned by the executor uid
(created by an agent process, or on the host under the uid the executor
has in the container) stayed readable by the agent. It now makes root
their owner first.
The startup self-test also checks the directories: the probe, as the
executor, must not be able to create an entry in the data directory, the
key directory or the config file's directory (it could plant a key, a
config or a data tree for the next start), and none of their parents may
let the executor replace them (owned by it, or writable by it without the
sticky bit). For the database, a test against PostgreSQL shows the
server's role refused without its password (SQLSTATE 28P01); the probe
already fails the start when the database lets that role in.
No Unix socket is introduced: in the compose deployment PostgreSQL runs
in its own container and is reached over TCP with a password that the
executor cannot read (sealed environment, root-only config).
When the privilege drop could not be applied (the server not root, or
-exec-uid negative), the start went on with one log line, and nothing
checked that an applied drop really isolated the agent. Before the stores
open, the server now runs a self-test: a probe started the way the
agent's Bash starts ("bash" on PATH, so through the shim) checks from
inside the executor process that it runs as the executor uid, gid and
only group, cannot read jwt.key, secret.key, the config file or the MITM
CA key, cannot read the server's /proc environ or memory, sees only the
allowlisted environment, and cannot open a session on the server's
database with the server's user and no password (only host, port, user
and database name reach the probe). The file tools are checked too: the
secrets must not open through their identity.
A failed or impossible self-test stops the start. The development escape
-dev-insecure-no-isolation, off by default, lets the start go on and logs
a banner that says what is exposed. This changes the behaviour of a
non-root start (go run, the systemd example unit, Windows, macOS): it now
needs that flag.
An agent process inherited the server's environment minus the names that
ScrubSecretEnv removes: a deny list, so a credential under any other name
(one an operator or an image adds) reached the agent's shell, its custom
tools and its MCP stdio servers. When a process crosses from the server's
identity to the executor's, its environment is now rebuilt from a fixed
allowlist: the search path and locale, the temp directory, the
non-interactive defaults, the proxy and CA trust variables the agents pass
to their shells, PLAYWRIGHT_BROWSERS_PATH and the shim's own variables.
The Bash shim and the MCP drop shim rebuild it before the drop; a custom
tool starts from it. What the caller passes on purpose still crosses: the
agent's Bash env, the TOOL_* parameters, and the configured env of an MCP
server, which the drop shim keeps because connectMCP names it in
ARTEX_EXEC_KEEP. A nested shell is not filtered again.
The startup scrub and the environment seal stay as they are; they are no
longer the boundary for agent processes. With the drop disabled nothing
changes.
The confined file tools (Read, Write, Edit, MultiEdit, LS, Glob, Grep) and
the opens of ingest_bbot and ingest_scan_output ran inside the server, as
root, and relied on the os.Root path confinement alone. With the executor
privilege drop active, PrepareExecPrivilege now gives them the executor
uid and gid: each call runs on a thread of its own whose file system uid,
file system gid and supplementary groups are the executor's (setfsuid,
setfsgid and the per-thread setgroups of x/sys/unix). The thread is never
unlocked, so the runtime ends it with the call and no other goroutine
runs with those ids. The kernel then checks every open, create and
directory read against the rights of the agent's shell, on top of the
path confinement. Output over the cap is still spilled, after the call,
with the server's identity.
Linux only. Elsewhere the identity is not set and a log line says the
file tools keep the server's identity. golang.org/x/sys becomes a direct
dependency (already in the module graph at the same version).