Skip to content

Conversation

@jvirgovic
Copy link

As per OWASP's Docker Security Cheat Sheet, it is recommended to set a user instead of running the container as root.

virgo@lenovo:~$ docker ps -a
CONTAINER ID   IMAGE                 COMMAND       CREATED              STATUS              PORTS     NAMES
ee568549229f   cyclonedx-py:latest   "/bin/bash"   About a minute ago   Up About a minute             nifty_swirles
virgo@lenovo:~$ docker exec -it ee568549229f sh -c "id"
uid=1000(cyclonedx) gid=1000(cyclonedx) groups=1000(cyclonedx)

⬆️ Now the container is running as a standard user.

@jvirgovic jvirgovic requested a review from a team as a code owner May 7, 2025 15:34
Signed-off-by: virgo-o <virgoj@protonmail.com>
@jvirgovic jvirgovic force-pushed the rootless-docker-image branch from 1614119 to f598dd5 Compare May 7, 2025 15:35
@jkowalleck jkowalleck added the enhancement New feature or request label May 8, 2025
@jkowalleck
Copy link
Member

thank you so much for this improvement!

Will merge it early next week 🚀

@jkowalleck jkowalleck merged commit a0cd44b into CycloneDX:main May 12, 2025
30 checks passed
@jvirgovic jvirgovic deleted the rootless-docker-image branch May 22, 2025 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants