The importance of containers in today’s cloud-native landscape is unparalleled. Ensuring their compliance, especially when you are working in a Federal Risk and Authorization Management Program (FedRAMP) Certified environment, isn’t just a best practice; it is a necessity.
In this post, we will show you how to align your container workflows with FedRAMP requirements without losing speed. We will walk you through practical strategies for achieving FedRamp compliance, from image scanning to policy enforcement and runtime protection
What is FedRAMP, and how does it apply to containers?
FedRAMP is a U.S. government-wide program that offers a standardized approach to governance assessment by handling security, compliance, authorization, and continuous monitoring. It is based on NIST Special Publications, most notably NIST SP 800-53 for system control and NIST 800-37 for risk management.
FedRAMP does publish container-specific requirements, and they are more prescriptive than most teams expect.
On top of the baseline controls, containerized systems must use hardened images, run an assessor-validated build and deployment pipeline, scan every image before it reaches production, monitor the registry per unique image, and assign a unique asset identifier to every image class running in production. Miss any one of these and the finding lands on your assessment, not your backlog.
Two details are worth pulling out, because they change how you architect.
- First, patching never happens in production. FedRAMP expects configuration changes and software patches to be applied to the replacement image, then redeployed, rather than applied to a running container.
- Second, the parts of your pipeline that sit to the left of the production registry, including development and test environments, may fall outside your authorization boundary. That distinction decides how much of your toolchain an assessor examines.
Read more: What is Container Security? 10 Best Practices & Solutions
What is required for FedRAMP compliance?
To achieve FedRAMP compliance in containerized environments, you must meet baseline security controls defined by NIST SP 800-53, along with additional FedRAMP-specific requirements tailored for container technologies.
FedRAMP leverages NIST 800-53 controls to assess the container environment and workloads, while also requiring container hardening based on guidelines such as those in NIST SP 800-70 and benchmarks like the CIS Docker Benchmark.
Key FedRAMP areas affecting container security
There are several control areas in which FedRAMP affects container security:
- Access control – ensure proper authentication and authorization of your containers
- Configuration management – manage container configurations securely
- System and information integrity – maintain container image integrity
- Audit and accountability – log and monitor container activity
- Risk assessment – implement regular vulnerability scanning of your containers and images
Container security best practices for FedRAMP compliance
The following best practices help address key requirements across system integrity, vulnerability management, and continuous monitoring:
1. Build and sign hardened images
To ensure that you start implementing FedRAMP, you should begin with your container images. Whenever you are building a custom image, you should ensure that you start with a minimalist, hardened base image from a trusted source to reduce the attack surface.
In addition, it’s paramount to digitally sign container images to ensure integrity throughout your deployment pipelines. The keys used for signing the images need to be generated so they are secure yet unpredictable, and strict access control policies should be implemented to validate only authorized engineers to handle these keys.
The signing process should be automated within CI/CD pipelines to minimize human interaction, thus minimizing the potential for human errors and breaches.
One of the most important aspects of securing your container images is automating the use of a container image vulnerability scanner. Many tools, such as Trivy, Clair, or Snyk Container, can be used to find vulnerabilities in your container images.
Let’s take a look at a Trivy scan for an image:
trivy image flaviuscdinu93/devops-dev-env:1.0.0
INFO [vuln] Vulnerability scanning is enabled
INFO [secret] Secret scanning is enabled
INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.55/docs/scanner/secret#recommendation for faster secret detection
INFO Detected OS family="alpine" version="3.20.2"
INFO [alpine] Detecting vulnerabilities... os_version="3.20" repository="3.20" pkg_num=71
INFO Number of language-specific files num=4
INFO [gobinary] Detecting vulnerabilities...
INFO [python-pkg] Detecting vulnerabilities...
WARN Using severities from other vendors for some vulnerabilities. Read https://aquasecurity.github.io/trivy/v0.55/docs/scanner/vulnerability#severity-selection for details.
In the above scan, you can see that every vulnerability has a code. Copy the code and paste it into a search engine to get more information about how to solve it.
Adding this crucial step to your build pipelines will always keep you up to date with images’ vulnerabilities and hold you accountable for solving them quickly.
2. Enforce policy at admission and in the pipeline
To ensure the safety of your container environment, you will need to use a policy enforcement tool such as Open Policy Agent (OPA) or Kyverno. These tools help you enforce rules around how your containers are built, deployed, and even run. This can reduce the risks associated with misconfigurations or insecure practices.
OPA can be integrated into CI/CD pipelines, APIs, or service meshes. With it, you can enforce policies that deny unsigned images, restrict exposed ports, or validate configuration files.
It can be used both inside and outside Kubernetes, and although it uses a declarative language called Rego that can be hard to learn, it is still useful to do so, as you can easily version your policy configurations.
# Deny Docker Compose services that publish restricted ports on the host
package main
import rego.v1
restricted_host_ports := {"22", "23", "3389"}
deny contains msg if {
some name, service in input.services
some port in service.ports
host := host_port(port)
host in restricted_host_ports
msg := sprintf("Service %q publishes restricted host port %s", [name, host])
}
# "8080:80" and "127.0.0.1:8080:80" both publish host port 8080
host_port(port) := split(port, ":")[count(split(port, ":")) - 2] if {
is_string(port)
contains(port, ":")
}
host_port(port) := port if {
is_string(port)
not contains(port, ":")
}
host_port(port) := format_int(port, 10) if is_number(port)The above policy can be tested against a Docker compose configuration using ConfTest.
Kyverno is built for Kubernetes and enforces policy through the admission process. Its policy types moved to Common Expression Language (CEL) over the 1.14 and 1.15 releases and reached stable in 1.18, so new policies use ValidatingPolicy and ImageValidatingPolicy on the policies.kyverno.io/v1 API.
The older ClusterPolicy type still works but is deprecated as of 1.18 and planned for removal in 1.20, so write anything new against the CEL types.
# Block mutable image tags at admission
apiVersion: policies.kyverno.io/v1
kind: ValidatingPolicy
metadata:
name: disallow-latest-tag
spec:
validationActions:
- Deny
matchConstraints:
resourceRules:
- apiGroups: [""]
apiVersions: [v1]
operations: [CREATE, UPDATE]
resources: [pods]
autogen:
podControllers:
controllers:
- deployments
- statefulsets
- jobs
- cronjobs
validations:
- message: "Images must use an explicit, immutable tag. The ':latest' tag is not allowed."
expression: >-
object.spec.containers.all(c, !c.image.endsWith(":latest"))
- message: "Init container images must use an explicit, immutable tag."
expression: >-
!has(object.spec.initContainers) ||
object.spec.initContainers.all(c, !c.image.endsWith(":latest"))Blocking :latest catches the obvious case. Pinning to digests is the stronger control, and Kyverno’s ImageValidatingPolicy does it directly through validationConfigurations, where mutateDigest rewrites tags to digests at admission and verifyDigest requires that images be verified by digest rather than tag. That maps cleanly onto FedRAMP’s expectation that you redeploy rather than modify.
Both OPA and Kyverno are great solutions for helping you achieve FedRAMP in container environments.
3. Detect runtime behavior that violates intended state
Runtime security ensures that containers behave as expected, suspicious activity is detected, and action is taken as soon as possible.
Tools such as Falco (for monitoring system calls in real time), AppArmor (implements access control in Linux processes), and seccomp (filters the system calls a container can make) are mandatory for implementing container runtime security.
Let’s review an example that detects if an interactive shell is spawned in production containers using Falco:
- rule: Shell in Container
desc: Detect launching of a shell inside a container
condition: >
container
and proc.name in (bash, sh, zsh, ksh)
and not proc.pname in (sshd, kubelet, containerd, dockerd)
output: >
Shell launched inside container (user=%user.name command=%proc.cmdline container=%container.name image=%container.image.repository)
priority: WARNING
tags: [container, shell, security]This rule detects if a shell was spawned in a container and provides details about the user, command, container name, and the container image used. The priority is set to WARNING, but you can easily change it to CRITICAL based on your threat model.
Falco can be easily integrated with Slack, MS Teams, or even Prometheus to ensure that you are alerted about this issue and get the ability to act on the issue as fast as possible.
4. Isolate workloads to limit blast radius
By implementing container isolation, you reduce the blast radius if one of your containers is compromised. Maintaining this isolation in FedRAMP is one of the first stepping stones you need to implement to achieve it.
To maintain container isolation, you can:
- Ensure you are using rootless containers – by running containers as non-root, you reduce host-level risk
- Take advantage of Cgroups (Control Groups) – limit CPU, memory, and I/O operations to prevent neighbor issues and denial of service attacks
- Reduce privilege escalation – map container user IDs to non-root host IDs, and ensure containers don’t share process IDs, network interfaces, or filesystems unless this is explicitly allowed
- Disable inter-container communication by default
- Use read-only filesystems
All of these steps are critical for FedRAMP.
5. Automate evidence, inventory, and monitoring
Security should never be treated as a one-off setup or deemed the sole responsibility of the dedicated security team. Everyone is responsible for implementing security, and continuous monitoring enables ongoing visibility and alerting, making it easy for everyone to spot issues.
In FedRAMP environments, systems should be continuously monitored for compliance, anomaly detection, and incident response. You should monitor the image integrity, container activity, system resources, and ensure you have access logs to detect who did what.
Tools that can be used to implement continuous monitoring include Prometheus + Grafana (for collecting metrics and alerting), Elastic Stack (for centralized logging and search), and Falco (for real-time behavioural monitoring).
Addressing common FedRAMP challenges for containers
Adopting containers in a FedRAMP environment can create architectural and compliance complexities.
How do you inventory containers that live for minutes?
Containers are short-lived and can scale dynamically, making it hard to track and audit changes in real time. To overcome this problem, you need to implement a container orchestration platform that offers powerful governance features and maintains detailed metadata about your containers.
How do you prove image provenance?
In FedRAMP, you need to know the provenance of all the environment components. To solve this problem in container environments, you need to implement a secure container supply chain with signed images that have verified base layers and a Software Bill of Materials (SBOM) for each container.
How do containers meet identity controls without OS users?
Containers don’t have traditional OS-level user management, which complicates FedRAMP controls. To solve this, you should implement Kubernetes RBAC (if you are using Kubernetes), Kyverno, or OPA to enforce non-root containers, isolate your workloads using network policies, and even integrate with a centralized Identity Access Management (IAM) offering.
How do you produce continuous evidence when images change daily?
FedRAMP mandates periodic evidence of control enforcement, but containers change frequently. To address this, you need to automate compliance checks using tools such as Cloud Custodian or OPAN, include security vulnerability scans, and generate automated compliance reports tied to your container events.
How fast must you remediate a container vulnerability?
FedRAMP no longer sets deadlines by CVSS severity. Timeframes now come from a Potential Agency Impact N-rating (PAIN), cross-referenced against whether the vulnerability is likely exploitable and whether it is reachable from the internet.
For Class A and Class B, FedRAMP expects a PAIN-5 vulnerability that is both likely exploitable and internet-reachable to be mitigated or remediated to a lower rating within 4 days of evaluation. The same rating, not internet-reachable, gets 8 days. Not likely exploitable, 32 days. Class C compresses the worst case to 2 days and Class D to 12 hours.
The rules also fold in CISA Binding Operational Directive 26-04, which means Known Exploited Vulnerabilities follow the due dates in CISA’s KEV catalog regardless of your own assessment, and you should not deploy new machine-based resources carrying a KEV at all. The obtain and maintain date for these rules is December 7, 2026.
For containers, this reshapes triage. Reachability now drives the deadline, so a CVE sitting in a layer that never loads at runtime is treated differently from one on your ingress path. That is what makes SBOM and VEX data operationally useful rather than decorative: FedRAMP defines a false positive to include software that exists on a resource but is not loaded, running, or otherwise in a state required for exploitation.
If you are looking for an infrastructure orchestration platform to help with your Kubernetes workflows, Spacelift can help. Apart from supporting Kubernetes, it helps you to leverage infrastructure-as-code tools such as Terraform, OpenTofu, and others.
Read how Spacelift implements security. To learn more about the product, create a free account today or book a demo with one of our engineers.
Key points
Your DevOps/platform engineering practices don’t have to be sacrificed to achieve FedRAMP, but you need to add “Sec” to them. This requires discipline, automation, and visibility, and all the engineering teams involved need to collaborate and treat security as a shared responsibility from code to production.
With the right tools and security postures, your container workflows can be secure, scalable, and fully compliant.
Solve your infrastructure challenges
Spacelift is a flexible orchestration solution for IaC development. It delivers enhanced collaboration, automation, and controls to simplify and accelerate the provisioning of cloud-based infrastructures.

