[OCP4]Get results from Compliance Operator in HTTP format

PRE-REQ

  • Rhel 8/9
  • Compliance operator is running on OCP4
  • Scansettingbinding CR is configured
  • oc command
  • oscap

Create shell script like below. get-result.sh

Create pod-template.yaml file in the same directory with the above shell script

Your directory will contain pod-template.yaml and get-result.sh

Give executable permission on the shell script file

chmod +x get-result.sh

make sure you can connect to the OCP with oc command before run the command below

./get-result.sh

Output

  • raw-http directory contain http format for compliance results
[myname@test]$ tree raw-http/
raw-http/
├── ocp4-cis-node-worker-xxxxxxxxxxxxxxx-pod.xml.bzip2.html
├── ocp4-cis-node-worker-xxxxxxxxxxxxxxx-pod.xml.bzip2.html
├── .....xml.bzip2.html
├── .....xml.bzip2.html
example http result file

--

--