Read-only review of network exposure, authentication, agent execution, prompt injection, supply chain, secrets, filesystem, federation and resource limits, with a README-ready summary and a secure-by-default checklist. No code changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
40 KiB
Security review: what a new user exposes by installing Pipelines
Date: 2026-12-03. Source reviewed: commit 9436067b (main).
Scope: a stranger clones the repository and runs ./install with defaults
(native install, Linux or macOS), then sets up one or more harnesses.
Method: code and configuration reading plus safe local read-only checks. The installer was not run. No running service was touched. Nothing was sent off this machine. Severities are the reviewer's judgement. "Likelihood" means likelihood under a default install.
An earlier review (2026-11-10, see docs/notes/security-boundary.md,
docs/notes/auth-hardening.md and docs/notes/network-and-update-signing.md)
already fixed DNS rebinding against the Go API, added the proxy-to-server token
and LAN sign-in refusal, and signed the update feeds. This review builds on that
work and lists what remains open.
No critical, remotely exploitable, zero-interaction issue was found under defaults. The most serious finding (H1) needs a signed-in user to open a crafted link to a file the attacker has placed in the user's home directory.
1. What you're exposing your computer to (README text)
Security: read this before installing.
Pipelines lets AI coding agents run commands on your computer as your user account. There is no container or separate user around them. Agents can read and change anything your account can, including SSH keys, cloud credentials, browser downloads and other projects. Codex chats in their default mode are the only exception: they run in Codex's own workspace sandbox.
- Your web password is effectively your shell password. Anyone who signs in can start an agent in "bypass permissions" or "full access" mode and have it run any command. Choose a strong, unique password, and keep the web app on loopback and Tailscale (the default). Don't expose it to the internet.
- Agents can be manipulated by what they read. A README, a web page or an issue can contain instructions that an agent follows ("prompt injection"). Agents with shell access can then leak your secrets or change files. Prefer the "ask" permission modes, and give pipeline stages only the tools they need.
- The notification server (ntfy) is on your local network. It listens on every network interface over plain HTTP on port 8090, and the phone account uses your web password by default. Only subscribe over a network you trust or over Tailscale.
- Agents can spend money. Runs have step and time limits but no spending cap unless you set one.
- Install and update pull code from the internet. The installer builds the newest ntfy and OpenCode releases.
pipelines updatepulls this repository and reinstalls without a signature check.What is protected by default: the server API is on loopback only and needs a secret token; the web app accepts only loopback and Tailscale connections; the password is stored as an scrypt hash; sign-in is rate limited; the terminal asks for your OS password; and app updates are signature-checked.
2. Top findings
| ID | Severity | Finding | Default likelihood |
|---|---|---|---|
| H1 | High | GET /files serves HTML/SVG from $HOME inline on the app origin with no CSP, a stored-XSS path to code execution |
Low to medium (targeted, one click) |
| H2 | High | Web password = arbitrary code execution; step-up elevation is bypassed by agent permission modes | Depends on the password; reachable only from loopback/tailnet |
| H3 | High | Agents run unsandboxed as the user with the server's environment and can read every Pipelines secret (cookie HMAC key, server token, update-signing key) | High once prompt injection reaches a shell-capable agent |
| H4 | High | Pipeline stages get unrestricted shell by default (no tools block, or shell without a policy) |
High for any pipeline that omits a shell policy |
| M1 | Medium | ntfy listens on all interfaces over HTTP; the phone account reuses the web password (sniffable, and guessable outside the proxy's limiter) | High that the port is LAN-reachable |
| M2 | Medium | Supply chain floats: newest OpenCode, Pi and ntfy resolved at install time; unpinned base images; unchecked SDK zip; pipelines update has no signature check |
Low per event, wide impact |
| M3 | Medium | Docker mode (opt-in) exposes the unauthenticated API on 0.0.0.0 | Only with --docker |
| M4 | Medium | show_html previews load remote images/CSS (exfil beacons) and allow links that escape the sandbox, including to the app's own origin |
Medium |
| M5 | Medium | No spending cap by default and no global concurrency cap | Medium |
| M6 | Medium | Chat transcripts and notifications are not redacted | Medium |
| L* | Low | Links open without confirmation; OSC 52 clipboard writes; ntfy click-link to any URL; ws:// peers; TOCTOU in /files; debug-keystore APK signing; and more |
3. Findings in detail
3.1 Network exposure
Safe check on this machine (it runs a customised install, so it shows the
shapes, not a pristine default): ss -ltnH | awk '{print $4}'
127.0.0.1:8080 # Go server API
*:8090 # ntfy
*:8082 # web proxy (wildcard bind, filtered per connection)
N1. Server API :8080: loopback, token, Host and Origin checks (info: good)
- Default bind:
127.0.0.1:8080. This is the-addrdefault incmd/pipelines-server/main.go:29; the--bind-addressdefault is inscripts/setup-native.py. - Front door: every route passes
guardRequests(internal/server/request_boundary.go:42-63).- Host: a loopback Host is required, otherwise
421. This defeats DNS rebinding. - Origin:
/connectrefuses anyOriginheader:if r.URL.Path == "/connect" && r.Header.Get("Origin") != "" { http.Error(w, "browser origins may not connect directly; use the web proxy", http.StatusForbidden) - Token:
X-Pipelines-Server-Tokenis required whenever-token-fileis set, which the native installer always does. The token file is 0600. - Exempt paths:
/healthz, and/mcp/chat/{token}, which has its own 64-character per-chat token.
- Host: a loopback Host is required, otherwise
- WebSocket library:
coder/websocketAccept(w, r, nil)(internal/server/websocket.go:210), whose default origin policy is Origin == Host. - CORS: no
Access-Control-Allow-*header anywhere. - Result: a hostile web page cannot drive
ws://127.0.0.1:8080. Another local OS user cannot either, without the token. - Residual:
allowedHostskips the Host check when the listener is not loopback (request_boundary.go:102-104). That only matters for Docker (M3) or a custom--bind-address.
N2. Web proxy :8082: loopback plus tailnet only (info: good)
- Bind:
--host :: --allow loopback,tailnet. - Filter: every connection is dropped before any HTTP is read unless both
ends are loopback or both are tailnet (
web/src/listenPolicy.js;docs/notes/network-and-update-signing.md). - LAN: opt-in (
--web-lan). Plain-HTTP LAN sign-in needs a second opt-in (--web-lan-plain-login). - WebSocket upgrades:
sameOriginUpgrade(web/src/proxySecurity.js) plus the cookie. - POSTs:
sameOriginRequest. Uploads also refuseSec-Fetch-Site: cross-site. - Residual: a LAN port scan sees the port open and then reset. Tailscale subnet routes without SNAT are treated as LAN (documented).
- Tailnet trust: every device on your tailnet, including shared-in devices,
can reach the sign-in page.
- Mitigation: restrict it with Tailscale ACLs. Mention this in the README.
M1. ntfy :8090 on every interface, phone account = web password (Medium)
- Evidence:
scripts/setup-native.py:672f'listen-http: ":{ntfy_port}"\n':914base_url = args.ntfy_url or f"http://{lan_ip}:{args.ntfy_port}":676auth-default-access: "deny-all"is good: anonymous users can read nothing.:726-730:def reader_password(self, web): """The phone's ntfy password, which matches the web password: ...docs/notifications.md:92-96tells the user to addhttp://<LAN IP>:8090and sign in asphone-readerwith the web password.
- Default: on. It ignores
web.host=tailnet, so it contradicts "expose only the web proxy". - Impact:
- The web password crosses the LAN in cleartext HTTP Basic auth every time the ntfy phone app connects.
- Anyone on the LAN can guess the web password against ntfy. That bypasses the proxy's login limiter and the tailnet-only restriction.
- A second hash of the web password sits in ntfy's
auth.db. - Whoever holds the reader credential can read notification text (run and chat titles, summaries).
- Mitigation:
- Bind ntfy to loopback plus tailnet (or put it behind
tailscale serveHTTPS). - Generate a random reader password or ntfy access token instead of reusing the web password.
- Make LAN ntfy an opt-in like
--web-lan.
- Bind ntfy to loopback plus tailnet (or put it behind
N3. mDNS advertising (Low/info)
- Default: on (
PIPELINES_MDNS;cmd/pipelines-server/main.go:41). Withweb.host=tailnet,scripts/manage.py:47-58passes-mdns-lan=false, so the A records are tailnet IPs. - What is still announced: the advert is multicast on the LAN. It announces
the host name, the Pipelines version (
v),auth=password, and the tailnet and public routes. - Impact: fingerprinting and discovery of a tailnet address and version by anyone on the same Wi-Fi.
- Mitigation: turn mDNS off by default when the LAN route is off (a tailnet
client can be given the address), or at least drop
v=.
3.2 Authentication
A1. Password storage, cookies, brute force, lifetime (info: good, minor gaps)
- Hash: scrypt N=2^15, r=8, p=1, 32-byte key, constant-time compare
(
scripts/password.py:26,docs/notes/auth-hardening.md). - Files:
web-auth.jsonandserver-tokenare 0600 in 0700 directories (scripts/setup-native.py:385-414). The password is read withgetpass, never from argv. - Policy: at least 16 characters, or a passphrase of 4 or more words
(
web/src/passwordPolicy.js:5). - Cookie (
web/serve.mjs:193-203):Theconst bits = [`${sessionCookieName(req)}=${token}`, "Path=/", "HttpOnly", "SameSite=Lax"]; ... if (isHttps(req)) bits.push("Secure");__Host-prefix is used over HTTPS. A plainhttp://127.0.0.1orhttp://100.xsession has noSecureflag; that is acceptable on loopback and WireGuard. - Lifetime: 12 hours, or 30 days with "Remember me", which is checked by
default (
web/serve.mjs:140-141,:299).- Mitigation: default "Remember me" to unchecked, or shorten it to 7 days with sliding renewal.
- Revocation: a password change or
./password --revoke-allrotates the HMAC secret and the generation (web/src/authStore.js:8-10). This ends every session, including forged ones. - Brute force:
web/src/loginLimiter.jsgives five free failures per client, then exponential backoff up to 15 minutes, plus a global 50 failures per 5 minutes. Good. ntfy is outside this limiter (M1). - Plain-HTTP LAN sign-in: refused unless opted in.
X-Forwarded-Protois not trusted from the LAN. - Proxy-to-server token: a 0600 file whose path is passed through the
environment (
PIPELINES_SERVER_TOKEN_FILE). It is never on the command line (scripts/manage.py:437-445). The proxy strips it before forwarding to peers (web/src/peerRelay.js:74). But see H3: every agent inherits that environment variable and can read the file. - Test switch:
PIPELINES_WEB_AUTH=disabled(web/serve.mjs:66) turns off auth entirely. It is meant for tests.- Mitigation: refuse it unless the bind is loopback.
H2. Web password = code execution; elevation is bypassable (High, by design)
- Evidence:
- Step-up elevation gates only these operations
(
internal/server/elevation.go:53-59):var elevationGated = map[string]bool{ protocol.ChatShellRun: true, protocol.ChatShellInput: true, protocol.RenamePath: true, protocol.MovePath: true, protocol.DeletePath: true, } - Not gated: creating a chat in any directory, switching modes, prompting,
answering permission cards, starting runs,
GET /files. - Any signed-in client can pick these modes:
internal/claude/modes.go:24{ID: "bypassPermissions", ..., Description: "Never ask. Everything runs without checks."}internal/codex/modes.go:23{"full" ...}, "never", "dangerFullAccess"}
- Elevation re-asks the same web password and lasts 24 hours
(
elevation.go:37DefaultElevationTTL = 24 * time.Hour).
- Step-up elevation gates only these operations
(
- Default: chats start in "ask" mode (Claude
default, Codexworkspace-write+on-request), but switching needs nothing more than the session. - What an attacker with the web password (or a session cookie) can do:
- run any command as you, via a bypass-mode chat or by elevating with the
same password and using
!lines; - read any file under
$HOMEthrough/files, including~/.sshand~/.claude/.credentials.json; - approve agent permission requests;
- start runs that spend model credit;
- plant
schedule_followupprompts that persist for up to 7 days; - register peers.
- run any command as you, via a bypass-mode chat or by elevating with the
same password and using
- The one real second factor: the terminal uses
su -land the OS password (internal/server/terminal_login.go:85). That is a good design. - Mitigation, in order:
- Gate mode changes into bypass/full, and answers to permission cards, behind elevation.
- Make elevation a distinct factor: the OS password via
su/PAM (as the terminal does), TOTP, or WebAuthn. Shorten the default TTL to 15-60 minutes. - Gate
GET /filesoutside the chat's project root, or deny-list secret paths (see F2). - Document plainly that the web password is equivalent to shell access.
3.3 Remote code execution by design
H3. Agents are unsandboxed and inherit every secret (High)
- Evidence:
- Every harness runs as the server's UID with
os.Environ():internal/stage/claude_stage.go:360internal/stage/pi.go:408internal/stage/opencode.go:141-146(viaworkenv.CommandEnv)internal/claudehost/hosted.go:158internal/server/chat_shell_runner.go:171-172(exec.Command(r.shell(), "-lc", command)with nocmd.Env)
- That environment contains
PIPELINES_SERVER_TOKEN_FILE,PIPELINES_NTFY_TOKEN_FILEandPIPELINES_WEB_AUTH_FILE(scripts/manage.py:437-445).internal/servertoken/servertoken.go:1-10acknowledges that the harnesses can read the token. - The only isolation is a git worktree per run
(
internal/server/run_worktree.go:57-69), which is a directory, not a boundary.
- Every harness runs as the server's UID with
- Default: on, for every harness. Codex chats in
ask/automode are the exception: Codex's ownworkspace-writesandbox applies (internal/codex/chat.go:591). - What a prompt-injected agent with shell can read:
~/.config/pipelines/web-auth.json, which holds the scrypt hash and the cookie HMACsecret(web/src/authStore.js:8). With the secret it can forge valid session cookies.- the server token, which gives full API control from any local process;
~/.config/pipelines/update-signing-key.pem, which can sign app update feeds that every installed client trusts (see S2);- the Android keystore;
- harness OAuth and API credentials, including the saved account slots in
internal/claudeaccounts/store.go; - SSH keys, cloud credentials and browser data.
- Mitigation:
- Scrub
PIPELINES_*secret paths and tokens from every child environment. Pass an allow-listed environment. - Run harnesses under a separate OS user, or in bubblewrap/
sandbox-exec, or in a container with only the workspace (and the harness's own credentials) mounted. - Move the cookie secret, server token and signing key to a location the agent's user cannot read.
- Until then, document that any agent can read these files.
- Scrub
H4. Stages default to unrestricted shell (High)
- Evidence:
internal/stage/tools.go:177var legacyTools = []string{"read", "glob", "grep", "edit", "shell"}is applied when a stage has notoolsblock.- Claude:
internal/stage/claude_stage.go:152-156It runs withcase "Bash": if shell != nil { rules = append(rules, claudeShellRules(shell)...) } else { rules = append(rules, tool) } // bare "Bash"--permission-mode dontAsk(:183). TheEdit(<rundir>/**)scope does not limit Bash. - OpenCode:
tools.go:283-284if c.Policy.Shell == nil { allow("shell", "*") }. The deny rules on reading*.envandpipelines.db*(:354-355) are bypassed bycatin the shell. - Pi:
pi_policy.mjs:7-9puts no restriction on bash without a policy.
- Related defaults:
--allow-authoringis on for fresh installs (docs/install.mdflag table), so a signed-in user can also author check stages that runsh -c(internal/stage/check.go:220-222). The starter template's emptytoolsblock is text-only (internal/pipeline/definition.go:36). No stage getswebfetchunless it declares it. - Mitigation:
- Require an explicit
permissions.shellallow-list whenevershellis granted, or at least warn loudly in the editor and at run start. - Warn when a stage combines
webfetchwith unrestrictedshell.
- Require an explicit
R1. OpenCode chats use OpenCode's own permission defaults (Medium, to confirm)
- Evidence:
internal/opencode/chat.go:535-539deliberately sends no permission override. - Risk: OpenCode's upstream defaults are permissive (edits and bash allowed
unless the user's
opencode.jsonrestricts them). This was not confirmed against the pinned OpenCode version. - Mitigation: create OpenCode chat sessions with an "ask" permission set, matching Claude and Codex.
- Protection in place: the OpenCode server itself binds
127.0.0.1with a random password (internal/opencode/connection.go:394-397).
R2. ! shell lines (info: gated)
- What they run:
exec.Command(shell, "-lc", command)in the chat directory, at most 4 at a time per chat (chat_shell_runner.go:168-172). - Gate: elevation, but see H2: same password, 24 hours.
R3. Terminal (info: good)
- What it runs:
su -l <user> -c 'cd <dir> || cd; exec "$SHELL" -l'(internal/server/terminal_login.go:85). It refuses to run as root. - Barrier: the OS password.
R4. MCP chat tools (Low/Medium)
- Endpoint:
/mcp/chat/{token}, loopback only, not proxied, with a 64-character token per chat. - Tools (
internal/chattools/tools.go:5-14):show_file/show_diff(any path in$HOME),show_image(a home file or https URL; the fetcher blocks private addresses,chat_tools_fetch.go:54),show_html(sandboxed),notify(5 per minute),show_run,schedule_followup/cancel_followup. - Risk:
schedule_followuplets an injected instruction re-prompt the chat up to 7 days later. That is persistence. - Mitigation: list pending follow-ups prominently. In bypass/full mode, require confirmation before a follow-up fires.
R5. Chat directory can be any absolute path, including / (Low)
- Evidence:
internal/server/chat_sessions.go:422-434only checksIsAbs+IsDir. - Minor bug:
~/subresolves to home, not to~/sub(:424). - Mitigation: confine to
$HOMEor configured roots, and expand~/correctly.
R6. direnv / mise (info: good)
- Behaviour: only
.envrcfiles alreadydirenv allowed and trusted mise config are applied (internal/workenv/workenv.go:6-8). An edited.envrcis re-blocked by direnv.PIPELINES_DIRECTORY_ENV=offdisables it.
3.4 Prompt injection and rendering
H1. GET /files serves HTML/SVG inline on the app origin (High)
-
Evidence:
internal/server/home_files.go:68-92: the type comes from the extension, the disposition isinlineby default, and onlynosniffis set. There is no CSP:contentType := mime.TypeByExtension(filepath.Ext(realTarget)) ... disposition := "inline" if r.URL.Query().Get("download") == "1" { disposition = "attachment" }internal/server/websocket.go:196mux.HandleFunc("GET /files", serveHomeFile)has no elevation.web/serve.mjs:614-616and:465-482: the proxy forwards/filesand copies upstream headers verbatim (res.writeHead(reply.statusCode ?? 502, reply.headers)).- The global header is
frame-ancestors 'self'only (web/src/webSecurity.js:69). - By contrast,
/artifacts/setssandbox; default-src 'none'; script-src 'none'; ...(internal/server/artifacts.go:294), and the peer relay applies the same policy to a peer's/files(web/src/peerRelay.js:13-15). Only the local/filesroute lacks it.
-
Scenario: an HTML or SVG file lands anywhere under
$HOME, for example:- a browser download in
~/Downloads; - a file in a cloned repository;
- a file written by a prompt-injected agent.
The attacker then gets the user to open
https://<host>.ts.net:8443/files?path=~/Downloads/x.html. That is a top-level GET, so theSameSite=Laxcookie is sent. Other ways in are the Files panel's "Open externally" (app/lib/features/chat/files/files_viewer.dart:56) or a link inside ashow_htmlpreview (M4).The page's script runs on the app origin. It can then:
- open
/connect(same origin, so the proxy's origin check passes); - create a Claude chat, switch it to
bypassPermissionsand prompt it, which is code execution with no elevation; - read
/files?path=~/.ssh/id_ed25519.
- a browser download in
-
Default: on.
-
Likelihood: needs targeting and one click, so low to medium.
-
Impact: full compromise of the user account.
-
Mitigation (small change, highest value in this report):
- In
serveHomeFileFrom, send the same sandbox CSP asartifacts.go:294. - Force
attachment(ortext/plain) fortext/html,image/svg+xml,application/xhtml+xmland XML types. - Defence in depth: have
proxyArtifactadd the sandbox CSP to every/filesand/artifacts/response, aspeerRelaydoes.
- In
M4. show_html previews: remote loads and sandbox-escaping links (Medium)
- Evidence:
- Web: an
srcdociframe withsandbox="allow-popups allow-popups-to-escape-sandbox"(app/lib/features/artifacts/ui/artifact_html_view_web.dart:109-110). There are no scripts and the origin is opaque, which is good. - The link filter
artifact_html_links.dart:37-42allows any http(s) URL, including the app's own/files?path=...html, which chains into H1. - Remote
<img>and CSSurl()loads are not blocked (web/src/appFiles.js:17-24). - The tool description says "no network" (
internal/chattools/tools.go:122). That is inaccurate. - Native:
JavaScriptMode.disabled(artifact_html_view_native.dart:78-79), but remote subresources still load.
- Web: an
- Impact: an injected agent can encode data in image URLs, so the data is exfiltrated as soon as the preview renders. Links can also open attacker-chosen pages outside the sandbox.
- Mitigation:
- Inject
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src 'unsafe-inline'; img-src data:">into the srcdoc and native HTML, asdeliverable.go:48already does. - Block links to the app's own origin.
- Confirm before opening external links.
- Inject
P1. Chat markdown and links (Low)
- Markdown: a custom parser that renders no raw HTML and no markdown
images (
app/lib/features/chat/ui/transcript/markdown_inline.dart). - Links: only
http(s)with a host, plusmailto(chat_links.dart:35-55).javascript:andfile:are blocked. - Gap: links open with
LaunchMode.externalApplicationand no confirmation (chat_link_launcher.dart:9-10), and[text](url)can hide the target. - Remote images:
show_imagewith an https URL loads on its own (chat_shown_link_image.dart:51Image.network(url)), which works as a beacon. - Mitigation: click-to-load remote images; show the target and confirm when the link text differs from its host.
P2. Terminal escape sequences (Low)
- OSC 52: writes reach the system clipboard silently, with only a toast
(
app/lib/features/chat/shell/chat_shell_terminal_events.dart:52-55). Reads are refused (third_party/xterm/lib/src/terminal.dart:1135-1145). - Risk: agent output can swap the clipboard for a malicious command.
- OSC 8 links: http(s) only and Ctrl/Cmd+click, but the target is not shown.
- Mitigation: confirm OSC 52 writes or put them behind a setting, and show the link target on hover.
P3. ntfy click links to arbitrary URLs (Low)
- Evidence:
internal/server/notify_link.go:87-103accepts any absolute http(s)link=written by the agent into the run'spublic/directory. - Risk: a phishing link delivered as a trusted notification.
- Mitigation: restrict to the configured web origin, or route through an interstitial page.
3.5 Supply chain
M2a. Harness and ntfy versions resolve to "newest" at install time (Medium)
- Evidence:
scripts/resolve-releases.py:1-27picks the newest OpenCode v2 tag (GitHub API), then its GHCR digest, and the newest Pi version from npm.- The Dockerfile pins by digest, but the digest is whatever is newest when you
install (
Dockerfile:23 FROM ${OPENCODE_IMAGE}@${OPENCODE_DIGEST}). - Pi:
npm install --global --ignore-scripts ...@${PI_VERSION}(Dockerfile:40) has no integrity hash and leaves transitive dependencies unpinned. - ntfy:
go mod download heckel.io/ntfy/v2@<resolved tag>(scripts/setup-native.py:613-614). GOSUMDB still verifies module integrity, since no GOPROXY/GONOSUMDB override was found.
- Protections: a host allow-list and a redirect guard in
resolve-releases.py:59, 92-98. - Mitigation: commit reviewed pins (version + digest + npm integrity, and the ntfy version) and make "resolve latest" an explicit flag.
M2b. Unpinned images and an unchecked SDK download (Medium/Low)
- Image tags, not digests:
compose.yaml:56 image: binwiederhier/ntfy:latest(Docker mode)Dockerfile:10 FROM golang:1.27-alpineapp/docker/Dockerfile:7 FROM debian:bookworm-slim
- SDK zip:
app/docker/Dockerfile:55downloads the Android command-line tools zip without a sha256 check. - Flutter: cloned by tag (
--branch $FLUTTER_VERSION, 3.44.6 fromapp/.flutter-version) with no commit check. A tag can move. - Mitigation: pin by
@sha256:digests, verify the zip's sha256, and check the Flutter tag's commit.
M2c. pipelines update pulls and installs with no verification (Medium)
- Evidence:
scripts/manage.pyupdate(around lines 369-397):pulled = subprocess.run(["git", "-C", str(source), "pull", "--ff-only"], text=True) ... installed = subprocess.run(["sh", str(source / "install.sh"), *config.get("install_args", [])]) - Risk: whatever the tracked remote serves is built and installed.
- A compromised remote compromises every user who updates.
- The install doc clones over HTTPS from a personal Git host.
- Mitigation: verify signed tags (
git verify-tag), or show the incoming commit range and ask before installing.
S1. curl | bash advice (Low)
- Where:
docs/install.md:26,docs/harnesses.md:38,40andscripts/setup-native.py:133recommendcurl -fsSL https://opencode.ai/install | bash. - Mitigation: also offer package-manager installs.
S2. App update feed signing (info: good, with notes)
- Signature first: the Ed25519 signature is checked before the feed is
trusted (
app/lib/features/updates/app_updates_io.dart:111-118). - Hash checks: the download's sha256 is checked before the rename
(
:177-185). The Android signer must match. - No redirects: redirects are not followed (
:44). - Downgrade protection: a feed is offered only if
versionCode > installed. Settings uses_installed ?? 0(settings_updates_section.dart:63), so an unreadable installed version offers anything. - Fails open with no key: a build with no embedded key accepts any feed
(
update_feed_signature.dart:44). Installer builds always embed one. - Key location: the signing key lives on the same machine and account as
the feed and the agents (
~/.config/pipelines/update-signing-key.pem, 0600). Per H3, any agent can read it and sign a malicious update. - APK keystore: APKs are signed with a keystore seeded from the Android
debug keystore (well-known password
android) (app/android/app/build.gradle*,scripts/app_build.py:143-151). - Extraction: Linux uses
tar -xzfinto a staging directory beside the install (linux_self_update.dart:54-59). It is hash-pinned, but members are not filtered. - Mitigation:
- Keep the signing key away from the agent user (H3).
- Fail closed in release builds without a key.
- Treat an unknown installed version as "no update".
- Add a signed expiry.
- Generate a real release keystore.
- Reject symlink, absolute and
..tar members.
S3. Dependency pinning (info: good)
- Go:
go.mod+go.sum. - Web proxy: no npm dependencies at all (
web/package.json). - Flutter:
app/pubspec.lockis committed, and the xterm fork is vendored as a path dependency. - Gap:
scripts/app_desktop_build.py:85runspub getwithout--enforce-lockfile.
3.6 Secrets
- Storage (info: good):
- The web hash, server token, publisher token, ntfy config, install manifest,
signing key and Claude account slots are all 0600 in 0700 directories
(
setup-native.py:302-414, 683, 744;update_signing.py:66-85;claudeaccounts/store.go:214-237). - No secrets on command lines or in service unit files: the launchd plist
carries only
HOMEandPATH. - Inline
PIPELINES_NTFY_TOKENis refused (internal/installation/service.go:224-225).
- The web hash, server token, publisher token, ntfy config, install manifest,
signing key and Claude account slots are all 0600 in 0700 directories
(
- Docker ntfy token (Low): world-readable inside a 0700 directory
(
scripts/save-ntfy-token.py:16,mode=0o444). Docker mode only. - M6. No redaction of transcripts or notifications (Medium):
- Redaction exists only for failure evidence (
internal/stage/diagnostics.go:55-70) and turn-diff snapshots, which skip.env*,*.pem,.ssh,.awsand similar (internal/filediff/snapshot.go:249-262). - Anything an agent prints, such as
cat ~/.aws/credentials, is stored in the history DB (~/.local/share/pipelines/data/pipelines.db, directory 0700) and can appear in notifications and session exports. - Mitigation: scrub known secret values (the server token, the publisher token, and patterns such as AWS keys and private-key headers) before persisting and before notifying.
- Redaction exists only for failure evidence (
- Harness credentials: stay where each harness keeps them (
~/.claude,~/.codex, OpenCode's auth file). Agents can read them (H3). - Credential forwarding: pipeline transfer bundles contain definitions
only (
internal/transfer/bundle.go:1). The peer relay sends the remote password to the peer's/loginand allowsws://with only a warning (web/src/peerRegistry.js:6-9). See F1. - Retention and uninstall:
- Storage retention is off by default (
protocol/storage.go:18), so history grows without limit. Chat attachments and notifications are kept 7 days. ./uninstallremoves~/.config/pipelinesand the data. It probably leaves~/.claude/pipelines-accountsbehind (not confirmed).- Mitigation: document what uninstall leaves behind, and offer a retention default.
- Storage retention is off by default (
3.7 Filesystem
- Confinement (info: good):
/files, the folder picker andshow_fileresolve symlinks, then usefilepath.Relagainst the real$HOME(internal/server/directory_listing.go:104-122)...and symlinks out of home (for example to/etc) are refused. Kernel pseudo-filesystems are refused.- Artifacts use
os.OpenRootwith Lstat checks on each component andO_NOFOLLOW(internal/server/artifacts.go:204-294). - Chat uploads use
os.Root+O_EXCL, at most 100 MiB per file, a 1 GiB quota and 512 files. POST /filesneeds elevation and usesO_EXCL.- No prefix-bug
HasPrefixpath checks were found.
- F2. All of
$HOMEis readable by a session (Medium, part of H2):- A symlink to
~/.sshstays inside home, and~/.sshitself can be read directly. - Mitigation: deny-list
~/.ssh,~/.gnupg,~/.aws,~/.config/pipelines,~/.claude*,~/.codexand.git-credentialsin/files,show_fileand the listing, or require elevation for them.
- A symlink to
- F3. TOCTOU (Low):
home_files.go:34resolves the path, then opens it later (:56) withoutos.Root. A same-user process could swap in a symlink between the two.- Mitigation:
os.OpenRoot(realHome)+root.Open(rel), as artifacts do.
- F4. Proxy static and
/updatespaths (Low):resolve(join(...))+startsWith(ROOT + sep)(web/serve.mjs:390-412) is safe against.., but follows symlinks inside the root.- Fine while the directories stay 0700.
- Where agents can write: Claude stage
Editis scoped to the run and artifacts directories. Bash in every harness, and every chat agent, can write anywhere the user can.- Run worktrees are created at
<repo>-runs/<slug>and removed when landed or discarded (run_worktree.go:57-64, 102, 149).
- Run worktrees are created at
3.8 Multi-machine federation
- Model: proxy to proxy only. The Go server has no peer concept.
- A signed-in user registers
ws(s)://host/connectand types that remote's web password. - The local proxy keeps the remote session cookie in memory for that local
session (
web/src/peerRegistry.js:148,168).
- A signed-in user registers
- What a peer link grants: relaying the browser's socket to the remote
/connect, which is full control of the remote as its signed-in user (H2 applies there), plus fixed GET/POST paths (web/src/peerRelay.js:60-200). - What it does not grant: the remote cannot act on the local machine. The local server token is never forwarded. No harness credentials are pushed.
- Remote content: gets a sandbox CSP. Redirects become 502. SSRF and DNS
pinning protections are in
web/src/peerAddress.js. - TLS:
https.requestverifies certificates. - F1. Plain
ws://peers (Low): the remote password crosses in cleartext, only flagged asinsecure_transport(web/src/peerTransport.js:84-90).- Mitigation: refuse
ws://except for tailnet or loopback addresses.
- Mitigation: refuse
- Compromise blast radius: a compromised local machine holds live sessions to each peer while the user is signed in, so it can drive those peers as well.
3.9 Resource abuse
M5. No spending cap and no global concurrency limit (Medium)
- Limits that exist:
- Per-stage timeout of 1 hour (
internal/stage/budget.go:16). - Loop limits:
maxStageVisits = 5,maxRunSteps = 30(120 with grants) (internal/server/loop_state.go:23-29). - Claude chat processes are capped at 8 (
internal/claude/claude.go:40). !commands: 4 per chat.
- Per-stage timeout of 1 hour (
- Budget off: the run budget is off unless
DefaultBudgetUSD > 0(internal/server/run_budget.go:74). - No global caps: none on concurrent runs, WebSocket connections or chats.
A runaway loop, a malicious session, or
schedule_followupcan burn API credit. - DoS:
- Body limits exist: WebSocket reads 2 MiB (
websocket.go:215), MCP bodies 4 MiB, proxy JSON 4 KiB. ReadHeaderTimeoutis 5 seconds, but there is noIdleTimeoutor body deadline (cmd/pipelines-server/main.go:196).POST /fileshas no disk quota, but needs elevation.
- Body limits exist: WebSocket reads 2 MiB (
- Mitigation:
- Ask for a default budget at install (or ship a modest one).
- Add a server-wide concurrent-run cap and per-session connection caps.
- Add
IdleTimeoutand a disk quota.
3.10 Docker mode (opt-in): M3
- Evidence:
compose.yaml:26- "${PIPELINES_BIND_ADDRESS:-0.0.0.0}:${PIPELINES_PORT:-8080}:8080"scripts/setup-docker.py:82-84forcesPIPELINES_BIND_ADDRESS=0.0.0.0Dockerfile:59 CMD ["-addr", "0.0.0.0:8080", ...]- No server token is configured.
cmd/pipelines-server/main.go:58only logs "no server token configured". The Host check is skipped off loopback (request_boundary.go:102-104).
- Impact: with
./install --docker, any LAN host using a non-browser WebSocket client (noOriginheader) can run agents and read the mounted home and repositories (compose.yaml:38-47). That is remote code execution from the LAN. Severity would be critical, but it is not the default. - Mitigation:
- Bind 127.0.0.1 by default.
- Generate and mount a server token.
- Make the server refuse a non-loopback
-addrwithout a token unless-insecure-no-tokenis given.
4. "Secure by default" checklist (ordered by value / effort)
- Sandbox
/files(H1): add the artifact sandbox CSP inserveHomeFileFrom, forceattachmentfor HTML/SVG/XML, and add the CSP inproxyArtifacttoo. A few lines; closes the XSS-to-code-execution path. - Gate permissive modes behind elevation (H2): switching a chat to Claude
bypassPermissionsor Codexfull, and answering permission cards. Small. - Scrub the agent environment (H3): drop
PIPELINES_*_FILE,PIPELINES_WEB_AUTH_FILEand token variables from every harness and!child environment. Small. - ntfy off the LAN by default (M1): bind loopback + tailnet (or serve it
through
tailscale serve), give the phone a random reader password or token, and make LAN ntfy an opt-in. Small to medium. - Docker safe defaults (M3): bind 127.0.0.1, generate a token, and refuse a non-loopback bind without a token. Small.
- Deny-list secret paths in
/files,show_fileand listings (F2). Small. - Require a shell allow-list for stages (H4), or warn at authoring and run start, and default the starter to text-only. Small to medium.
- Block remote loads in HTML previews (M4): inject a strict meta CSP and refuse same-origin links. Small.
- Default a run budget and a global run cap (M5). Small to medium.
- Pin the supply chain (M2): commit reviewed OpenCode, Pi and ntfy
versions and digests, pin base images by digest, verify the SDK zip's
sha256, and verify signed tags in
pipelines update. Medium. - Make elevation a real second factor (H2): OS password via
su/PAM (as the terminal does) or TOTP/WebAuthn, with a 15-60 minute TTL. Medium. - Isolate agents from Pipelines' own secrets (H3): run harnesses under a
separate user or a bubblewrap/
sandbox-execprofile, and keep the cookie secret, server token and signing key out of their reach. Large; biggest long-term win. - Smaller items:
- Default "Remember me" off.
- Disable mDNS when the LAN route is off.
- Confirm external links, OSC 52 writes and ntfy click links.
- Redact known secrets from transcripts.
- Refuse
ws://peers off the tailnet. - Use a real APK keystore.
- Fail closed on unsigned feeds in release builds.
- Run
pub get --enforce-lockfile. - Add a README security section (section 1).
5. Method notes and limits
- Not tested at runtime: H1 and M4 are confirmed from code paths, not reproduced in a browser.
- Not confirmed: OpenCode's upstream default chat permissions (R1), and
whether uninstall leaves
~/.claude/pipelines-accountsbehind. - Live listener check:
ss -ltnHon this machine, a customised install, not a pristine default. - Not covered: the iOS build, Windows (unsupported), and the behaviour of the third-party harness CLIs themselves.