Skip to content

PostgreSQL backup tool with Point-In-Time-Recovery and restore verification

FIX (security): suppress Trivy DS-0002 false positive on root Dockerfile

Rostislav Dugind9dfd647e763
diff --git a/.trivyignore b/.trivyignore
new file mode 100644
index 00000000..5a306222
--- /dev/null
+++ b/.trivyignore
@@ -0,0 +1,16 @@
+# Trivy misconfiguration findings ignored for this repo.
+# See: https://aquasecurity.github.io/trivy/latest/docs/configuration/filtering/
+#
+# DS-0002 — "Specify at least 1 USER command in Dockerfile with non-root user as argument"
+#
+# Suppressed for `Dockerfile` because the structural check is a false
+# positive for this image:
+# - The final stage creates two non-root users (postgres UID 999,
+# databasus UID 65532) and the main app process drops to non-root
+# via `exec gosu databasus ./main` at the end of start.sh.
+# - The entrypoint must start as root to:
+# * Remap PUID/PGID at runtime (NAS / Synology / Unraid use case).
+# * chown the mounted /databasus-data volume on first boot.
+# * Run `initdb` on the embedded PostgreSQL data dir on first boot.
+# - Adding a real `USER databasus` directive would break boot.
+DS-0002