Skip to content

feat: enforce no-new-privileges for non-root containers#8018

Draft
Copilot wants to merge 1 commit into
mainfrom
copilot/add-no-new-privileges-config
Draft

feat: enforce no-new-privileges for non-root containers#8018
Copilot wants to merge 1 commit into
mainfrom
copilot/add-no-new-privileges-config

Conversation

Copilot AI commented Apr 28, 2026

Copy link
Copy Markdown
Contributor
  • todo: remove the value in update-yaml.sh

Adds security-opt: no-new-privileges:true to all AIO-managed containers confirmed to run as a non-root user, preventing privilege escalation via setuid/setgid binaries.

Changes

  • containers-schema.json – Added no_new_privileges boolean field to the container definition schema
  • Container.php – Added noNewPrivileges bool property
  • ContainerDefinitionFetcher.php – Reads no_new_privileges from JSON and passes it to Container
  • DockerActionManager.php – Builds SecurityOpt array incrementally; appends no-new-privileges:true when set. Also fixes the Collabora seccomp case to append to the existing array rather than overwrite it (preserving label:disable and no-new-privileges)
  • containers.json – Added "no_new_privileges": true to all 12 confirmed non-root containers:
Container Effective user
nextcloud-aio-apache 33 (www-data)
nextcloud-aio-database 999
nextcloud-aio-notify-push 33 (www-data)
nextcloud-aio-redis 999
nextcloud-aio-collabora 1001 (Dockerfile)
nextcloud-aio-talk 1000
nextcloud-aio-talk-recording 122
nextcloud-aio-domaincheck www-data (Dockerfile)
nextcloud-aio-clamav 100
nextcloud-aio-imaginary 65534 (nobody)
nextcloud-aio-fulltextsearch 1000 (Dockerfile)
nextcloud-aio-whiteboard 65534 (nobody)

Containers that legitimately run as root (nextcloud, borgbackup, watchtower, onlyoffice, docker-socket-proxy) and the externally-managed harp image are intentionally excluded.

@pabzm

pabzm commented Jun 1, 2026

Copy link
Copy Markdown
Member

Sounds and looks good! I'm just not sure if it'll work for all the containers that got this attribute added to in containers.json.

@szaimen Did you test it?

@szaimen szaimen modified the milestones: v13.2.0, next Jun 4, 2026
@szaimen szaimen modified the milestones: v13.2.1, next Jun 8, 2026
@szaimen szaimen added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Jun 9, 2026
@szaimen szaimen marked this pull request as draft June 9, 2026 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developing Work in progress enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants