Skip to content

Instantly share code, notes, and snippets.

@jkeam
Created June 23, 2025 23:29
Show Gist options
  • Save jkeam/ce20fa019145821527b10ecf455e345b to your computer and use it in GitHub Desktop.
Save jkeam/ce20fa019145821527b10ecf455e345b to your computer and use it in GitHub Desktop.
Just the profiles of a ScanSettingBinding
profiles:
- apiGroup: compliance.openshift.io/v1alpha1
kind: Profile
name: ocp4-stig-v2r2
- apiGroup: compliance.openshift.io/v1alpha1
kind: Profile
name: rhcos4-stig-v2r2
- apiGroup: compliance.openshift.io/v1alpha1
kind: Profile
name: ocp4-stig-node-v2r2
settingsRef:
apiGroup: compliance.openshift.io/v1alpha1
kind: ScanSetting
name: default
@jkeam
Copy link
Author

jkeam commented Jun 23, 2025

oc get compliancecheckresults.compliance.openshift.io -n openshift-compliance | grep -vE "PASS" | grep -iE "high"

@jkeam
Copy link
Author

jkeam commented Jun 23, 2025

oc get compliancecheckresults -n openshift-compliance -l 'compliance.openshift.io/check-status=FAIL,compliance.openshift.io/automated-remediation'

@jkeam
Copy link
Author

jkeam commented Jun 23, 2025

oc patch complianceremediations/<scan_name>-<remediation_name> -p '{"spec":{"apply":true}}' --type=merge  -n openshift-compliance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment