r/SpringBoot • u/BrotherGlad4572 • Jun 29 '26
Question Building SCA pipeline for Spring Boot — SBOM vs JAR scanning, what's the right approach?
Hey everyone,
I'm building a CI SCA pipeline for a Spring Boot application using Dependency-Check, Trivy, and OSV Scanner.
I've been going back and forth between two approaches:
- Generate a CycloneDX SBOM from Maven and feed it into all the tools
- Resolve dependencies into a local Maven cache and point the tools directly at the JARs or POM files
From my testing, scanning the Maven cache directly produces a huge amount of noise — false positives coming from other libraries' POM files declaring their own dependency versions, which Maven never actually uses at runtime.
The SBOM approach gives much cleaner results since it only contains the versions Maven actually resolved.
Is SBOM the industry standard for this kind of pipeline? Are there any downsides I'm missing?
1
u/smaratter Jun 29 '26
I have only used your first approach, but that was some time ago, so I couldn’t tell you if it’s the way to go nowadays.
If you go with option 2, would you have to manually filter out build and test dependencies? Or maybe you are interested in dependencies from all lifecycle stages, even though dependencies not present at runtime wouldn’t be directly exploitable? Maybe this is an odd question, but I’ve only used SBOMs for vulnerability analysis. Curious about your use case.
1
u/onated2 Jun 29 '26
I use cylone for bom as a precommit hook. But i use github/sonar for detecting vulnerabilities
1
u/edzorg Jun 29 '26
You get an off the shelf tool like prisma, black duck, trivy, whatever and just go with the most common path. Don't try to reinvent the wheel.