mirror of
https://gitlab.kube.huskypup.net/Scooby/Homelabv4.git
synced 2026-08-20 23:16:49 +00:00
Initial commit
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
apiVersion: kyverno.io/v1
|
||||
kind: ClusterPolicy
|
||||
metadata:
|
||||
name: disallow-host-namespaces
|
||||
annotations:
|
||||
policies.kyverno.io/title: Disallow Host Namespaces
|
||||
policies.kyverno.io/category: DoD STIG
|
||||
policies.kyverno.io/severity: high
|
||||
policies.kyverno.io/description: >-
|
||||
STIG V-242386: Containers must not share the host process ID, IPC,
|
||||
or network namespace. Sharing host namespaces allows containers to
|
||||
access host-level resources and break isolation boundaries.
|
||||
spec:
|
||||
validationFailureAction: Enforce
|
||||
background: true
|
||||
rules:
|
||||
- name: host-namespaces
|
||||
match:
|
||||
any:
|
||||
- resources:
|
||||
kinds:
|
||||
- Pod
|
||||
exclude:
|
||||
any:
|
||||
- resources:
|
||||
namespaces:
|
||||
- kube-system
|
||||
- rook-ceph
|
||||
- istio-system
|
||||
- prometheus
|
||||
- kyverno
|
||||
- crowdsec
|
||||
validate:
|
||||
message: >-
|
||||
Sharing host PID, IPC, or network namespaces is not allowed (STIG V-242386).
|
||||
pattern:
|
||||
spec:
|
||||
=(hostPID): false
|
||||
=(hostIPC): false
|
||||
=(hostNetwork): false
|
||||
Reference in New Issue
Block a user