Skip to content

Commit c236393

Browse files
authored
fix(entrypoint): increase /tmp tmpfs from 128MB to 512MB (#72)
The 128MB limit was insufficient for runtime temporary storage needs. Increases to 512MB to match the /workspace mount ceiling. Closes #71
1 parent 385bd95 commit c236393

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This project enforces a three-layer security model. You must evaluate every chan
66

77
| Layer | Defense | Protects Against | Key Files |
88
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
9-
| **Container Hardening** | Non-root user (UID 1000), read-only rootfs, size-limited tmpfs (512MB /workspace, 1GB /home/claude, 128MB /tmp) | Privilege escalation, persistent compromise, disk-based DoS | `Dockerfile`, `scripts/entrypoint.sh` |
9+
| **Container Hardening** | Non-root user (UID 1000), read-only rootfs, size-limited tmpfs (512MB /workspace, 1GB /home/claude, 512MB /tmp) | Privilege escalation, persistent compromise, disk-based DoS | `Dockerfile`, `scripts/entrypoint.sh` |
1010
| **Network Isolation** | Default-deny iptables (OUTPUT DROP), domain allowlist, CoreDNS NXDOMAIN for unlisted domains, metadata IP blocks, UDP drop (except DNS) | Data exfiltration, C2 communication, unauthorized API access, metadata endpoint abuse | `network/domains.conf`, `network/Corefile.template`, `network/refresh-iptables.sh` |
1111
| **Command Approval** | Tier 1 regex hard-block, Tier 2 hot-word escalation, Tier 3 Haiku LLM classification | Dangerous command execution, credential leaks, lateral movement, tmux injection | `approval/rules.conf`, `approval/check-command.ts`, `approval/classifier.ts` |
1212

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ No new binaries, no collector sidecar, no Dockerfile changes. Claude Code's buil
368368
- **tmpfs mounts**: Writable areas are memory-backed and size-limited:
369369
- `/workspace` (512MB) — working directory for code
370370
- `/home/claude` (1GB) — Claude's home directory
371-
- `/tmp` (128MB) — temporary files
371+
- `/tmp` (512MB) — temporary files
372372
- **Settings file**: Claude Code's `settings.json` (which configures the approval hook) is owned by the `claude` user. Claude can delete and recreate it, which would remove the hook. This is an accepted risk — iptables is the real enforcement layer, and the hook provides defense-in-depth.
373373

374374
### Layer 2: Network Isolation

scripts/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ fi
1616
# === 1. Filesystem hardening ===
1717
# Mount tmpfs at writable paths before anything else
1818
mount -t tmpfs -o size=512m tmpfs /workspace
19-
mount -t tmpfs -o size=128m tmpfs /tmp
19+
mount -t tmpfs -o size=512m tmpfs /tmp
2020
mount -t tmpfs -o size=1024m tmpfs /home/claude
2121
chmod 1777 /tmp
2222

0 commit comments

Comments
 (0)