fix: add USER nobody to Dockerfile to pass semgrep security check
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Running as root in a container is a security hazard. Use the existing nobody user from alpine:3.19 to drop privileges before CMD. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
7714013e48
commit
5f7dd7462d
@ -11,4 +11,5 @@ COPY --from=builder /cast-ghl-provider /cast-ghl-provider
|
|||||||
EXPOSE 3002
|
EXPOSE 3002
|
||||||
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
||||||
CMD wget -qO- http://localhost:3002/health || exit 1
|
CMD wget -qO- http://localhost:3002/health || exit 1
|
||||||
|
USER nobody
|
||||||
CMD ["/cast-ghl-provider"]
|
CMD ["/cast-ghl-provider"]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user