Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ---- Frontend build ----
FROM node:26-alpine@sha256:2d984a15c9b54fd0aeb608b8e0d0d83529eb34d2966db27a1fb4f1edc3d298a3 AS frontend
FROM node:26-alpine@sha256:9bd229b644e391df00fb989efa732335aefc6170a05d8c163c5c8ca9870da401 AS frontend

WORKDIR /app
COPY web/package.json web/package-lock.json ./
Expand All @@ -8,7 +8,7 @@ COPY web/ .
RUN npm run build

# ---- Go build stage ----
FROM golang:1.27.1-alpine@sha256:cf6fca6641884b8433441b2b0652976f975e1d0fdd26d177eaaf8596087f3125 AS builder
FROM golang:1.27.3-alpine@sha256:f2c872bcee949b7be9c490efd02b48a8a2fbf947cdf533f1c58525ec9d8170fd AS builder

ARG VERSION=dev
ARG COMMIT=unknown
Expand All @@ -30,7 +30,7 @@ RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w \
# ---- Runtime stage ----
FROM alpine:3.24.1@sha256:28bd5fe8b56d1bd048e5babf5b10710ebe0bae67db86916198a6eec434943f8b

RUN apk add --no-cache ca-certificates \
RUN apk add --no-cache --upgrade ca-certificates ca-certificates-bundle \
&& addgroup -S agentvault && adduser -S -G agentvault -u 65532 agentvault \
&& mkdir -p /data/.agent-vault && chown -R agentvault:agentvault /data

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.goreleaser
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Minimal runtime image for GoReleaser — the binary is pre-built.
FROM alpine:3.24.1@sha256:28bd5fe8b56d1bd048e5babf5b10710ebe0bae67db86916198a6eec434943f8b

RUN apk add --no-cache ca-certificates \
RUN apk add --no-cache --upgrade ca-certificates ca-certificates-bundle \
&& addgroup -S agentvault && adduser -S -G agentvault -u 65532 agentvault \
&& mkdir -p /data/.agent-vault && chown -R agentvault:agentvault /data

Expand Down
4 changes: 2 additions & 2 deletions docs/guides/container-isolation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ First run takes ~60s while the isolation image builds. Subsequent runs reuse the

## What's inside the container

- **Image**: `agent-vault/isolation:<hash>`, built on first use from an embedded Dockerfile. Debian-slim + Node 22 + `@anthropic-ai/claude-code` + `iptables` / `gosu` / `curl` / `git` / `python3`.
- **Image**: `agent-vault/isolation:<hash>`, built on first use from an embedded Dockerfile. Debian-slim + Node 26 + `@anthropic-ai/claude-code` + `iptables` / `gosu` / `curl` / `git` / `python3`.
- **Network**: a dedicated per-invocation Docker bridge network (`agent-vault-<session>`). Not the default bridge — other containers you're running cannot reach the forwarder.
- **User**: `claude` (UID != 0), dropped via `gosu` after `init-firewall.sh` runs as root. `--security-opt=no-new-privileges` + `--cap-drop=ALL` with only `NET_ADMIN` / `NET_RAW` (for iptables), `SETUID` / `SETGID` (so gosu can change UID), and `KILL` (so tini at PID 1 can forward TTY signals across the UID boundary) added. Docker doesn't grant container caps as *ambient* caps to non-root processes, so `claude` post-gosu has an empty effective cap set regardless.
- **Egress policy**: `OUTPUT DROP` by default on both IPv4 (`iptables`) and IPv6 (`ip6tables`). `ACCEPT` only for loopback, ESTABLISHED/RELATED replies, and the two Agent Vault ports at `host.docker.internal` over IPv4 (the MITM path is v4-only by construction — we resolve via `getent ahostsv4`). **No DNS rule**: `host.docker.internal` is resolved via `/etc/hosts` (`docker run --add-host=host.docker.internal:host-gateway`), closing the DNS-exfiltration channel.
Expand Down Expand Up @@ -111,7 +111,7 @@ Security note: container isolation protects *vault-brokered* credentials (Stripe

**"host.docker.internal not resolvable"** inside the container — Docker version is too old. Upgrade to 20.10+ on Linux.

**First run hangs** — the image build pulls `node:22-bookworm-slim` and runs `apt-get install` + `npm install -g @anthropic-ai/claude-code`. ~60 seconds on a fast connection; a slow network or corporate registry proxy can make it much longer. Watch `docker ps` in another terminal to confirm progress.
**First run hangs** — the image build pulls `node:26-bookworm-slim` and runs `apt-get install` + `npm install -g @anthropic-ai/claude-code`. ~60 seconds on a fast connection; a slow network or corporate registry proxy can make it much longer. Watch `docker ps` in another terminal to confirm progress.

**`iptables -S OUTPUT` in the container shows `DROP` but the agent still makes external calls** — that's impossible unless you passed `--no-firewall`. Check for the loud warning banner on startup.

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/deploy-agent-container.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ For local development, `agent-vault run` uses the on-disk admin session created
## Dockerfile

```dockerfile
FROM node:20-slim
FROM node:22-slim
COPY --from=infisical/agent-vault:latest /usr/local/bin/agent-vault /usr/local/bin/agent-vault
WORKDIR /app
COPY . .
Expand Down
2 changes: 1 addition & 1 deletion docs/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Each install method below configures a master password at startup. Store it some

</Tab>
<Tab title="From source">
**Prerequisites**: [Go 1.25+](https://go.dev/dl/), [Node.js 22+](https://nodejs.org/)
**Prerequisites**: [Go 1.26.10+](https://go.dev/dl/), [Node.js 22+](https://nodejs.org/)

```bash
git clone https://github.com/Infisical/agent-vault.git
Expand Down
6 changes: 3 additions & 3 deletions docs/self-hosting/docker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ make docker

This runs a multi-stage build:

1. **`node:22-alpine`** -- builds the React/Vite frontend
2. **`golang:1.25-alpine`** -- compiles the Go binary with the embedded frontend
3. **`alpine:3.21`** -- minimal runtime image
1. **`node:26-alpine`** -- builds the React/Vite frontend
2. **`golang:1.27-alpine`** -- compiles the Go binary with the embedded frontend
3. **`alpine:3.24`** -- minimal runtime image

The final image runs as non-root user `agentvault` (UID 65532) and includes a built-in health check at `GET /health`.

Expand Down
2 changes: 1 addition & 1 deletion docs/self-hosting/local.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ agent-vault --help

### Build from source

**Prerequisites**: [Go 1.25+](https://go.dev/dl/), [Node.js 22+](https://nodejs.org/)
**Prerequisites**: [Go 1.26.10+](https://go.dev/dl/), [Node.js 22+](https://nodejs.org/)

```bash
git clone https://github.com/Infisical/agent-vault.git
Expand Down
2 changes: 1 addition & 1 deletion examples/daytona-openai-realtime/run.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ git clone --depth 1 --branch "$AGENT_VAULT_REF" "$AGENT_VAULT_REPO" /tmp/agent-v
cd /tmp/agent-vault
mkdir -p internal/server/webdist
printf '<!doctype html><html><body>agent-vault-daytona-example</body></html>\n' > internal/server/webdist/index.html
docker run --rm -v /tmp/agent-vault:/src -w /src golang:1.25-alpine \
docker run --rm -v /tmp/agent-vault:/src -w /src golang:1.26-alpine \
sh -c 'CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /src/agent-vault .' >/tmp/build-agent-vault.log

cat > Dockerfile.example <<'DOCKER'
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/Infisical/agent-vault

go 1.25.0
go 1.26.10

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 After merge, the Daytona example fails at its Go build step, because it compiles main with golang:1.25-alpine. That image cannot satisfy the new go 1.26.10 directive. Official golang images set GOTOOLCHAIN=local, so a 1.25 toolchain refuses a module that requires go >= 1.26.10 instead of downloading a newer one. Fix: update every pinned or documented Go 1.25 reference along with the directive. Use golang:1.27-alpine (or 1.26) in the example, and say Go 1.26.10+ in the docs. Same pattern at 4 sites (examples/daytona-openai-realtime/run.mjs:27, docs/self-hosting/local.mdx:28, docs/installation.mdx:41, docs/self-hosting/docker.mdx:17). [also at: examples/daytona-openai-realtime/run.mjs:28 - After merge, the Daytona example can no longer build agent-vault from main. Its build container runs Go 1.25, but go.mod now requires 1.26.10. go.mod:3 moves the go directive from 1.25.0 to 1.26.10. run.mjs:27 still builds inside golang:1.25-alpine, and the official golang images set GOTOOLCHAIN=local, so go build exits with "go.mod requires go >= 1.26.10".]

Why this was flagged

examples/daytona-openai-realtime/run.mjs:244 sets AGENT_VAULT_REF to "main" by default, and line 23 clones that ref. Line 27 then runs go build inside golang:1.25-alpine. After this merge, go.mod:3 on main reads go 1.26.10. The official golang images ship ENV GOTOOLCHAIN=local, so Go 1.25 exits with "go.mod requires go >= 1.26.10 (running go 1.25.x; GOTOOLCHAIN=local)". The script runs under set -eu, so it aborts before the agent-vault container ever starts. On the base branch the directive is go 1.25.0, which golang:1.25-alpine builds fine. CI cannot catch this: ci.yml reads the Go version from go.mod via go-version-file and never runs the example. The docs (local.mdx:28, installation.mdx:41) still list Go 1.25+ as the prerequisite. docker.mdx:17 still describes the builder as golang:1.25-alpine.

Verification: go.mod:3 changes from go 1.25.0 to go 1.26.10. examples/daytona-openai-realtime/run.mjs:244 sets the default AGENT_VAULT_REF: process.env.AGENT_VAULT_REF ?? "main". The official golang images have set ENV GOTOOLCHAIN=local since Go 1.21. On the base branch, go 1.25.0 builds fine with golang:1.25-alpine, so this is a regression this change introduces.


require (
github.com/charmbracelet/huh v1.0.0
Expand Down
2 changes: 1 addition & 1 deletion internal/isolation/assets/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Agent Vault isolation image. Built locally on first use by EnsureImage.
FROM node:26-bookworm-slim@sha256:3fe807a03a4436e7bc76b7e84e6861899cd75c9028ae99bc00581940141ae150
FROM node:26-bookworm-slim@sha256:28147155d47dc31abe0a46e0d12b59b2fb3d0a2dcc5dc65fce76a074180b16fe

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
Expand Down
2 changes: 1 addition & 1 deletion internal/isolation/image_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func TestAssetsHash_Format(t *testing.T) {
// Treat a diff on this constant as intentional. Update when changing
// Dockerfile / init-firewall.sh / entrypoint.sh.
func TestAssetsHash_Stable(t *testing.T) {
const want = "0cf46302069b"
const want = "d04d74b09eb8"
got, err := assetsHash()
if err != nil {
t.Fatalf("assetsHash: %v", err)
Expand Down
2 changes: 1 addition & 1 deletion internal/isolation/integration_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//go:build docker_integration

// To run: go test -tags docker_integration ./internal/isolation/ -run Integration -v
// Requires: docker daemon, network access to node:22-bookworm-slim +
// Requires: docker daemon, network access to node:26-bookworm-slim +
// debian apt mirrors on first run (for the image build).
package isolation

Expand Down
Loading