2024-10-25 14:25:52 +02:00
|
|
|
include::../common/summary.adoc[]
|
2022-07-13 15:46:28 +02:00
|
|
|
|
|
|
|
|
|
|
|
== Sensitive Code Example
|
|
|
|
[source,yaml]
|
|
|
|
----
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Pod
|
|
|
|
metadata:
|
|
|
|
name: test
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- image: k8s.gcr.io/test-webserver
|
|
|
|
name: test-container
|
|
|
|
volumeMounts:
|
|
|
|
- mountPath: /var/run/docker.sock
|
|
|
|
name: test-volume
|
|
|
|
volumes:
|
|
|
|
- name: test-volume
|
|
|
|
hostPath:
|
|
|
|
path: /var/run/docker.sock # Sensitive
|
|
|
|
type: Socket
|
|
|
|
----
|
|
|
|
|
|
|
|
== Compliant Solution
|
|
|
|
[source,yaml]
|
|
|
|
----
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Pod
|
|
|
|
metadata:
|
|
|
|
name: test
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- image: k8s.gcr.io/test-webserver
|
|
|
|
name: test-container
|
|
|
|
----
|
|
|
|
|
2024-10-25 14:25:52 +02:00
|
|
|
include::../common/see.adoc[]
|
2023-05-25 14:18:12 +02:00
|
|
|
|
2022-07-13 15:46:28 +02:00
|
|
|
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
|
|
|
|
'''
|
|
|
|
== Implementation Specification
|
|
|
|
(visible only on this page)
|
|
|
|
|
2024-10-25 14:25:52 +02:00
|
|
|
include::../common/message-highlighting.adoc[]
|
2022-07-13 15:46:28 +02:00
|
|
|
|
|
|
|
|
|
|
|
endif::env-github,rspecator-view[]
|