Running hardend container (cap_drop: ALL, i.e. without CAP_DAC_OVERRIDE) results in raw directory listing at /web/
#1036
schainks
started this conversation in
Issue Triage
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Issue Description
AI disclosure: diagnosis, reproduction, and this write-up were AI-assisted (Claude Code). I reviewed and edited it, and verified the root cause, the regression source, and the workaround on my own hardware.
When running a hardend container (
cap_drop: ALL, i.e. withoutCAP_DAC_OVERRIDE), the omnibus web UI serves a raw directory listing at/web/instead of the app, and static routes will 403.Root cause:
/opt/scrutiny/webships mode644— a directory with no execute/search bit — so every file under it is unreadable (EACCES) onceDAC_OVERRIDEis dropped. Running as default root masks it.This is a regression of #502, which was fixed by #520. #520 added
chmod -R a+rX /opt/scrutinyto the olddocker/Dockerfile.web. When that was consolidated into the omnibusdocker/Dockerfile, the fix was replaced withCOPY --chmod=644 … /opt/scrutiny/web, and644on a directory strips the search bita+rXhad restored.Expected Behavior
/web/serves the Scrutiny dashboard regardless of Linux capabilities, as it did before the omnibus Dockerfile consolidation.Actual Behavior
Under
cap_drop: ALL,/web/returns a directory listing (Go's FileServer can't openindex.html),/web/dashboardand other routes 403, andHEAD /api/health403s — which also hangs the omnibus collector-once boot script (itscurl --head --failwait loop never exits, logging "scrutiny api not ready" forever).Reproduction Steps
ghcr.io/analogj/scrutiny:v0.9.2-omnibuswithcap_drop: ALLand onlycap_add: [SYS_RAWIO]./web/→ directory listing instead of the dashboard.docker run --rm --entrypoint sh ghcr.io/analogj/scrutiny:v0.9.2-omnibus -c 'ls -lan /opt/scrutiny/web'shows the dir is mode644.scrutiny debug logs
All reactions