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
14 changes: 12 additions & 2 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"files": "^.secrets.baseline$",
"lines": null
},
"generated_at": "2026-01-27T22:16:04Z",
"generated_at": "2026-02-24T16:20:06Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
Expand Down Expand Up @@ -100,7 +100,7 @@
"hashed_secret": "ec3810e10fb78db55ce38b9c18d1c3eb1db739e0",
"is_secret": false,
"is_verified": false,
"line_number": 32,
"line_number": 36,
"type": "Secret Keyword",
"verified_result": null
}
Expand Down Expand Up @@ -153,6 +153,16 @@
"verified_result": null
}
],
"sandbox/sample.env": [
{
"hashed_secret": "b792a28a35da9b44fa0ee8a53002e9c238afb1bd",
"is_secret": false,
"is_verified": false,
"line_number": 1,
"type": "Secret Keyword",
"verified_result": null
}
],
"tests/data/trajectory.json": [
{
"hashed_secret": "88de85ead2ab26f647127036827ee7746fcd7514",
Expand Down
40 changes: 40 additions & 0 deletions sandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
FROM debian:bookworm-slim
Comment thread
coderabbitai[bot] marked this conversation as resolved.

# Install Linux utilities, Python, and jq
RUN apt-get update && apt-get install -y \
# Basics & editors
bash coreutils findutils grep sed gawk less nano vim tree file which procps psmisc sudo \
# Networking
curl wget ca-certificates iputils-ping dnsutils netcat-traditional iproute2 \
# Git + archives
git unzip zip tar gzip bzip2 xz-utils \
# Build tools
build-essential make \
# Python
python3 python3-venv python3-pip \
# JSON parsing
jq \
&& rm -rf /var/lib/apt/lists/*

# Create non-root user
RUN groupadd sandbox && useradd -m -g sandbox sandbox \
&& mkdir -p /workspace && chown sandbox:sandbox /workspace

# Create Python venv and make it accessible to sandbox user
RUN python3 -m venv /opt/claude-venv \
&& /opt/claude-venv/bin/python -m pip install --upgrade pip \
&& chown -R sandbox:sandbox /opt/claude-venv

# Install Claude Code as sandbox user
USER sandbox
RUN curl -fsSL -o /tmp/install.sh https://claude.ai/install.sh \
&& bash /tmp/install.sh \
&& rm /tmp/install.sh

# Add venv + Claude to PATH
ENV HOME="/home/sandbox"
ENV PATH="/opt/claude-venv/bin:/home/sandbox/.local/bin:${PATH}"

WORKDIR /workspace

CMD ["bash"]
32 changes: 32 additions & 0 deletions sandbox/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Claude Code Sandbox

A Docker image for running Claude Code in a sandboxed Debian environment with Python and common Linux tools.

## Build

From the repository root:

```bash
docker build -t claude-sandbox sandbox/
```
Comment thread
coderabbitai[bot] marked this conversation as resolved.

## Run

1. Copy the sample env file and add your API key:

```bash
cp sandbox/sample.env sandbox/myenv # edit sandbox/myenv and set your credentials.
```

2. Run the container, mounting your project into `/workspace`:

```bash
docker run --rm -it --env-file sandbox/myenv -v "$(pwd)":/workspace claude-sandbox
```

3. Test that Claude Code is working:

```bash
docker run --rm --env-file sandbox/myenv claude-sandbox claude -p "who are you"
```

1 change: 1 addition & 0 deletions sandbox/sample.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ANTHROPIC_API_KEY=sk-ant-xxxx