Skip to content

Commit

Permalink
Merge pull request #223 from aryan9600/aryan9600/security-context
Browse files Browse the repository at this point in the history
Drop capabilities, enable seccomp and enforce runAsNonRoot
  • Loading branch information
stefanprodan authored Jan 20, 2022
2 parents 0c10cf0 + d454180 commit 86d5c29
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ RUN apk add --no-cache ca-certificates tini

COPY --from=builder /workspace/image-reflector-controller /usr/local/bin/

RUN addgroup -S controller && adduser -S controller -G controller

USER controller
USER 65534:65534

ENTRYPOINT [ "/sbin/tini", "--", "image-reflector-controller" ]
5 changes: 5 additions & 0 deletions config/manager/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ spec:
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
runAsNonRoot: true
capabilities:
drop: [ "ALL" ]
seccompProfile:
type: RuntimeDefault
ports:
- containerPort: 8080
name: http-prom
Expand Down

0 comments on commit 86d5c29

Please sign in to comment.