Join our Newsletter — 33% off our NHI Course
Home› FAQ› Cyber Security› How do I verify a containerised Ruby app…
Cyber Security

How do I verify a containerised Ruby app is actually patched?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated November 25, 2026 Domain: Cyber Security

Verify the running container, not just the source tree, by checking the installed Ruby version, bundled gems, native extensions, and image digest against the fixed release. Rebuild the image from a clean base, compare package manifests, and scan the deployed layer for stale libraries or overridden binaries that could leave the service exposed.

What to verify in the running container, not just the codebase

The practical test is whether the deployed image still contains the fixed Ruby runtime and the updated dependencies you expect. A clean source tree is not enough if the container was built earlier, cached from an old base layer, or patched locally in a way that never made it into the image you actually run. Verify the runtime from inside the container and compare it with the release you intend to be serving.

Start with the Ruby interpreter itself, then check Bundler output, native extensions, and any package manager state that could reintroduce old libraries. If the app ships compiled gems or OS packages, a stale shared object or overridden binary can leave the service exposed even when the application files look current.

Image provenance matters as much as version strings. Confirm that the deployed container digest matches the rebuilt image digest, because tag names can move while the underlying image stays unchanged. If the digest does not match, treat the container as unverified until you can explain why the running artifact differs from the rebuilt one.

How to confirm patching survived the build and deployment path

Rebuild from a clean base and compare the resulting package manifest, gem set, and native extension inventory against what is running in production. That comparison tells you whether the patch actually made it into the image layers, whether a cached layer preserved an older dependency, and whether deployment tooling substituted a different artifact than the one you validated.

For containerised Ruby apps, the most useful evidence is layered: the Ruby version, the bundle snapshot, the installed system packages, and the final image digest should all line up. If one of those signals diverges, the container may still be functionally patched in parts of the stack, but it is not yet trustworthy as a fully remediated runtime.

When the deployment uses multiple replicas or rolling updates, verify more than one instance. A partial rollout can leave older containers serving traffic beside newer ones, which is especially easy to miss if you only inspect the image tag or the latest CI build result.

What to do when the container still looks old

If the runtime still shows the vulnerable Ruby version or stale libraries, rebuild without cache, pull the base image again, and redeploy from the rebuilt artifact rather than trying to hand-edit the live container. The goal is to prove the fix exists in the artifact lifecycle, not to patch around it in a running instance that may be replaced at any moment.

It is also worth scanning for overridden binaries, bind mounts, and custom startup hooks that can shadow the patched files. In container environments, a package update inside the image is not enough if the runtime path resolves to a different library or executable at launch.

For exposure questions, a good external reference is CISA Known Exploited Vulnerabilities Catalog, which helps you prioritize fixes when a flaw is confirmed to be actively exploited. The NIST National Vulnerability Database is useful for checking the vulnerability record and associated product context, while NIST SP 800-190 Container Security is the better reference for image, registry, and runtime verification practices.

Risk and Threat Considerations

Container patching failures often persist because the build artifact, not the source tree, is what attackers can reach. If the image still includes an old Ruby runtime, vulnerable gem, or stale native extension, the service may remain exploitable even after developers believe they have “patched” the app.

Failure mechanism: A rebuilt container is not promoted, an older cached layer is reused, or a runtime override causes the container to execute an unpatched binary or library despite updated source files.

Impact: The service can remain exposed to the original vulnerability, and in a shared deployment model the same stale image can be replicated across multiple pods or hosts before the gap is noticed.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

NIST SP 800-53 Rev 5 and CIS Controls v8 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
NIST SP 800-53 Rev 5CM-2 — Baseline ConfigurationContainer patch verification depends on knowing the approved runtime baseline.
CM-6 — Configuration SettingsNative extensions and overridden binaries are configuration drift risks in the container.
SI-2 — Flaw RemediationThe question is about confirming that a software flaw has been remediated in the deployed container.
Recommendation — Compare the running image to an approved secure baseline before declaring it patched. Verify runtime settings and file paths to ensure the patched components are actually in use. Validate that the fixed release is deployed and replace any image still carrying the vulnerable components.
CIS Controls v8CIS-4 — Secure Configuration of Enterprise Assets and SoftwareContainer images and runtime packages need secure configuration verification after patching.
Recommendation — Audit the deployed container configuration against the rebuilt image before returning it to service.

Practitioner Guidance

What to verify: Check the running container’s Ruby version, gem set, native extensions, and image digest from inside the deployed environment, then compare them with the rebuilt artifact. If the digest does not match, treat the deployment as unverified regardless of what the source tree says.

Decision rule: If the fixed version is present in source control but not in the running container, trust the runtime evidence over the repository state and rebuild from a clean base before accepting the patch as complete.

Practitioner takeaway: For containerised apps, patch verification is an artifact integrity problem as much as a version-check problem, so the only reliable answer is the running image and what it actually contains.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on November 25, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org