apiVersion: policy.open-cluster-management.io/v1
kind: Policy
metadata:
  name: policy-check-setupjob-setupjob-operator-installer
  namespace: openshift-gitops
  annotations:
    policy.open-cluster-management.io/categories: CM Configuration Management, SI System and Information Integrity
    policy.open-cluster-management.io/standards: NIST SP 800-53
    policy.open-cluster-management.io/controls: CM-2 Baseline Configuration, SI-4 Information System Monitoring
spec:
  disabled: false
  remediationAction: inform
  policy-templates:
    - objectDefinition:
        apiVersion: policy.open-cluster-management.io/v1
        kind: ConfigurationPolicy
        metadata:
          name: policy-imagemanifestvuln-sub
        spec:
          remediationAction: inform
          severity: high
          object-templates:
            - complianceType: musthave
              objectDefinition:
                apiVersion: operators.coreos.com/v1alpha1
                kind: Subscription
                metadata:
                  name: container-security-operator
                  namespace: openshift-operators
                spec:
                  name: container-security-operator
                  installPlanApproval: Automatic
                  source: redhat-operators
                  sourceNamespace: openshift-marketplace
    - objectDefinition:
        apiVersion: policy.open-cluster-management.io/v1
        kind: ConfigurationPolicy
        metadata:
          name: policy-imagemanifestvuln-status
        spec:
          remediationAction: inform
          severity: high
          object-templates:
            - complianceType: musthave
              objectDefinition:
                apiVersion: operators.coreos.com/v1alpha1
                kind: ClusterServiceVersion
                metadata:
                  namespace: openshift-operators
                spec:
                  displayName: Red Hat Quay Container Security Operator
                status:
                  phase: Succeeded
    - objectDefinition:
        apiVersion: policy.open-cluster-management.io/v1
        kind: ConfigurationPolicy
        metadata:
          name: policy-imagemanifestvuln-example-imv
        spec:
          remediationAction: inform
          severity: high
          namespaceSelector:
            exclude:
              - kube-*
            include:
              - "*"
          object-templates:
            - complianceType: mustnothave
              objectDefinition:
                apiVersion: secscan.quay.redhat.com/v1alpha1
                kind: ImageManifestVuln

