-
Notifications
You must be signed in to change notification settings - Fork 174
ROX-9350 Use fine-grained host paths for compliance mounts #2479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
813ba7b
a21297f
d611bf7
f868c64
cfc82b5
af27644
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -65,7 +65,8 @@ spec: | |
| readOnlyRootFilesystem: true | ||
| volumeMounts: | ||
| - mountPath: /host/var/run/docker.sock | ||
| name: var-run-docker-sock | ||
| name: var-run | ||
| subPath: var/run/docker.sock | ||
| readOnly: true | ||
| - mountPath: /host/proc | ||
| name: proc-ro | ||
|
|
@@ -76,7 +77,8 @@ spec: | |
| name: etc-ro | ||
| readOnly: true | ||
| - mountPath: /host/usr/lib | ||
| name: usr-lib-ro | ||
| name: usr-ro | ||
| subPath: usr/lib | ||
| readOnly: true | ||
| - mountPath: /host/sys | ||
| name: sys-ro | ||
|
|
@@ -116,16 +118,49 @@ spec: | |
| name: etc-ssl | ||
| - mountPath: /etc/pki/ca-trust/ | ||
| name: etc-pki-volume | ||
| - mountPath: /host | ||
| name: host-root-ro | ||
| - mountPath: /host/etc | ||
| name: etc-ro | ||
| readOnly: true | ||
| - mountPath: /host/proc | ||
| name: proc-ro | ||
| readOnly: true | ||
| - mountPath: /host/opt | ||
| name: opt-ro | ||
| readOnly: true | ||
| - mountPath: /host/run | ||
| name: run-ro | ||
| readOnly: true | ||
| - mountPath: /host/srv | ||
| name: srv-ro | ||
| readOnly: true | ||
| - mountPath: /host/sys | ||
| name: sys-ro | ||
| readOnly: true | ||
| - mountPath: /host/usr | ||
| name: usr-ro | ||
| readOnly: true | ||
| - mountPath: /host/lib | ||
| name: lib-ro | ||
| readOnly: true | ||
| - mountPath: /host/var/lib/kubelet/kubeconfig | ||
| name: var-lib-kubelet-kubeconfig | ||
| readOnly: true | ||
| - mountPath: /host/var/lib/docker | ||
| name: var-lib-docker | ||
| readOnly: true | ||
| - mountPath: /host/var/lib/containers | ||
| name: var-lib-containers | ||
| readOnly: true | ||
| - mountPath: /host/var/log | ||
| name: var-log | ||
| readOnly: true | ||
| - mountPath: /host/var/run | ||
| name: var-run | ||
| readOnly: true | ||
| - mountPath: /run/secrets/stackrox.io/certs/ | ||
| name: certs | ||
| readOnly: true | ||
| volumes: | ||
| - hostPath: | ||
| path: /var/run/docker.sock | ||
| name: var-run-docker-sock | ||
| - hostPath: | ||
| path: /proc | ||
| name: proc-ro | ||
|
|
@@ -136,14 +171,41 @@ spec: | |
| path: /etc | ||
| name: etc-ro | ||
| - hostPath: | ||
| path: /usr/lib | ||
| name: usr-lib-ro | ||
| - hostPath: | ||
| path: /sys/ | ||
| path: /sys | ||
| name: sys-ro | ||
| - hostPath: | ||
| path: /dev | ||
| name: dev-ro | ||
| - hostPath: | ||
| path: /opt | ||
| name: opt-ro | ||
| - hostPath: | ||
| path: /run | ||
| name: run-ro | ||
| - hostPath: | ||
| path: /srv | ||
| name: srv-ro | ||
| - hostPath: | ||
| path: /usr | ||
| name: usr-ro | ||
| - hostPath: | ||
| path: /lib | ||
| name: lib-ro | ||
| - hostPath: | ||
| path: /var/lib/kubelet/kubeconfig | ||
| name: var-lib-kubelet-kubeconfig | ||
| - hostPath: | ||
| path: /var/lib/docker | ||
| name: var-lib-docker | ||
| - hostPath: | ||
| path: /var/lib/containers | ||
| name: var-lib-containers | ||
| - hostPath: | ||
| path: /var/log | ||
| name: var-log | ||
| - hostPath: | ||
| path: /var/run | ||
| name: var-run | ||
| - name: certs | ||
| secret: | ||
| secretName: collector-tls | ||
|
|
@@ -154,9 +216,6 @@ spec: | |
| path: key.pem | ||
| - key: ca.pem | ||
| path: ca.pem | ||
| - hostPath: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. note: if we do decide to support language-level vulnerabilities in node-scanning, then will will probably need to mount
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes that's a concern. The key issue is the fact that the compliance container does long-running mounts. Have we thought about node-scanning in an "on-demand" model, where the node scanning occurs with a short-term mount of the root directory?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could consider that. I'm not familiar with this concept at all, but we can discuss more when/if we need to add language-level vulns |
||
| path: / | ||
| name: host-root-ro | ||
| - name: etc-ssl | ||
| emptyDir: {} | ||
| - name: etc-pki-volume | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am wondering why do we mount now
/usrwhen we used to mount only/usr/lib. Is this intended?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is intended. The collector and compliance containers now share volumes. The mount directories for the collector container are not changed, just the volumes used to provide those mounts. Previously, collector directly mounted
/usr/libvia the host/usr/libvolume, now we mount viasubPathon the host/usrvolume mount that is shared with the compliance container.Also note that previously, the compliance container mounted the entire host root.