Red HatVivek Koul, Shailendra Kumar SinghTutorial
Automate Spring 5.3.x CVE remediation with Lightwell
Summary
Spring Framework 5.3.x reached end of open source support on August 31, 2024, and CVE-2025-41249 affects both 5.3.18 and the final 5.3.39 release, leaving no free version to upgrade to. Moving to Spring 6 requires migrating from Java 8 to Java 17 and from the javax namespace to jakarta, a funded project for most teams. The pipeline uses a vulnerability-policy-gate task to evaluate dependency scan results and, when enabled, patches the pom.xml to replace the vulnerable spring-core artifact with a binary-compatible remediated build from Red Hat Lightwell. The pipeline also signs the resulting image with keyless signing via Red Hat Trusted Artifact Signer, pushes an SBOM into Red Hat Trusted Profile Analyzer, and performs a final image check with Red Hat Advanced Cluster Security. Event-Driven Ansible automates the entire response by listening for policy violations from Red Hat Advanced Cluster Security and triggering the remediation workflow without human intervention.
Context
Spring Framework 5.3.x reached end of open source support on August 31, 2024, with 5.3.39 as the final free release. CVE-2025-41249 affects both 5.3.18 and 5.3.39, so no free version fixes it. Moving to Spring 6 requires upgrading from Java 8 to Java 17 and migrating from the javax namespace to jakarta, which is a funded project for most teams, not a routine bump. The pipeline described runs on Red Hat OpenShift Pipelines and uses Red Hat Lightwell, a service providing enterprise security backports for open source runtimes.
Approach / What changed
A pipeline that uses a dedicated vulnerability-policy-gate task to evaluate dependency scan results against a configuration parameter. When enabled, the pipeline patches the pom.xml to replace the vulnerable spring-core artifact with a binary-compatible remediated build (5.3.18.rhlw-00003) from Red Hat Lightwell, then continues the build. The pipeline also signs the resulting image with keyless signing via Red Hat Trusted Artifact Signer, pushes an SBOM into Red Hat Trusted Profile Analyzer, and performs a final image check with Red Hat Advanced Cluster Security. The entire response is automated by Event-Driven Ansible, which listens for policy violations from Red Hat Advanced Cluster Security and triggers the remediation workflow without human intervention.
Takeaways
Separate reporting from enforcement in your pipeline: one task reports all findings and always exits 0, and a dedicated policy gate task evaluates those results to decide whether to fail, pass, or patch.
When using Lightwell to replace a single artifact, you must decouple the Spring Boot BOM property from the artifact version in pom.xml, or Maven will fail trying to resolve a BOM that Lightwell doesn’t publish.
Keyless signing with Red Hat Trusted Artifact Signer eliminates long-lived signing keys: Fulcio issues a short-lived certificate bound to an OIDC identity, and the signature lands in the Rekor transparency log, so no key material sits in a vault to leak.
FAQ
How does the pipeline stop the build when a CVE is found?
The pipeline separates reporting from enforcement. The dependency-scan task reports findings and always exits 0. A dedicated vulnerability-policy-gate task evaluates those results against a configuration parameter to decide whether to fail, pass, or patch. When the gate fires, the pipeline halts and displays a message telling the developer exactly what to do next.
What pom.xml change is needed to use a Lightwell artifact?
You must decouple the Spring Boot BOM property from the artifact version. Override the BOM property to keep it pointing to Maven Central, and set a separate property for the artifact version that Lightwell swaps. If you override the single property, Maven goes hunting for a spring-framework-bom that Lightwell doesn't publish, and the build dies with a resolution error.
How does the pipeline prove the remediated artifact is trustworthy?
Red Hat Trusted Artifact Signer uses keyless signing with Fulcio issuing a short-lived certificate bound to an OIDC identity, and the signature lands in the Rekor transparency log. The key that signed the production image existed for the duration of the build and doesn't exist now. Verification asks for a person's email address, not a key fingerprint.
Source and freshness
- Source
- developers.redhat.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.