Commit Graph
32 Commits
Author SHA1 Message Date
Timothy Jaeryang Baek aed5703c76 refac 2026-11-08 00:24:52 +09:00
Timothy Jaeryang Baek 35282e54d9 refac 2026-11-07 13:02:07 +09:00
Timothy Jaeryang Baek 7f2c306cd5 refac 2026-11-06 08:58:02 +09:00
G30 758db1a0f2 fix: install a color emoji font so the Browser tab shows emoji and flags (#201) 2026-11-02 14:45:05 +09:00
Timothy Jaeryang Baek 1a4ab59e34 refac 2026-11-02 10:50:14 +09:00
Timothy Jaeryang Baek 8137834d19 refac 2026-11-02 09:53:08 +09:00
Timothy Jaeryang Baek c758bf2ade refac 2026-11-02 09:03:11 +09:00
Timothy Jaeryang Baek 200b7ee445 refac 2026-11-02 08:27:16 +09:00
Timothy Jaeryang Baek 29cd3f00f2 refac 2026-11-02 01:16:55 +09:00
Timothy Jaeryang Baek dec18632cf refac 2026-11-02 00:22:51 +09:00
Timothy Jaeryang Baek 13afaba925 refac 2026-11-01 23:44:20 +09:00
Timothy Jaeryang Baek 3ea2648506 refac 2026-08-27 14:08:59 -04:00
Timothy Jaeryang Baek 1a71bfdd24 refac 2026-08-22 09:27:00 -04:00
Timothy Jaeryang Baek 2da589100c fix: port detection broken since v0.11.2 (#85, #63)
setcap cap_setgid+ep on the system Python binary made all Python
processes non-dumpable, blocking /proc/[pid]/fd/ access needed by
_pid_from_inode() to resolve socket inodes to PIDs.

Fix: copy the Python binary to python3-ot and setcap only the copy.
The open-terminal server uses python3-ot (has CAP_SETGID for
multi-user os.setgroups()), while user-spawned python3 stays
capability-free and dumpable.

Slim/Alpine: removed setcap entirely (multi-user mode requires sudo,
which only the full image has). Kept libcap packages installed.

README: corrected Image Variants table — multi-user mode is
full-image only.
2026-03-19 17:42:17 -05:00
Timothy Jaeryang Baek 0f2e4ea178 security: add upgrade hooks for security patching
- Alpine: apk upgrade active (Alpine patches ship fast)
- Slim/default: apt-get upgrade commented out with guidance
2026-03-13 16:43:58 -05:00
Timothy Jaeryang Baek ae89d2ed11 security: pin base images to python:3.12.13, remove apt/apk upgrade
Per Docker best practices, security patching should come from rebuilding
with updated base image tags, not from apt-get upgrade inside the
Dockerfile. Pinning to a specific patch version ensures reproducible
builds. Bump the version and rebuild to pick up new patches.
2026-03-13 16:35:51 -05:00
Timothy Jaeryang Baek 9941db7d4a security: add apt-get upgrade to default Dockerfile
Applies all available security patches at build time. Fixes ~14 CVEs
with upstream patches available (ruby, git, node). The remaining ~194
unfixable HIGHs are in Debian base packages (linux-libc-dev, imagemagick,
systemd, vim) with no upstream fix yet.
2026-03-13 16:27:45 -05:00
Timothy Jaeryang Baek 9398d3028f feat: network egress filtering via dnsmasq + ipset + iptables + capsh (Docker only)
Add OPEN_TERMINAL_ALLOWED_DOMAINS env var for domain-level network
restriction. Uses dnsmasq as a local DNS resolver (NXDOMAIN for
non-whitelisted domains), ipset for dynamic IP tracking (dnsmasq
auto-populates resolved IPs), iptables to block external DNS and
non-whitelisted IPs, and capsh to permanently drop CAP_NET_ADMIN.

Supports wildcards (*.github.com), live DNS, fails closed.
Set to empty string to block all; omit for full access.
Gracefully skips on bare metal if iptables is unavailable.

Bump version 0.11.11 → 0.11.12
2026-03-12 16:17:34 -05:00
Timothy Jaeryang Baekandwjss f4277c3210 fix: bounded process log rotation and timestamp-sortable IDs (#52, #54)
Co-Authored-By: wjss <a123edcrfv@live.cn>
2026-03-11 16:37:09 -05:00
Timothy Jaeryang Baek 8e580fa309 refac 2026-03-10 16:01:32 -05:00
Timothy Jaeryang Baek 0aeda7392c refactor: native Python I/O for multi-user reads
Replace subprocess-based reads (cat, find, stat, test) with native
Python file I/O. Uses chmod 750 + group membership so the server
process can read user directories directly. Writes still use sudo -u
for correct ownership.

- Dockerfile: add CAP_SETGID to Python binary via setcap
- user_isolation: chmod 750, usermod -aG, os.setgroups() refresh
- utils/fs.py: all reads now use aiofiles/os (no subprocess branching)
2026-03-09 18:05:55 -05:00
Timothy Jaeryang Baek 826010b466 feat: add python-docx, python-pptx, pypdf, and csvkit
- python-docx: Word document creation/editing
- python-pptx: PowerPoint creation/editing
- pypdf: PDF merge, split, rotate, extract text
- csvkit: advanced CSV processing CLI tools
2026-03-07 14:16:52 -06:00
Timothy Jaeryang Baek f89dc682d9 feat: add texlive-latex-base, openpyxl, and weasyprint
- texlive-latex-base: enables md-to-PDF via pandoc
- openpyxl: enables xlsx read/write with pandas
- weasyprint: alternative HTML-to-PDF rendering
2026-03-07 14:12:09 -06:00
Timothy Jaeryang Baek 553db84542 feat: bundle Docker CLI, Compose, and Buildx in container image
Install Docker CLI, Compose, and Buildx via get.docker.com so agents can
build images and run containers when the host Docker socket is mounted.
The entrypoint automatically fixes socket group permissions.

Closes #19
2026-03-06 22:01:14 -06:00
Timothy Jaeryang Baek 725b86beca fix: ensure ~/.local/bin is in PATH for bind-mounted home dirs
When /home/user is bind-mounted (instead of using a Docker volume),
Docker does not seed it with the image's original contents, so shell
dotfiles are missing and ~/.local/bin never appears in PATH.

- Add ENV PATH in Dockerfile so the server and all subprocesses
  always include ~/.local/bin
- Seed .bashrc and .profile from /etc/skel in entrypoint.sh when
  they are missing
- Create ~/.local/bin directory if it doesn't exist

Fixes #24
2026-03-06 15:50:59 -06:00
Timothy Jaeryang Baek 8ea7499911 fix: use bash as default shell in Docker container
Set /bin/bash as the login shell for the container user and export
SHELL=/bin/bash so the terminal PTY handler picks it up. Previously
the user was created with /bin/sh (dash), which does not support
interactive job control, producing 'can't access tty; job control
turned off'.

Bump version to 0.7.1.
2026-03-02 15:20:07 -06:00
Timothy Jaeryang Baek 6797a5e86e fix: handle permission errors gracefully, add entrypoint for volume ownership 2026-02-23 18:24:34 -06:00
Timothy Jaeryang Baek 5f16b797cb refac 2026-02-15 15:43:27 -06:00
Timothy Jaeryang Baek 2d153a3cc8 refac 2026-02-14 18:35:12 -06:00
Timothy Jaeryang Baek 1f6c363381 refac 2026-02-14 16:35:59 -06:00
Timothy Jaeryang Baek 3103f34ee7 refac 2026-02-12 13:45:59 -06:00
Timothy Jaeryang Baek 3f7c544835 init 2026-02-12 13:10:52 -06:00