Key Takeaways
Container security scanning identifies known vulnerabilities but cannot determine whether an image is authorized to run in production.
Image digests, signatures, and provenance establish artifact identity, publisher trust, and build integrity.
Admission policies enforce approved-image requirements, while continuous monitoring detects unexpected workloads and post-deployment changes.
Running container inventories help identify rogue images, outdated artifacts, and discrepancies between approved and deployed versions.
Fidelis Halo Container Secure strengthens container security through image assessment, rogue-container detection, runtime monitoring, and compliance enforcement.
Container security scanning cannot, on its own, tell you which images are authorized to run in production. A scanner reports known vulnerabilities in the image it inspects. It does not know whether that image was approved, whether it came from a trusted registry, or whether it is the same artifact your pipeline released last week. Those answers come from digest-based identification, signature and provenance checks, deployment policy, and a live inventory of what is running.
Four questions are easy to merge into one, and the gap between them is where unauthorized images live.
What Does Container Security Scanning Actually Tell You?
Image scanners unpack an image, inventory its operating system packages and language dependencies, and match them against vulnerability databases. Artifact Analysis, for example, draws on sources such as the National Vulnerability Database and distribution advisories, and it detects only packages that are publicly monitored. A clean result means no known issue in the data the scanner had, for the packages it could see, at the moment it ran.
That framing explains three limits.
Scanners work with incomplete data: Kubernetes’ commentary on the NSA/CISA hardening guidance describes a Go application on a distroless image that passes a scan because the scanner sees OS packages but not the Go version used to compile the binary. It also describes the opposite case, where a Debian package is flagged for a vulnerability the distribution has decided not to patch.
Results age: New vulnerabilities are disclosed after an image is built. Artifact Analysis keeps updating findings for images pushed or pulled in the last 30 days, after which results go stale. An image that passed in March can carry a critical finding by June without a single byte changing.
Results describe an image, not a cluster: A scan attaches to an image identifier in a registry or on a laptop. It says nothing about which images your clusters are running today.
Continuous posture monitoring
Automated CIS compliance checks
Secure cluster configurations
None of this makes scanning optional. The NSA and CISA list scanning containers and Pods for vulnerabilities or misconfigurations among their primary hardening actions. Scanning answers one question well. It was never designed to answer the other three.
How Do Unauthorized Images Reach Production?
“Unauthorized” means an image that violates your policy. It does not necessarily mean a malicious one. A developer’s hotfix built on a laptop is unauthorized if your process requires pipeline-built images. NIST SP 800-190 lists use of untrusted images as an image risk, and the usual routes are mundane:
A locally built image is pushed or deployed directly, skipping CI scans.
A workload pulls from a public or unapproved registry because the manifest names it.
An outdated or vulnerable base image is reused because nothing flags its age.
A tag is re-pointed, so the same manifest now resolves to different content.
Compromised credentials let someone push to a registry or modify a deployment.
A pipeline step that performs the security check is bypassed or removed.
Registry write access or Kubernetes RBAC is broader than the work requires, so many identities can introduce or change workloads.
NIST’s registry guidance is direct about the last two. Registries holding proprietary images should require authentication for any write access, so that only trusted entities can add images.
Why Does the Exact Image Digest Matter?
An image name with a tag is a convenience. The Kubernetes documentation explains that tags identify different versions of the same series of images, while a digest uniquely identifies a specific version, so Kubernetes runs the same code every time it starts a container from that name and digest. Google Cloud is blunt about the other side: tags are mutable references, and the image behind a tag can change.
Pull behavior makes this matter in practice. When you specify a tag other than latest and omit the pull policy, Kubernetes sets IfNotPresent, and the kubelet skips pulling an image that already exists on the node. If a tag is re-pointed, nodes holding the old image keep running it, and nodes that pull fresh get the new one. One Deployment can quietly run two different images under the same name.
Digests also align with how scanning works. Artifact Analysis scans once per digest, and changing tags does not trigger a new scan. The scan result belongs to the digest, so verifying the exact image running in production means verifying its digest.
A digest has limits. Docker notes that digest pinning verifies content integrity but does not by itself prove publisher identity. A digest tells you the content is what you asked for. It does not tell you who made it.
Signing, Provenance, and Admission Policy: What Does Each One Prove?
Each mechanism answers a different question, and each leaves something unanswered.
Image signing establishes who published an image and that it was not altered afterward. The ecosystem has moved toward OCI-native tools. Docker now points publishers to Sigstore/Cosign and Notation after retiring Docker Content Trust, and both store signatures alongside the image in a compliant registry. A signature says nothing about vulnerabilities. A signed image can ship vulnerable packages.
Provenance records how an artifact was produced. In SLSA, provenance is an attestation that a build platform produced a set of artifacts by running a defined build, which lets a consumer check that the artifact was built as expected. It ties an image to a pipeline. It does not say the pipeline was free of flaws or that the output is approved for a given environment.
Attestations and policy turn evidence into a decision. In Binary Authorization, an attestation is a record containing the registry path and digest of an image, signed with the signer’s private key. At deploy time, the enforcer checks the policy and blocks images that do not conform. Policies can also require build verification, meaning proof that a specific build system or CI pipeline produced the image.
Admission control is the enforcement point in Kubernetes. Admission controllers intercept requests to the API server after authentication and authorization and before the object is stored. A ValidatingAdmissionPolicy can, for example, disallow the latest tag, and it can block, audit, or warn on noncompliant requests. Docker’s guidance on signing makes the same point: signing is only half the story unless something enforces that only signed images are deployed, and it names Kyverno with Cosign and Ratify with Gatekeeper and Notation as examples.
Admission policy has two blind spots worth knowing. It acts when a create or modify request arrives, so it governs what enters the cluster from that point forward. And policies carry exceptions. Binary Authorization keeps a list of exempt images that are always allowed to deploy, which is sensible for system images and a quiet bypass if the list grows loosely.
Zero Trust principles apply to this chain directly. Least privilege limits which identities can push to a registry or deploy to production. Workload identity and verification mean a deployment is checked against policy each time, not trusted because it came from inside the network. Continuous monitoring covers what verification at admission cannot see. No single control carries the whole argument.
What Should Security Teams Monitor After Deployment?
Prevention reduces how many unauthorized images arrive. Monitoring finds the ones that do, and it should not be mistaken for prevention.
A useful production view includes:
A running container inventory showing image name, tag, digest, and registry source for every workload, compared against an approved list.
New workloads outside normal change patterns, such as a container appearing in a namespace that only ever receives pipeline deployments.
Changes to approved workloads, including a Deployment whose image reference changed without a matching release.
Outdated or vulnerable images still running, found by reassessing running workloads as new vulnerability data arrives.
Runtime exposure, such as privileged, writable, or interactive containers, which widen what a bad image can do.
Suspicious activity, including unexpected processes, file changes, and attempts to break out of the container.
Keep three ideas separate. Image scanning examines an artifact. Runtime protection examines behavior. Container isolation, the namespaces, cgroups, and privilege settings around a container, limits the damage a bad image can do without making that image authorized. Strong isolation around an unapproved image is still an unapproved image.
An Illustrative Scenario: Approved in CI, Different in Production
This scenario is illustrative. It is not a customer incident or a documented breach.
A team builds registry.example.com/payments/api:2.4.1 in CI. The scan is clean, the image is approved, and the manifest references the tag. Weeks later, a CI service account token leaks. Someone pushes a different image to the same tag. It might be an attacker’s, or it might be a well-meaning developer’s hotfix.
Nothing in the original scan is wrong, and nothing in it is relevant. It described the first digest. Because the manifest uses a tag and the default pull policy is IfNotPresent, existing nodes keep the old image while newly scheduled nodes pull the new one. The Deployment now runs two images.
Each control would change the outcome differently:
Registry controls: narrower write permissions, short-lived credentials, and tag protection where the registry supports it make the overwrite harder.
Deploy by digest: the manifest points at the approved digest, so a re-pointed tag has no effect.
Verification and policy: an admission policy that requires a digest and a signature from the CI identity rejects the new image at deployment.
Production inventory: a view of running containers shows two digests for one workload, which is the detectable symptom if everything else failed.
The response runs in a sensible order. Identify the digests in play. Compare them to the build record and attestations. Check registry audit logs for who pushed, from where, and with which credential. Review deployment history. Inspect processes and network connections in containers running the unexpected digest. Scan that image. Then rotate the credentials, redeploy the approved digest, and close the permission that allowed the push. Treat the unexpected image as unauthorized first and malicious only if the evidence says so.
Where Does Fidelis Container Secure Fit?
Fidelis CloudPassage Halo® Container Secure™ is a container security and compliance service for Docker, Kubernetes, and continuous-delivery pipeline infrastructure. Its strengths sit in assessment and visibility across the stack. Signing, provenance verification, and admission policy remain with your registry and orchestrator tooling, and Container Secure works alongside them.
Image assessment: Registry connectors inventory images and assess container images at rest for vulnerabilities, and images pushed to registries are scanned. Integration with CI tools can pass or fail builds automatically. Supported registries include Docker Private Registry, Amazon ECR, and jFrog Artifactory, with integrations for Jenkins and other CI/CD tools.
Running container inventory and rogue detection: Fidelis Halo® detects image launches, collects container metadata, and correlates workloads in production clusters with the images in the inventoried repositories. A workload with no match is flagged as rogue, meaning it came from an unknown image. The inventory also shows which containers are actually in use and whether they are based on the current repository image. Suspected rogue containers can be quarantined within seconds of detection.
Runtime configuration and host monitoring: Container Secure™ detects privileged, writable, and interactive containers. A 2 MB microagent assesses hosts for vulnerabilities and drift across the host OS, container runtime, and Kubernetes services. It can be deployed on Kubernetes worker nodes as a DaemonSet, while master nodes need a direct install. File integrity monitoring covers containers at rest and at runtime, and log monitoring and intrusion detection address Docker host and Kubernetes node intrusions.
Policies and workflow: Policies built on CIS benchmarks cover Kubernetes master and worker nodes, Docker, and the host operating system, with file integrity monitoring for drift. Alerts reach teams through tools such as Jira, Slack, and ServiceNow, and a bi-directional REST API supports further automation. Account-level monitoring of AWS and Azure environments covers IAM settings such as MFA and key rotation, which bears directly on the compromised-credential path described above.
A rogue flag is a statement about inventory. It says an image was not found among the images that have been assessed. Whether an image is approved remains an organizational decision, so the value comes from connecting registry assessment to your approved sources and treating a rogue flag as the start of an investigation.
Container Security Best Practices That Work Together
These measures reinforce each other, which is why the order matters.
Define and verify: Decide which registries are approved and keep an inventory of authorized images, because every later control needs that list to compare against. Build from minimal, maintained base images so scan results stay readable and the attack surface stays small. Reference images by digest in deployment manifests. Verify signatures and provenance so a digest is tied to a publisher and a pipeline.
Enforce: Express the approved list as admission policy, and review exemption lists on a schedule. Apply role-based access control to registries and deployment systems, and keep push and deploy rights narrow, so a stolen credential reaches less. Keep API keys and other sensitive data out of images and inject them at runtime. NIST lists embedded clear-text secrets as an image risk.
Observe and reassess: Scan at build, in the registry, and continuously afterward, because new vulnerabilities arrive after every scan. Prioritize findings by severity, exploitability, and deployment context, whether the vulnerable package is loaded, reachable, and exposed. That is how you reduce false positives without ignoring findings. Monitor running containers for unexpected images, changes, and suspicious activity.
Cloud-friendly Deployment
Hyper-scalable Workload Protection
Agentless Cloud Posture Management
Conclusion
Pick one production workload and answer four questions. Which digest is running? Who approved it? What evidence ties it to a specific build? What would alert you if it changed tomorrow? If any answer takes more than a few minutes to find, the gap described here is already open, and scanning alone will not close it. The work is connecting scan results to image identity, identity to approval, and approval to what your clusters are actually running.
Frequently Asked Questions
Can a scanner detect malware or exposed secrets in an image?
Some can, within limits. Artifact Analysis reports malicious packages from the OpenSSF Malicious Packages Repository as critical findings, and secret detection for API keys and service account keys is in public preview. These checks cover packages and files a scanner recognizes. They do not replace controls that keep credentials out of images.
Does admission control cover containers that are already running?
Admission controllers act on requests to create or modify objects, so they govern what enters from that point on. Some platforms add a periodic check. Binary Authorization’s continuous validation, for example, rechecks images behind running Pods for policy conformance. A dry-run mode logs violations without blocking, which helps test a policy before enforcing it.
What changed for teams still referencing gcr.io?
Container Registry stopped accepting writes on March 18, 2025, and Artifact Registry is the recommended replacement. gcr.io hostnames can be served from Artifact Registry repositories, so existing references can keep working once the transition is set up. Teams should confirm which repositories actually back their gcr.io references.
How stale can scan results get?
In Artifact Analysis, findings keep updating only for images pushed or pulled within 30 days. After that the results go stale, and pulling the image triggers a refresh that can take up to 24 hours. Rarely pulled images that still run in production deserve a separate reassessment schedule.
Who should own the approved-image list?
Ownership should sit outside the teams that push images, so one compromised or careless identity cannot both create and approve an artifact. Binary Authorization supports this with a multi-project setup that separates policy, attestors, and attestations. Whatever the tooling, the list needs a named owner and a change process.
The post Container Security Scanning: Can You Detect Unauthorized Images in Production? appeared first on Fidelis Security.
No Responses