Skip to content

Commit ceb27a5

Browse files
Damienclaudehappy-otter
committed
merge: integrate origin/main (33 commits incl. AUTH_ENABLED) into feat/agent-skills-runtime
Brings AUTH_ENABLED + Basic-auth-via-URL-credentials support, S3/Garage, hardening tmpfs/skill-deps, slim CI, etc. into our skills feature branch. Required for LibreChat dev compat (PR #12767 dropped X-API-Key from uploadCodeEnvFile — see security-toolkit#96 for the corresponding LibreChat workaround). Conflicts resolved (5 zones in 4 files, all in src/services/sandbox/* + src/services/programmatic.py, none in auth/middleware): 1. src/services/sandbox/executor.py (lang-with-/proc list): COMBINED — keep ("java", "rs", "py", "python", "bash"). OURS gave /proc to Python (legacy DOCX/PPTX/XLSX skill path), THEIRS gave it to bash (LibreChat bash_tool migration). Both paths coexist on this fork until skills are migrated to bash exclusively. 2. src/services/sandbox/executor.py (NODE_PATH): THEIRS — use deps_root for consistency with PYTHONPATH/PIP_TARGET/GOPATH already on this branch. /opt/skill-deps is auto-created at startup by _startup_egress_proxy when ENABLE_SANDBOX_NETWORK=true (which we have). 3. src/services/sandbox/nsjail.py (seccomp bind syscall): COMBINED — same logic as conflict 1: ("py", "python", "java", "bash") are exempt from bind blocking, because LibreOffice (soffice) uses AF_UNIX sockets between oosplash and soffice.bin, regardless of which language invokes it. Variable renamed to seccomp_policy (THEIRS, more explicit). 4. src/services/programmatic.py (PTC wrapper, /proc + tmpfs hardening): COMBINED SELECTIVELY — keep OURS on /proc accessibility (PTC may invoke LibreOffice for skills) AND take THEIRS on the tmpfs/skill-deps hardening (BUG-007 + BUG-008): noexec,nosuid,nodev on /tmp, /var/tmp, /run/lock, /var/lib/php/sessions; nosuid,nodev bind on skill-deps. 5. src/services/sandbox/pool.py (REPL pool wrapper, /proc + tmpfs): COMBINED SELECTIVELY — same as conflict 4. Note: upstream comment "REPL is Python-only, always safe to mask /proc" doesn't hold for this fork because Python skills shell out to soffice which requires /proc. Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
2 parents bed8564 + 5736871 commit ceb27a5

90 files changed

Lines changed: 5610 additions & 3389 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,42 @@
66
API_KEY=your-secure-api-key-here-change-this-in-production
77
# API_KEYS=key1,key2,key3 # Additional API keys (comma-separated)
88
# MASTER_API_KEY=your-secure-master-key # Required for admin dashboard CLI
9+
#
10+
# AUTH_ENABLED=true # Set to false to disable x-api-key/Basic auth checks
11+
# # on user endpoints. Use only when running behind a
12+
# # trusted network boundary. /api/v1/admin/* still
13+
# # requires MASTER_API_KEY regardless.
14+
#
15+
# Three ways clients can authenticate when AUTH_ENABLED=true:
16+
# 1. x-api-key: <key> (recommended for proxies)
17+
# 2. Authorization: Basic base64("<key>:") (LibreChat URL credentials)
18+
# e.g. LIBRECHAT_CODE_BASEURL=https://<key>@your-api/v1
19+
# 3. (none, when AUTH_ENABLED=false)
20+
21+
# ── Sandbox network access (skill installs) ───────────────────
22+
# When ENABLE_SANDBOX_NETWORK=true, sandboxes can reach the internet but only
23+
# through an inline allowlist proxy that permits PyPI, npm, Go modules, and
24+
# crates.io. Required for skills that pip/npm/go install dependencies at
25+
# runtime. Off by default (sandboxes are isolated).
26+
#
27+
# ENABLE_SANDBOX_NETWORK=false
28+
# SANDBOX_EGRESS_PORT=18443 # local-only, sandbox -> proxy
29+
# SANDBOX_EGRESS_ALLOWLIST= # comma-separated extra hosts
30+
# SKILL_DEPS_PATH=/opt/skill-deps # backing volume mount
931

1032
# ── Redis ───────────────────────────────────────────────────────
1133
REDIS_HOST=localhost
1234
REDIS_PORT=6379
1335
# REDIS_PASSWORD=
1436
# REDIS_URL=redis://localhost:6379/0 # Alternative to individual settings
1537

16-
# ── MinIO / S3 ─────────────────────────────────────────────────
17-
MINIO_ENDPOINT=localhost:9000
18-
MINIO_ACCESS_KEY=minioadmin
19-
MINIO_SECRET_KEY=minioadmin
20-
# MINIO_SECURE=false
21-
# MINIO_BUCKET=code-interpreter-files
38+
# ── S3 Storage (Garage) ────────────────────────────────────────
39+
S3_ENDPOINT=localhost:3900
40+
S3_ACCESS_KEY=GKminioadmin0000
41+
S3_SECRET_KEY=minioadminsecret
42+
# S3_SECURE=false
43+
# S3_BUCKET=code-interpreter-files
44+
# S3_REGION=garage
2245

2346
# ── Execution Limits ───────────────────────────────────────────
2447
# MAX_EXECUTION_TIME=30 # Seconds (default: 30)
@@ -35,7 +58,7 @@ MINIO_SECRET_KEY=minioadmin
3558
# PORT=8000 # External host port published by docker compose
3659

3760
# ── SSL/HTTPS ──────────────────────────────────────────────────
38-
# HTTPS works the same with docker-compose.yml and docker-compose.prod.yml:
61+
# HTTPS configuration:
3962
# 1. SSL_CERTS_PATH is a host path mounted to /app/ssl inside the container
4063
# 2. SSL_CERT_FILE and SSL_KEY_FILE must be container paths under /app/ssl
4164
#

0 commit comments

Comments
 (0)