fix(tools): run as non-root user and move binaries to /usr/local/bin - #114
Conversation
Add 'operator' user so the Kali tools container no longer runs as root by default. Go and Foundry binaries are installed to /usr/local/bin instead of /root/ so they remain accessible to the non-root user.
Web challenges use curl on port 80, pwn challenges use process liveness (kill -0 1), and python-based infra services use urllib. Enables depends_on condition: service_healthy for proper startup ordering.
jmagly
left a comment
There was a problem hiding this comment.
Reviewed PR #114 at bb183694c502f8229d3c83b967b07b1c782ed0eb.
Blocking finding:
npm run tools:buildfails at the changedGOBIN=/usr/local/binlayer. The Go install for ProjectDiscovery httpx reports that/usr/local/bin/httpxalready exists and is not an object file. The earlier Python dependency layer installs an httpx console script there, so this path change creates a deterministic collision and the image cannot build.
Please stage or rename the ProjectDiscovery binary, or otherwise resolve the collision, then run the checked-off build, tools check, whoami, and representative Go-tool checks.
The compose healthcheck commit is also independent of the stated non-root scope; please split it or document and verify that scope explicitly.
Verification:
- docker compose config: pass, obsolete version warning only
- npm run tools:build: fail at Dockerfile Go-tool layer
- Public-input threat preflight: low risk
|
Addressed the blocking review in 2bd1493. Changes:
Verification:
Please re-review the now-focused diff. |
Superseded by b9991bc: the contributor resolved the /usr/local/bin collision and removed the unrelated compose change. Maintainer verification completed a full tools image build, non-root runtime/tool checks, smoke regression coverage, repository tests, and exact-head CI. The small bash -c smoke correction was added as contributor-courtesy cleanup.
|
Maintainer follow-up on exact head |
Summary
operatoruser so the Kali tools container no longer runs as root by default/usr/local/bin(accessible to non-root) instead of/root/go/binand/root/.foundry/bin/rootpaths fromPATHenvTest plan
npm run tools:buildsucceedsnpm run tools:checkpasses (radare2/gdb/objdump/upx + python stack + pip-audit)operatoruser:docker run --rm cybench-tools:latest whoami→operatordocker run --rm cybench-tools:latest nuclei -version