DISA STIG
This page describes how the OCM CLI and OCM controller images and the controller
Helm chart are hardened, and how the images are checked against DISA
requirements. The release pipeline scans every image against the DISA GPOS SRG
before publishing it. All images are built FROM scratch and
contain only static binaries and a CA bundle: the slim CLI image only ocm, the
default CLI image and the controller image also a FIPS build of cosign. See
FIPS 140-3: Artifacts
for how they are built.
Relation to FIPS 140-3
FIPS 140-3 and the DISA STIG are complementary. FIPS 140-3 validates cryptographic modules, while the DISA STIG provides holistic system-hardening configuration baselines that mandate those validated modules:
| Feature | FIPS 140-3 | DISA STIG |
|---|---|---|
| Focus | Cryptography | Complete system hardening |
| Governing body | NIST (National Institute of Standards and Technology) | DISA (Defense Information Systems Agency) |
| Type of standard | Cryptographic module validation and testing | Configuration requirements and technical controls |
| Scope | Algorithms, keys, and boundary protection | Operating systems, applications, and their configuration |
What OCM does for FIPS 140-3 — the Go Cryptographic Module in its binaries,
runtime modes, digest algorithms, and the external signing binary cosign — is
on the
FIPS 140-3
page.
Container Hardening
Both images and the controller Helm chart follow the DISA Container Image Creation and Deployment Guide for the parts OCM controls:
| Measure | CLI image | Controller image / chart |
|---|---|---|
Runs as non-root user 65532 | ✅ | ✅ (runAsNonRoot, runAsUser/runAsGroup: 65532) |
| No setuid/setgid executables | ✅ (none shipped) | ✅ (none shipped) |
| No shell or package manager | ✅ | ✅ |
| No privilege escalation, all capabilities dropped | — | ✅ |
seccompProfile: RuntimeDefault | — | ✅ |
Read-only root filesystem, writable emptyDir at /tmp | — | ✅ |
| Liveness and readiness probes, resource requests and limits | — | ✅ |
The controller’s pod spec meets the Kubernetes restricted Pod Security Standard, and the end-to-end tests install the chart into a namespace that enforces it.
The CLI image runs with HOME=/, Docker’s default for a user without a passwd
entry, so configuration mounted at /.ocmconfig or /.docker/config.json is
found. Caches go to the world-writable /.cache, for any user ID. To read files
that only your user can read, or to write into a mounted directory, run the
container with --user "$(id -u):$(id -g)".
STIG Scan
DISA publishes no STIG for container images. Like vendors of hardened images, OCM scans its images against the DISA General Purpose Operating System Security Requirements Guide (GPOS SRG) with OpenSCAP, using the open source Chainguard GPOS SRG profile. The release pipeline scans the linux/arm64 and linux/amd64 variants of the CLI, slim CLI and controller images it builds, and fails before publishing if any rule fails.
The profile checks a Wolfi root filesystem in a few places.
.github/stig/tailoring.xml deselects those rules, and
.github/stig/ocm-supplement-xccdf.xml checks the same SRG requirements against
what the images contain, with OVAL definitions in
.github/stig/ocm-supplement-oval.xml:
| SRG rules | Chainguard profile checks | OCM check |
|---|---|---|
| SV-203649, SV-203739, SV-203750, SV-203751, SV-203776 | OpenSSL FIPS provider | Every executable has GOFIPS140=v<version> and fips140=on in its build information — checked by the pipeline’s Image provenance (FIPS module, CA bundle) step, not by OVAL |
| SV-263659 | Wolfi CA bundle digests | The only certificate file is the CA bundle of the digest-pinned Garden Linux base image, compared byte for byte against that base image — same provenance step |
| SV-203675 | Shared library permissions | No shared libraries or dynamic loader |
| SV-203716 | Shared library permissions | No package manager, setuid/setgid files, world-writable files, world-writable directories without the sticky bit, or executables other than the entrypoint and those declared for the image |
| SV-203616, SV-203617, SV-203664 | /var/log permissions | No on-disk log locations; logs go to stdout/stderr |
The tailoring also deselects SV-203753 and SV-203754 (non-executable data regions, ASLR). Their SCE scripts read the kernel of the host running the scan, not the image, and pass even for an empty root filesystem; they are requirements on the host that runs the container and have to be assessed there.
The first two rows are not part of the XCCDF evaluations: they run as a separate workflow step, because OVAL reads neither Go build information out of a binary nor a file from outside the scanned root filesystem. The local procedure below runs the two evaluations only, not those checks.
Each image declares the executables it may contain besides its entrypoint in its
own profile in .github/stig/ocm-supplement-xccdf.xml
(xccdf_software.ocm_profile_<image>), as the anchored regular expression
xccdf_software.ocm_value_executables. The default CLI image and the controller
image allow /usr/local/bin/cosign next to their entrypoint; the slim CLI image
allows only /ocm. Any other executable fails the scan, as does any shared
library, which ocm_rule_no_shared_libraries rejects for every image.
The scan runs offline on the image’s root filesystem. To scan an image locally, stack its layers and run the same two evaluations the pipeline runs, for example for the default CLI image:
sudo rm -rf tmp/layout tmp/rootfs # each scan needs a root filesystem of its own
mkdir -p tmp/layout tmp/rootfs stig
docker save <image> -o tmp/image.tar
tar -xf tmp/image.tar -C tmp/layout
# The images are scratch plus COPY, so their layers stack without whiteouts.
# Extract as root to keep ownership and setuid/setgid bits, as the pipeline does.
for layer in $(jq -r '.[0].Layers[]' tmp/layout/manifest.json); do
sudo tar -xpf "tmp/layout/$layer" -C tmp/rootfs
done
oscap() {
docker run --rm -u 0:0 -e OSCAP_PROBE_ROOT=/rootfs \
-v "$PWD/tmp/rootfs:/rootfs:ro" -v "$PWD/.github/stig:/stig:ro" -v "$PWD/stig:/out" \
"$(sed -n 's/^OPENSCAP_IMAGE=//p' .env)" xccdf eval "$@"
}
rc=0
oscap --tailoring-file /stig/tailoring.xml --profile xccdf_software.ocm_profile_gpos-container \
--results /out/gpos-results.xml --report /out/gpos-report.html \
/usr/share/xml/scap/ssg/content/ssg-chainguard-gpos-ds.xml || rc=$?
oscap --profile xccdf_software.ocm_profile_cli \
--results /out/ocm-results.xml --report /out/ocm-report.html \
/stig/ocm-supplement-xccdf.xml || rc=$?
[[ $rc -eq 0 ]] || echo "STIG scan failed, see stig/*.html" # the pipeline fails on a failed rule of either evaluationExtract the layers, not docker export: an exported container also carries
Docker’s own init layer — /.dockerenv, /etc/hosts, /etc/resolv.conf,
/etc/mtab, /dev, /proc, /sys — and /.dockerenv is a regular file with
mode 0755, which ocm_rule_minimal_rootfs reports as an undeclared executable.
The pipeline stacks the layers of the OCI layout it scans for the same reason.
stig/ then contains the XCCDF results and HTML reports of both evaluations,
the same paths the STIG scan (DISA GPOS SRG) step writes. The step’s job, the
reusable Image scan workflow
(.github/workflows/image-scan.yml), also runs a vulnerability
scan (Trivy, with an OpenVEX document from govulncheck; see
EU Cyber Resilience Act)
for each image and architecture. It writes both results to the job summary and
uploads the reports as image-scan-<image>-<arch> workflow artifacts, for
example image-scan-cli-amd64.
Node operating system and cluster STIGs, such as the Kubernetes STIG, are the platform operator’s responsibility.