Re-running scans

Although it is possible to run scans as scheduled jobs, you must often re-run a scan on demand, particularly after remediations are applied or when other changes to the cluster are made.

Rerunning a scan with the Compliance Operator requires the use of an annotation on the scan object. However, with the oc-compliance plugin you can rerun a scan with a single command.

Procedure
  • Rerun the scans for the ScanSettingBinding object named my-binding by running the following command:

    $ oc compliance rerun-now scansettingbindings my-binding
    Example output
    Rerunning scans from 'my-binding': ocp4-cis
    Re-running scan 'openshift-compliance/ocp4-cis'