Commit 5fdaa2c
fix: change Dockerfiles to not run as root (#21)
fix(security): run Docker containers as non-root user
Add non-root user configuration to api and web Dockerfiles to address
SonarCloud security hotspot docker:S6471. The python and node base
images run as root by default, which is a security risk.
- api/Dockerfile: Create appuser (uid 1000) and switch to it
- web/Dockerfile: Use built-in node user and switch to it
Co-authored-by: Claude <noreply@anthropic.com>1 parent 9362c69 commit 5fdaa2c
2 files changed
+12
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
22 | 29 | | |
23 | 30 | | |
24 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
23 | 28 | | |
24 | 29 | | |
25 | 30 | | |
| |||
0 commit comments