Hi there,
first of all, I miss the “Security” category in this forum.
As being an ISO I’m looking into things differently, in comparison to others. While most tech people are already happy, that things are working, it might be time to take a step further and to look if things work securely.
One thing in modern network service design is to avoid using root privileges at all costs. It’s, because a crash of that process could lead to a possible breach-in with root privileges. So if someone breaks that ‘pyhton3’ process in HAOS, he’s in full control of that box, all the docker containers inclusively. There is no doubt, that complex web interfaces/GUIs have exploitable flaws.
Today I found out, that the main HomeAssistant network service ‘python3’ is running with root privileges on the HAOS host side (outside of docker). It seems to be a quite bad design decision, in the light of aforementioned. While all other things run in dockerized compartments safe and sound, this very important network service is running with the most privileges possible outside of any container.
First, I suggest, not to run that main network service with root privileges. It should drop to something similar to “www-data”. That approach is good practice and well known.
We could then use a nginx as reverse proxy in front of that process. It might catch some odd byte games here, before those reach the python process.
Manuel