Commit Graph

28 Commits

Author SHA1 Message Date
didericis 43453c66ea docs: add research note on remote Docker VM as an isolation upgrade
test / run tests/run_tests.py (push) Successful in 15s
Argues that running claude-bottle unchanged on a remote Linux VM with
dockerd is the cheapest practical path to stronger isolation than
local Docker — preserves the v1 pipelock topology, requires zero code
changes, and shrinks the agent's blast radius from the developer
laptop to a disposable VM. Cross-references the existing
stronger-isolation-alternatives and local-vs-remote-agent-execution
notes so the research set composes cleanly.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 01:07:17 -04:00
didericis e3f5a5907a feat(bottle): opt-in gVisor runtime per bottle
test / run tests/run_tests.py (push) Successful in 19s
Bottles can now set "runtime": "runsc" to launch the agent container
under gVisor instead of runc, adding a userspace syscall barrier
between the agent and the host kernel. Default is runc (Docker
default). Pipelock stays on the default runtime per the research doc's
minimum-diff prescription.

The launcher verifies runsc is registered with the daemon before
launch, surfaces the runtime in the preflight plan, and dies with an
install pointer (and a macOS-not-supported note) when runsc is
requested but unavailable.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 00:48:11 -04:00
didericis 3eff1e0b6e docs: replace non-goals with a security model section in README
test / run tests/run_tests.py (push) Successful in 18s
Frames the per-agent isolation story (each bottle gets only the env,
skills, ssh, and egress hosts its manifest grants) and is honest about
the limits of the container boundary, pointing at the new research doc
for the stronger-isolation v2 question.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 00:41:14 -04:00
didericis 7986f2bd23 docs: add research note on stronger isolation alternatives
test / run tests/run_tests.py (push) Successful in 19s
Surveys gVisor, Kata, Firecracker, and Apple Container as replacements
or complements to Docker+runc, with concrete file-level migration notes
for this codebase and a recommended rung-by-rung path.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 00:38:46 -04:00
didericis cc5e772519 docs: replace stale .sh paths with claude_bottle/*.py equivalents
test / run tests/run_tests.py (push) Successful in 13s
Cleans up references to the pre-refactor bash layout (cli.sh,
lib/*.sh, scripts/*.sh) across README, Dockerfile, the pipelock PRD,
and research notes. Refreshes line numbers in the oauth-token note
against the current cli/start.py.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 00:27:25 -04:00
didericis 4ebfcec2f7 fix(cli): make 'build --help' actually print help
test / run tests/run_tests.py (push) Successful in 15s
cmd_build was ignoring its argv, so 'cli.py build --help' fell through
and started a docker build instead of printing the subcommand's
argparse help. Wire up an empty parser so --help and unknown args are
handled the same way the other subcommands handle them.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 00:16:17 -04:00
didericis f817847dff refactor(cli): split claude_bottle/cli.py into a package
test / run tests/run_tests.py (push) Successful in 20s
One file per subcommand under claude_bottle/cli/, with shared constants
and the tty helper in _common.py and dispatch in __init__.py. The
public import (from claude_bottle.cli import main) is unchanged, so
the root cli.py entrypoint and the test suite see no surface change.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 00:15:16 -04:00
didericis 0c1740ca99 chore: remove journal and project-local init-entry skill
test / run tests/run_tests.py (push) Successful in 23s
Drop docs/JOURNAL.md and .claude/skills/init-entry/, and update
CLAUDE.md, docs/INDEX.md, and claude-bottle.example.json so nothing
points at them anymore.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 23:55:39 -04:00
didericis b88fbbaedd docs: add claude-bottle.example.json
test / run tests/run_tests.py (push) Successful in 17s
Worked example covering two bottles (one minimal, one with all three
env-entry modes, an SSH entry, and a wider egress allowlist) and three
agents that share them. Named .example.json so manifest_resolve does
not auto-load it when running cli.py from the repo root.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 23:53:28 -04:00
didericis 91b1683306 docs: fix post-Python-refactor drift in README and Dockerfile
test / run tests/run_tests.py (push) Successful in 25s
Update the quickstart command to ./cli.py and drop a stale Dockerfile
comment that referenced scripts/lib/auth.sh, which no longer exists
after the bash->Python refactor.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 23:51:11 -04:00
didericis 4694db1201 PRD 0002: Test pipeline on Gitea Actions (#3)
test / run tests/run_tests.py (push) Successful in 20s
2026-05-09 02:48:03 -04:00
didericis 97aabd3d75 docs: trim CLAUDE.md to minimal orientation
Drop the Intended design section and PRD references; keep only
What this is, Goals, Non-goals, Repository layout, Conventions,
and When you're unsure.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-08 14:58:46 -04:00
didericis 3f03d65e73 chore: tidy gitignore, Dockerfile indent, unused import
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-08 14:51:59 -04:00
didericis 399ed93dc8 refactor: convert project from bash to Python
Replaces cli.sh + lib/*.sh with a claude_bottle/ Python package and a
cli.py entry point. No external dependencies — uses only Python's
stdlib (json, subprocess, getpass, tempfile, argparse, re, etc.).

- claude_bottle/{log,docker,manifest,env_resolve,network,pipelock,
  skills,ssh,cli}.py mirror the previous lib/*.sh modules.
- Tests converted to unittest under tests/test_*.py with a stdlib
  runner at tests/run_tests.py (unit | integration | path).
- .githooks/commit-msg ported to Python; same Conventional Commits rules.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-08 15:26:58 +00:00
didericis b94b6904ae feat(cli): make --remote-control on start opt-in
Previously cmd_start unconditionally passed --remote-control to claude.
Make it a parsed flag so callers can choose. Behavior change: the
default is now disabled — pass --remote-control to opt in.

Surfaced in usage, the launch plan, and the assembled CLAUDE_ARGS.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-08 02:15:25 -04:00
didericis 400e914f1f fix(cli): keep SLUG accessible to cleanup_all EXIT trap
cmd_start declared SLUG as local, but cleanup_all (registered as the
EXIT/INT/TERM trap) calls pipelock_stop "$SLUG" after cmd_start has
returned and the local is out of scope. With set -u this aborted
shell teardown with "SLUG: unbound variable". Drop the local to
match the convention already used for MANIFEST_FILE, CONTAINER, and
STAGE_DIR.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-08 02:06:17 -04:00
didericis ba7616a4ae PRD 0001: Per-agent egress proxy via pipelock (#1) 2026-05-08 01:56:43 -04:00
didericis 08597ebcf8 docs: add redundancy analysis to pipelock assessment
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-08 00:25:01 -04:00
didericis 5607dce611 docs(journal): 2026-05-08 00:15 2026-05-08 00:16:14 -04:00
didericis b36e6da0b3 docs: add research note assessing pipelock for egress/exfil control
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-08 00:15:11 -04:00
didericis c74bd5cf26 docs: add research note on multi-encoding secret exfil tripwires
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-08 00:00:51 -04:00
didericis bc7f506311 docs: add research note on isolating tea token via proxy
Investigates whether the Gitea `tea` CLI can be authenticated via a
header-injecting proxy so the token never enters the container — even as
an env var. Parallels the OAuth-token research note. Recommends an
in-container root-owned reverse proxy as the lowest-friction shape, and
flags the unavoidable tradeoff that the agent retains the token's full
API scope (no exfil ≠ no harm).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-07 23:30:06 -04:00
didericis edf79b3880 docs: add research note on container network egress guards
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-07 23:27:18 -04:00
didericis 7a38b8da23 docs: add research note on OAuth token exposure to claude
Walks the current `docker run -e CLAUDE_CODE_OAUTH_TOKEN` flow, why claude
can read the token trivially via its Bash tool, why no Linux primitive
hides an env var from its own process, and why a root-owned localhost
auth-injecting reverse proxy (paired with an egress allowlist) is the
realistic mitigation. Documents `ANTHROPIC_BASE_URL` caveats (SSE,
header passthrough, issue #36998, out-of-band traffic).
2026-05-07 23:24:39 -04:00
didericis adaaa2c0e8 chore: enforce Conventional Commits via .githooks/commit-msg
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-07 23:14:39 -04:00
didericis 9b4ff29f49 docs: add research note on revoking Claude Code OAuth tokens
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-07 23:13:42 -04:00
didericis 74a2c7a32a refactor: rename box/boxes to bottle/bottles in config schema and code
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-07 23:02:34 -04:00
didericis c45f384fb8 Initial commit 2026-05-07 22:45:36 -04:00