Эта страница ещё не переведена. Вы читаете английскую версию.
This page says what CashPilot protects, who it protects it from, and where the boundaries are. Each control links to the code that enforces it. The links point at a fixed commit, so you can read the exact lines. The security defaults page has the full detail of each control. This page is the map.
A hostile earner image. The images in the catalog are third-party and mostly closed-source. One of them can be malicious, or a provider can push a bad build under the same tag.
A buyer of your bandwidth. Bandwidth-sharing services sell your IP to their customers. That traffic must reach the internet and nothing else.
Someone who reaches the dashboard or the worker's API. A person on your LAN, or on the internet if you publish a port.
A compromised worker. A bug in the worker, or an attacker who holds a worker's key.
A compromised UI. A bug in the dashboard, or a stolen session.
A dead or hostile proxy. A proxy that you route a copy through can stop, or can try to reach your LAN.
flowchart LR
B[Browser] -->|session cookie| UI[CashPilot UI]
UI -->|per-worker key| W[Worker]
W -->|filtered socket| P[Socket proxy]
P -->|calls its policy allows| D[Docker on the host]
M[One-shot migration] -->|raw socket, at each compose up| D
D --> E[Earner containers]
E -->|fenced bridge| I[Internet]
E -.->|dropped| L[LAN, host, tailnet, metadata]
E -->|shared namespace| T[Tunnel sidecar]
T --> X[Your proxy]
C[Isolated copy] -->|internal network| G[Gate]
G --> X
Boundary
Between
What crosses it
1
Your browser and the UI
Sign-in, every page and every action
2
The UI and each worker
Deploy, stop and remove commands, and heartbeats
3
The worker and Docker
Every Docker API call, through the socket proxy
4
An earner and the host kernel
System calls, capabilities, devices, host folders
5
An earner and the network
Every packet an earner sends
6
A proxied copy and its proxy
Every packet of that copy, through a tunnel sidecar, or through a gate for an isolated copy
The session cookie is HttpOnly and SameSite=Lax. It is Secure when CASHPILOT_BASE_URL starts with https, when a trusted proxy (CASHPILOT_TRUSTED_PROXY) sends X-Forwarded-Proto: https, or when CASHPILOT_SECURE_COOKIE is on
The UI and the worker send a key over plain HTTP only to a private address or a private name. The check reads the URL's host and does no DNS lookup, so a name under .local, .lan, .home.arpa, .internal or .ts.net passes even if it resolves to a public address
Whoever holds the Docker socket is root on the host
With the shipped compose files the worker has no socket. A proxy, sockguard, pinned by digest, holds the socket, has no network, and serves the worker a filtered socket. The proxy's filtering is the control. Its :ro mount is not, because a read-only bind of a Unix socket still allows the full Docker API
A compromised worker starts a privileged container or binds /
The proxy reads every request body. It refuses privileged mode, host PID, IPC and user namespaces, capabilities and devices outside a short list, and any host folder you did not list
The rules live in your compose file, never in an image. A test fails when a catalog change needs a rule the policy lacks, or when the policy gets looser
Every capability is dropped. Only the ones its catalog entry declares come back. no-new-privileges and a process limit are always set, and privileged mode is fixed to off
A provider pushes a broken build under the same tag
The daily image update watches each new container for 2 minutes. If it stops, restarts, turns unhealthy or logs a known failure, the worker starts the old container again, and tells you if that fails too. This does not catch a malicious build that keeps running. Images pinned by digest move only with a CashPilot release
An earner, or a customer of the provider, reaches your LAN, router or other devices
New installs put earners on cashpilot-isolated, behind a firewall table that drops the private ranges, Tailscale's range, link-local and the host itself
The firewall table goes missing after a reboot or a flush
The internet route (the masquerade) lives in the same table as the drops. Without the table the earners go offline, not onto the LAN. Three exceptions apply until the worker writes the table again: the host itself stays reachable, a masquerade rule of the host's own that covers the bridge lets earners out unfiltered, and one-way UDP to a LAN device still leaves (isolation)
The proxy dies and the copy earns from your own IP
A copy without NET_ADMIN, NET_RAW or a device shares the network of a tunnel sidecar whose firewall drops every packet by default. It lets out only the tunnel and the connection to the proxy. If the tunnel stops, traffic stops
A copy that holds NET_ADMIN, NET_RAW or a device such as /dev/net/tun (Mysterium, Bitping) rewrites its own firewall or sends raw packets past it
That copy never shares a sidecar's namespace. It runs in cp-inner, on an internal Docker network whose only route is a gate. The gate is a sidecar that forwards the copy's traffic into the tunnel and nowhere else, from a firewall in its own namespace (isolated copies)
We list the gaps so that you can decide with all the facts. The details are in security defaults.
The socket proxy is not yet a full root boundary in every setup. Since sockguard 2.4.10 it binds a listed host path only as itself, so a symlink planted in a listed folder leads nowhere. But when one listed path sits inside another, counting CASHPILOT_COMPOSE_DIR as listed (a path inside the compose folder, or a path that holds it), a compromised worker can replace the inner one with a symlink and reach the host's /. With both unset, no host folder can be bound.
The raw socket still reaches two places. The one-shot cashpilot-migrate holds it as root, with no network and every capability dropped, each time docker compose up runs. It starts before the proxy and exits (docker-compose.yml). The Unraid template and the TrueNAS app do not ship the proxy yet, so there the worker gets the raw socket (app stores).
A compromised worker controls its own earners. It can stop them, read their logs and environment, and delete their volumes, including the critical ones, through Docker directly.
A compromised worker can start a container on host networking with NET_ADMIN. That container can change the host's network settings and take an earner off the fence. The owner label does not stop it, because the LAN fence's own helper needs the same rights.
An isolated copy can still send DNS lookups from the box's own IP. This happens on Docker engines before 25.0.5 (23.0.11 on the 23 line), when the host's own resolver is a loopback address, such as a Pi-hole on 127.0.0.1. This is moby CVE-2024-29018. The fix is #977, which is not shipped yet.
The UI and a worker on one host share that host. For a stronger boundary, run the UI on a machine with no worker (fleet).
The encryption key sits beside the database by default. A leaked database file alone does not reveal the stored logins, but it shows your earnings data. Moving the key out protects copies of the data folder, such as backups. A compromised UI reads the key in both cases, because the UI loads it to decrypt the logins (encryption key).
UI to worker traffic is plain HTTP by default. Keep it on your LAN or in a VPN. Neither side sends its key over plain HTTP to a public address, but the check trusts private names such as .lan without a DNS lookup.
Earners share the host kernel. A kernel bug in an earner reaches the host. gVisor or the Secure VM closes this, and both are opt-in (security layers).
Root on the host reads everything. No control here protects against someone who is already root on a box.
The provider sees your traffic and your IP. CashPilot cannot change what a provider does with the connection it rents.
tests/test_socket_proxy.py checks the proxy policy against the catalog and fails when it gets looser. scripts/socket_proxy_live_test.sh runs the real proxy against a real Docker daemon. Each refused call passes when sent to the raw socket, which proves the refusal is the proxy's.
tests/test_lan_fence.py checks the firewall table. Test your isolation runs the same probes from the dashboard, on your own box.
tests/test_proxy_tunnel.py and tests/test_proxy_tunnel_real_docker.py check the tunnel. scripts/proxy_leak_test.sh checks that a dead proxy stops the copy.
tests/test_setup_token.py, tests/test_cleartext_refusal.py, tests/test_custom_services.py, tests/test_secret_env.py and tests/test_image_updates.py cover the other rows.
tests/test_beads_batch_69.py fails if the worker's volume and the UI's /data are merged.
To report a gap, see SECURITY.md. Do not open a public issue.