feat(deploy): drop capabilities on every traffic-facing service - #252
feat(deploy): drop capabilities on every traffic-facing service#252simonvanlierde wants to merge 1 commit into
Conversation
Only backup and clamav dropped capabilities; api, migrator, docs, app and www ran with Docker's default set. Caddy and uvicorn bind an unprivileged port and need none of it, so the drop is free. - one x-hardening anchor carrying cap_drop, no-new-privileges and pids_limit - backup and clamav collapse onto it, removing the duplicated blocks - postgres, redis and cloudflared stay uncovered: they run as their own image users and need a separate look
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Closing: the premise was wrong. This overlay anchor therefore adds nothing, and duplicates it: Compose concatenates list-valued keys across files, so the second The one service genuinely covered by neither anchor is |
Recovered from a branch that was deleted after #244 merged only its first commit — this half never reached main.
Only
backupandclamavdropped capabilities;api,migrator,docs,appandwwwran with Docker's default set. Caddy and uvicorn bind an unprivileged port and need none of it, so the drop is free.x-hardeninganchor carryingcap_drop: [ALL],no-new-privileges:trueandpids_limit: 512backupandclamavcollapse onto it, deleting their duplicated blockspostgres,redisandcloudflaredstay uncovered: they run as their own image users and need a separate lookBehaviour change worth noting: the five newly covered services had no
pids_limitbefore and now inherit 512. Caddy and uvicorn sit far below that, andbackup/clamavhave run at 512 all along.Cherry-picked cleanly onto current main;
check yamland the rest of the hooks pass, seven services resolve the anchor, no duplicate keys. Verified on a staging host before the branch was lost:relab-docsserves 200,relab-wwwandrelab-appreport healthy with the full flag set.