# an available choice for the specs control
name:
  PodSecurityPolicy
description:
  no privileged pods
multiselect:
  specs
replacements: # if user select this choice, the template variable names and values to use
  standards: |
    NIST-CSF
  categories: |
    PR.PT Protective Technology
  controls: |
    PR.PT-3 Least Functionality
  policyTemplates: |
    - objectDefinition:
        apiVersion: policy.open-cluster-management.io/v1
        kind: ConfigurationPolicy
        metadata:
          name: {{name}}-sample-restricted-psp
        spec:
          remediationAction: inform # will be overridden by remediationAction in parent policy
          severity: high
          namespaceSelector:
            exclude: ["kube-*"]
            include: ["default"]
          object-templates:
            - complianceType: musthave
              objectDefinition:
                apiVersion: policy/v1beta1
                kind: PodSecurityPolicy # no privileged pods
                metadata:
                  name: sample-restricted-psp
                  annotations:
                    seccomp.security.alpha.kubernetes.io/allowedProfileNames: '*'
                spec:
                  privileged: false # no priviliedged pods
                  allowPrivilegeEscalation: false
                  allowedCapabilities:
                  - '*'
                  volumes:
                  - '*'
                  hostNetwork: true
                  hostPorts:
                  - min: 1000 # ports < 1000 are reserved
                    max: 65535
                  hostIPC: false
                  hostPID: false
                  runAsUser:
                    rule: 'RunAsAny'
                  seLinux:
                    rule: 'RunAsAny'
                  supplementalGroups:
                    rule: 'RunAsAny'
                  fsGroup:
                    rule: 'RunAsAny'