Skip to content

fix(docker): Run ubuntu container as non-root user for security - #2226

Open
vibemasshq-dev wants to merge 1 commit into
dandavison:mainfrom
vibemasshq-dev:security/docker-non-root
Open

fix(docker): Run ubuntu container as non-root user for security#2226
vibemasshq-dev wants to merge 1 commit into
dandavison:mainfrom
vibemasshq-dev:security/docker-non-root

Conversation

@vibemasshq-dev

Copy link
Copy Markdown

Hey team! Exploring the repo and noticed a quick security tweak for the Docker environment.

1. Security Fix: Docker Container Runs as Root

Currently, the etc/docker/ubuntu.Dockerfile does not specify a user, meaning processes run as root by default. This increases the container's attack surface.
Fix: Added a non-root appuser and switched the container context to run under it safely.

2. Architecture Heads-Up (No Action Required)

As a side note, I was doing some static analysis on the codebase and noticed a potential connection to Issue #2221 (the git grep panic).

The analysis flagged an unhandled unwrap() call in src/handlers/grep.rs at line 197 (and 338) on grep_line.submatches. If the grep output doesn't match exactly what's expected, this will panic the main thread. This perfectly aligns with the stack trace reported in that issue!

Also, files like line_numbers.rs and diff_header.rs are getting quite large and might be prime candidates for splitting into smaller modules soon.

Awesome tool, I use it every day! 🚀

@vibemasshq-dev
vibemasshq-dev force-pushed the security/docker-non-root branch from 9cb0345 to 93acfa7 Compare August 30, 2026 23:25
@vibemasshq-dev
vibemasshq-dev force-pushed the security/docker-non-root branch from 93acfa7 to da6ccbb Compare August 30, 2026 23:26
@vibemasshq-dev

Copy link
Copy Markdown
Author

Any review on this? Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant