8.10. Assessing Configuration Compliance of a Container or a Container Image with a Specific Baseline

download PDF
Follow the steps to assess compliance of your container or a container image with a specific security baseline, such as Operating System Protection Profile (OSPP) or Payment Card Industry Data Security Standard (PCI-DSS).


  • The openscap-utils and scap-security-guide packages are installed.


  1. Find the ID of a container or a container image, for example:
    ~]# docker images
    REPOSITORY                            TAG      IMAGE ID       CREATED       SIZE   latest   096cae65a207   7 weeks ago   239 MB
  2. Evaluate the compliance of the container image with the OSPP profile and save scan results in the report.html HTML file.
    ~]$ sudo oscap-docker 096cae65a207 xccdf eval --report report.html --profile ospp /usr/share/xml/scap/ssg/content/ssg-rhel7-ds.xml
    Replace 096cae65a207 with the ID of your container image and the ospp value with pci-dss if you assess configuration compliance with the PCI-DSS baseline.


  1. Check the results in a browser of your choice, for example:
    ~]$ firefox report.html &


The rules marked as notapplicable are rules that do not apply to containerized systems. These rules apply only to bare-metal or virtualized systems.

Additional Resources

Red Hat logoGithubRedditYoutubeTwitter


Try, buy, & sell


About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.