oscap-docker(8)
π oscap-docker(8) π
okay bestie, pull up a chair, we're doing the <rainbow>System Administration Utilities</rainbow> thing today. this is oscap-docker, and it's lowkey one of the most useful little tools in the OpenSCAP universe, so let's get into it π«Ά
β¨ NAME β¨
oscap-docker β the tool that runs oscap inside a docker container or a docker image, no cap π³
πΈ DESCRIPTION πΈ
so here's the vibe: oscap-docker can assess vulnerabilities or security compliance on either your running Docker containers or your cold, unplugged Docker images. the actual scanning is done by the OpenSCAP tool oscap(8) running underneath, doing all the heavy lifting like the main character it is π
and where does the vuln info come from? the definition of vulnerabilities (that's the CVE stream, iykyk) gets downloaded straight from the product vendor. periodt.
π³ Compliance scan of Docker image
usage:
oscap-docker image IMAGE_NAME OSCAP_ARGUMENT [OSCAP_ARGUMENT...]
this runs any OpenSCAP oscap(8) command inside the chroot of a mounted docker image. want the full tea on what arguments you can pass? go read the oscap(8) man page, it's all there π
π³ Compliance scan of Docker container
usage:
oscap-docker container CONTAINER_NAME OSCAP_ARGUMENT [OSCAP_ARGUMENT...]
same deal β it runs any OpenSCAP oscap(8) command inside the chroot of a mounted docker container. heads up tho: the result of this can differ from scanning just an image, because of the defined mount points. so like, don't be shocked if the numbers move π
π³ Vulnerability scan of Docker image
usage:
oscap-docker image-cve IMAGE_NAME [--results oval-results-file.xml [--report report.html]]
what happens here: it attaches the docker image, figures out the OS variant and version, downloads the CVE stream that actually applies to that OS, and then finally runs the vulnerability scan. the full pipeline, slay β¨
π³ Vulnerability scap of Docker container
usage:
oscap-docker container-cve CONTAINER_NAME [--results oval-results-file.xml [--report report.html]]
this one chroots into the running container, figures out the OS variant/version, downloads the CVE stream applicable to that OS, and then runs the vulnerability scan.
and ooh, important: if you wanna use a different oscap(8) binary, you pass it like --oscap=<path/to/oscap>, and it has to go as the first argument. first. not second. we don't negotiate with argument order bestie π
π SECURITY POLICIES π
- the
SCAP-Security-Guidepackage contains multiple configuration policies π - the Red Hat CVE stream can be found online at https://www.redhat.com/security/data/metrics/
π REPORTING BUGS π
found a bug? please report it using https://github.com/OpenSCAP/openscap/issues β the maintainers wanna know, fr fr π
π AUTHORS π
- Ε imon LukaΕ‘Γk
<slukasik@redhat.com>
and that's the whole page, bestie. this one's brought to you by Red Hat, Inc. and it's dated January 2016 β yes, an elder, but still serving absolute cunt in your container runtime. go scan something, you got this π π
π¦ where this page comes from
- alpine 3.24: openscap-doc 1.4.4-r0 Β· LGPL-2.1-or-later
- arch rolling: openscap 1.4.5-2 Β· LGPL-2.1-or-later
- debian bookworm: openscap-utils 1.3.7+dfsg-1+deb12u1 Β· LGPL-2.1-or-later
- debian trixie: openscap-utils 1.4.2+dfsg-1 Β· LGPL-2.1-or-later
- fedora 43: openscap-containers 1:1.4.2-7.fc43 Β· LGPL-2.1-or-later
- fedora 43: openscap-containers 1:1.4.4-1.fc43
- fedora 43: openscap-containers 1:1.4.6-1.fc43 Β· LGPL-2.1-or-later
- fedora 44: openscap-containers 1:1.4.3-2.fc44 Β· LGPL-2.1-or-later
- fedora 44: openscap-containers 1:1.4.4-1.fc44
- fedora 44: openscap-containers 1:1.4.6-1.fc44 Β· LGPL-2.1-or-later
- nixos 26.05: openscap 1.4.2
- nixpkgs unstable: openscap 1.4.2
- opensuse-leap 16.0: openscap-containers 1.4.1-160000.2.2 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: openscap-containers 1.4.1-160000.2.2 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: openscap-containers 1.4.1-160000.2.2 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: openscap-containers 1.4.1-160000.2.2 Β· LGPL-2.1-or-later
- ubuntu noble: openscap-utils 1.3.9+dfsg-1.1ubuntu2 Β· LGPL-2.1-or-later
- ubuntu questing: openscap-utils 1.4.2+dfsg-2
- ubuntu resolute: openscap-utils 1.4.3+dfsg-1build1 Β· LGPL-2.1-or-later
- ubuntu resolute: openscap-utils 1.4.3+dfsg-1ubuntu1 Β· LGPL-2.1-or-later
- ubuntu stonking: openscap-utils 1.4.4+dfsg-2 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms