A hardened container image has everything the application doesn’t need removed, such as shells, package managers and compilers, and its remaining configuration locked down. They can be measured against a published baseline like DISA STIG, and for US government work that baseline pairs with FIPS 140 cryptography and FedRAMP’s container requirements.
I vividly remember my first encounter with DISA STIGs. It was a baptism of fire, with RHEL 8, 300+ checks, zero automation (at the start) and very little time. Curiosity kept me sane, and I came out the other side fairly well versed in the subject.
Before you read any further, let me make one thing abundantly clear:
“You don’t have to be a federal contractor for any of this to be relevant to you.”
The US government’s security baselines are stringent, and that’s exactly why they make such good security practices. Yet most teams outside federal regulation overlook them. Maybe they look confusing, maybe you weren’t aware of them, or maybe (hopefully) you’ve already hardened your images and have your ducks in a row.
“Hardening” has become one of the most bandied about words in container security, and one of the most misunderstood. In this article, we’ll unpack what a hardened image actually is and clear up some common misconceptions.
Then we’ll dig into DISA STIGs, FIPS, and how they all feed into FedRAMP, something Aikido recently achieved. These are steps every team can learn from, contractors or not.
And it wouldn’t be a security blog post without some… acronyms! Here’s a quick glance before we go any further.
- DISA STIG: Defense Information Systems Agency Security Technical Implementation Guide
- FIPS: Federal Information Processing Standards
- NIST: National Institute of Standards and Technology
- FedRAMP: Federal Risk and Authorization Management Program
Why should you care if you’re not regulated?
Threat actors couldn’t care less if you’re regulated or not, they aren’t going to check your compliance status, now or later.
But the controls behind the standards in the post are real, they reduce your attack surface and your blast radius, regardless of who audits you.
- Removing what you don't need
- Running as non-root
- Locking down configuration
- Proving what's in your images
Hardening limits what an attacker can do once they're inside, it makes privilege escalation and lateral movement harder. These practices could also help commercially, because customers' security questionnaires increasingly ask for this type of evidence.
You don't have to adopt everything, you may choose not to adopt anything; but if you’re reading this thinking it’s just federal agencies that it applies to, you’re wrong, we can all learn from this stuff.
Hardened vs minimal vs distroless vs scratch images
A hardened image is one where anything that isn’t required has been removed, and what’s left has been locked down. In practice that normally looks like removing unneeded software; shells, package managers and compilers, whilst then enforcing secure configurations; such as non-root execution, read-only file systems.
“..That’s like a scratch image?”
Similar, but not quite. A scratch image starts empty and contains only what you put in it, usually a single static binary. Without an operating system, most STIG checks simply don’t apply. Arguably that makes scratch much more secure, but it brings its own headaches. It normally doesn’t include a CA certificate, and if you add the trusted CAs yourself, you’ll have to maintain them, and we saw with eMudhra why that’s an issue. Scratch normally doesn’t have user databases unless you add them, or a shell for debugging. Also a scratch image wouldn’t necessarily enforce secure configurations of the services that are running; so technically, not hardened by the definition above.
What are DISA STIGs
STIGs are configuration standards published by DISA for the US Department of Defense. Each one is a list of individual checks, each check either needs to be applied, or explained why it doesn’t apply. Each check has a severity (CAT I, II or III), a description of how to test it and how to “fix” it.
STIGs come in many different variations, for different technologies, the entire catalog can be viewed here.
Which OS STIG applies depends on your base image. Ubuntu, RHEL, UBI and Oracle Linux all have DISA STIGs. Debian and Alpine don’t, and Rocky is usually hardened against the RHEL STIG.
Where a STIG doesn’t exist, the general-purpose OS SRG applies. SRGs (Security requirements guides) are high-level security documents published by DISA, which define mandatory security requirements for broader technology categories, such as operating systems, databases and network devices. STIGs are derived from SRGs, so the SRG serves as a baseline when a specific STIG isn’t available.
DISA’s Container Image Creation and Deployment Guide and Container Hardening Process Guide explain how this applies to containers, including which host-level rules are inherited.
STIGs are published in machine-readable formats. And many of them, especially OS STIGs, come with SCAP benchmarks that tools like OpenSCAP can test automatically. That’s what turns “we’ve hardened it” into evidence you can use.
When a container image is claimed to be “STIG’d”, it should mean that the STIG or SRG guidance for its contents has been applied, scanned against a specific profile, and the results are available as evidence, e.g. what’s passed, what’s not applicable and why, and what’s still open.
What are some examples of STIG or SRG checks?
- “The Container Image Must Have Permissions Removed from Executables that Allow a User to Execute Software at Higher Privileges”
- “No accounts may have blank or null passwords”
- “The telnet-server package must not be installed”
How do you harden an image using STIGs?
This will be covered in a future technical deep dive, but in summary, there are a number of ways to harden an image using DISA STIGs. Which STIGs apply depends on the distro you’re using and what’s running on top of it. The general flow looks like:
- Start from the base. RHEL and Ubuntu have published STIGs. Minimal and distroless images often don’t, so you fall back to the generic OS SRG.
- Automate it. Don’t work through 300+ checks by hand (I’ve been there). SCAP tooling can both scan against a STIG profile and generate the fixes for you.
- Expect N/As. Plenty of STIG rules cover the kernel, bootloader, auditd or SSH. In a container, those are inherited from the host. Document them rather than ignoring them.
- Don’t stop at the OS. The app inside the image has its own STIG or SRG too, such as databases, web servers or Java.
- Bake it into the build. Apply the fixes in the Dockerfile, rescan in CI, and keep the results.
- Keep it updated. Every quarter, DISA releases new STIGs, to stay in sync, keep the baselines updated.
What is FIPS?
Federal Information Processing Standards, FIPS, are a family of US government standards. The standard we are concerned about for container images is FIPS 140, and it covers cryptographic modules, e.g. the libraries that actually do the encryption, signing and hashing, think OpenSSL.
FIPS validates the crypto module, and your image and application fall outside it. It doesn’t “harden” the image either. It simply ensures it’s using an approved crypto module. An image is only “FIPS” IF it ships a validated module, runs it in an approved mode and everything that does crypto, actually uses it.
In practice, this is restrictive. The module must pass its self-test before it will perform any cryptography. And the image can’t contain other cryptographic implementations or use non-approved algorithms for security purposes. Algorithms such as MD5 may only appear in non-security roles, such as checksums and only where the module permits it. All cryptographic operations must use the validated module and NIST approved algorithms.
How do you apply FIPS to an image?
Again, we’ll cover this in more depth in a technical deep dive, but strictly speaking, FIPS falls outside hardening. It’s about making sure every cryptographic operation in the image goes through a validated module running in approved mode. That can be achieved, in short by.
- Pick a validated module and check its certificate. It should be an active FIPS 140-3 certificate, and the module version has to match exactly.
- Read the Security Policy. Every CMVP certificate comes with one. It defines what “approved mode” means for that module.
- CMVP (cryptographic module validation program) is run jointly by NIST and the Canadian Centre for Cyber Security, and it validates cryptographic modules against FIPS 140.
- Remember the host. Containers share the host kernel. A FIPS image on a host that isn’t in FIPS mode is one of the most common issues assessors find.
- Check every runtime as well as the base. Go, Java, Node and Python each handle crypto differently.
- Expect things to break. Lots of apps fail the first time they run in FIPS mode, test early, and often.
What does NIST have to do with it?
National Institute of Standards and Technology, or “NIST”, is a non-regulatory federal agency within the US Department of Commerce. It’s widely recognised for creating guidelines and frameworks, such as the NIST Cybersecurity Framework and the Secure Software Development Framework.
But it’s relevant here, because NIST is the umbrella term, and it’s behind almost everything in this post. NIST publishes FIPS, and its other publications, like SP 800-53 controls, or SP 800-190 on container security. It’s also what STIGs and CIS benchmarks map their checks back to.
How does it all feed into FedRAMP?
FedRAMP is where all of these layers meet. It's the US government's authorisation for cloud services, built on NIST SP 800-53 controls, and for anything running in containers it explicitly states that you may only run containers built from hardened images.
FedRAMP's Vulnerability Scanning Requirements for Containers turn that into specific obligations:
- Hardened images: Images must be hardened against a benchmark from NIST's National Checklist Program (SP 800-70), which is where STIGs come in.
- Pipeline enforcement: Automation has to stop noncompliant containers from reaching production.
- Pre-deployment checks: Every image is scanned before it ships, and only images scanned within the last 30 days can be running in production.
- Registry monitoring: The registry itself is monitored alongside the pipeline.
- Inventory: Every class of image running in production gets a unique asset identifier.
The layers in this article map onto the 800-53 controls an assessor will test:
Aikido achieved FedRAMP Moderate authorization back in October 2026, and we used our own platform throughout the process, including using our own FIPS images.
Common misconceptions
“STIG means a minimal image.”
"STIG'd" has become slang for "small and clean", but a STIG is a configuration baseline and doesn't measure size. A distroless image can still fail STIG checks, and a full Red Hat UBI image can pass them. Minimal reduces attack surface. STIG proves configuration. You'll usually want both, but one isn't evidence of the other.
“Zero CVEs means hardened.”
CVE count tells you about vulnerabilities and doesn't cover configuration. An image with zero CVEs that runs as root, with setuid binaries and a shell isn't hardened!
“A FIPS image makes us FIPS compliant.”
FIPS only validates a crypto module. If your app brings its own crypto, such as a statically linked Go binary or a vendored OpenSSL, it can bypass the validated module completely.
“CIS and STIG are the same thing.”
They overlap heavily, but they're written by different bodies for different audiences, with different rules and severities. Passing a CIS Benchmark won't satisfy a DoD assessor asking for STIG results, and vice versa.
“Once the image is hardened, you’re done!”
Time and the runtime both undo hardening. New CVEs affect yesterday's clean image every day, so images need rebuilding and rescanning continuously. And a hardened image deployed as a privileged pod gives back everything you removed.
“Hardening means migrating to a new distro.”
Many hardened image catalogues ask you to switch to their distro and their update cadence. That brings breaking changes, regression testing and more importantly, lock-in. Switching base images is a migration project. Every service gets re-tested against a new base, anything that relied on a component the image strips out will break, and you depend on one vendor's release schedule from then on. Pinning to a digest for reproducibility also stops patches reaching you, because fixes arrive as new digests you have to roll forward to.
Read: The upgrade trap: when upgrading is the wrong answer to a CVE.
You can also patch and minimize the base image you already run, on the same distribution and major version, with fixes backported. Adoption can be as small as changing one FROM line, and pinned versions keep getting patches. That's the approach behind Aikido Images.
Hardened images can help everyone
You don’t need a federal contract to benefit from a federal-grade baseline. Start with a minimal image, measure it against a published standard, and treat FIPS as a separate decision driven by your data and your customers. Keep the evidence from every build.
There’s a very valid reason why the US government has tight protocols, and we could learn a lot from it as an industry.
If you want to harden the images you already run without a distro migration, take a look at Aikido Images, we cover all of this.
FAQs
Does FedRAMP require hardened container images?
Yes. FedRAMP’s container requirements say containers must be built from images hardened against a benchmark from NIST’s National Checklist Program, which is where DISA STIGs come in. Images must also be assessed before deployment, and only images assessed within the last 30 days can run in production.
Which STIG applies to a container image?
It depends on the base image. Ubuntu, RHEL, UBI and Oracle Linux all have DISA STIGs. Debian and Alpine don’t, so the general-purpose OS SRG applies instead. The application inside the image, such as a database, web server or Java, has its own STIG or SRG too.
Is a distroless image the same as a hardened image?
No. Distroless images remove most of the operating system, which reduces attack surface. Hardening also covers configuration, such as users, permissions and service settings, measured against a baseline. A distroless image can still fail STIG checks.
Does FIPS make an image hardened?
No. FIPS 140 validates a cryptographic module. An image is only FIPS-capable if it ships a validated module, runs it in approved mode, and routes every cryptographic operation through it. It doesn't say anything about the rest of the image's configuration.
How often should hardened images be rebuilt?
Continuously. New CVEs affect clean images every day, and FedRAMP requires that only images assessed within the last 30 days run in production. DISA also releases updated STIGs every quarter.
Do I need hardened images if I'm not a federal contractor?
You don't need them for compliance, but the controls reduce attack surface and blast radius for any team. Customers' security questionnaires also increasingly ask for this kind of evidence.
Do I have to migrate to a new distro to get hardened images?
No. Some vendors rebuild images on their own distribution, which means moving every service onto a new base. You can also keep the distribution and major version you already run and have it patched and minimized, with fixes backported (this same idea also applies to open source dependencies). That avoids re-testing every service against a new base. Compare the options here.



