Repository navigation
v0.4.1-beta — Fix scanner image HOME for cap_drop ALL
Pre-release
Pre-release
·
110 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Fixes the scanner startup failure under least-privilege hardening (cap_drop: ALL) reported in #272.
Fix
- Scanner image (
deploy/Dockerfile.scanner): hardened/rootto0550but leftENV HOME=/root. WithCAP_DAC_OVERRIDEdropped,nuclei’smkdir $HOME/.configfailed withEACCES(mkdir /root/.config: permission denied) and every scan failed closed. Now bakes a dedicated privateHOMEat/home/scanner(mkdir -p /home/scanner && chmod 0700,ENV HOME=/home/scanner) fornuclei/naabu/uncoverconfig+cache ($HOME/.config,$HOME/.cache,$HOME/nuclei-templates). Avoids the world-writable/tmp(1777) symlink/pre-creation surface thatHOME=/tmpwould have kept. A future move to a non-rootUSERwill need a matchingchown(e.g.chown 1001:0 /home/scanner).
Operational notes
cap_drop: ALLis often paired withread_only: true. With a read-only root filesystem the scanner now needs writable scratch at both/home/scanner(imageHOME) and/tmp(SCANNER_WORK_DIRdefaults to a private0700dir underos.TempDir()//tmp). Mount writableemptyDir/tmpfs volumes at both paths (as withEXPORT_SPOOL_DIR/TEMPLATE_SYNC_DIRfor the backend). Documented indocs/ADMIN_GUIDE.md:103andSCANNER_WORK_DIR.
Verification
- Before:
docker run --cap-drop ALL ghcr.io/...:0.4.0-beta nuclei -tl→mkdir /root/.config: permission denied - After:
docker run --cap-drop ALL ghcr.io/...:0.4.1-beta nuclei -tl→Successfully installed nuclei-templates at /home/scanner/nuclei-templates ls -ld /home/scanner→drwx------(0700, root-owned),/rootstaysdr-xr-x---, scanner/v1/capabilitieshealthy undercap_drop ALL;--read-only --tmpfs /tmp --tmpfs /home/scannerstarts clean.
Merged
Full changelog: v0.4.0-beta...v0.4.1-beta