Added privesc for stupid, stupid s6 for plex

This commit is contained in:
2026-01-12 20:27:36 +11:00
parent 465811c017
commit 72e770150e
4 changed files with 52 additions and 2 deletions

Binary file not shown.

View File

@@ -0,0 +1,12 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: peanutflix-sa-restricted-hostpath
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:openshift:scc:restricted-hostpath
subjects:
- kind: ServiceAccount
name: peanutflix-sa
namespace: peanutflix

View File

@@ -1,11 +1,11 @@
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding kind: ClusterRoleBinding
metadata: metadata:
name: peanutflix-sa-restricted-hostpath name: peanutflix-sa-restricted-hostpath-privesc
roleRef: roleRef:
apiGroup: rbac.authorization.k8s.io apiGroup: rbac.authorization.k8s.io
kind: ClusterRole kind: ClusterRole
name: system:openshift:scc:restricted-hostpath name: system:openshift:scc:restricted-hostpath-privesc
subjects: subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: peanutflix-sa name: peanutflix-sa

View File

@@ -0,0 +1,38 @@
apiVersion: security.openshift.io/v1
kind: SecurityContextConstraints
metadata:
name: restricted-hostpath-privesc
allowHostDirVolumePlugin: true # Needed for /dev/dri hostPath
allowHostIPC: false
allowHostNetwork: false
allowHostPID: false
allowHostPorts: false
allowPrivilegeEscalation: true
allowPrivilegedContainer: false
allowedCapabilities: null
defaultAddCapabilities: null
fsGroup:
type: MustRunAs
ranges:
- min: 1000
max: 2000
readOnlyRootFilesystem: false
requiredDropCapabilities:
- ALL
runAsUser:
type: MustRunAsRange
uidRangeMin: 1000
uidRangeMax: 2000
seLinuxContext:
type: MustRunAs
supplementalGroups:
type: RunAsAny
volumes:
- configMap
- downwardAPI
- emptyDir
- hostPath # This is what distinguishes it from restricted-s6
- persistentVolumeClaim
- projected
- secret
priority: 6 # Higher than restricted-s6 (5) due to hostPath access