<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/sbom-vs-reachability-in-a-custom-spark-image-gzftgldna" -->

---
title: SBOM vs. Reachability in a Custom Spark Image | daily.dev
description: Custom Spark images accumulate dependencies (Avro, Delta Lake, Iceberg, S3 connectors) that expand the attack surface even when a given job never uses them....
canonical: https://daily.dev/posts/sbom-vs-reachability-in-a-custom-spark-image-gzftgldna
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: SBOM vs. Reachability in a Custom Spark Image | daily.dev
og:description: Custom Spark images accumulate dependencies (Avro, Delta Lake, Iceberg, S3 connectors) that expand the attack surface even when a given job never uses them....
og:url: https://daily.dev/posts/sbom-vs-reachability-in-a-custom-spark-image-gzftgldna
og:image: https://api.daily.dev/og/posts/gzFtGLdNA.png
og:image:alt: SBOM vs. Reachability in a Custom Spark Image
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# SBOM vs. Reachability in a Custom Spark Image

**[Medium](https://daily.dev/sources/medium_js)** · 11 min read · 0 upvotes · 0 comments

## Summary

Custom Spark images accumulate dependencies (Avro, Delta Lake, Iceberg, S3 connectors) that expand the attack surface even when a given job never uses them. Scanners like Trivy produce an SBOM-style CVE list by statically matching jar metadata and shaded class signatures against vulnerability databases, but presence in the image doesn't mean the vulnerable code ever executes. JVM class-load logging on driver and executors can trace which jars actually get loaded during representative workloads (a no-I/O pi job, a Parquet read/write round-trip, and a shuffle-heavy job), revealing whether flagged CVEs are reachable in practice. The piece distinguishes Gradle's build-time classpath resolution (deterministic, statically checkable) from Spark's runtime jars folder (lazy classloading, only observable by running code), and argues reachability should sharpen triage priority without replacing the exhaustive SBOM, since 'not reachable' is a snapshot tied to tested workloads, not a permanent guarantee.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://medium.com/@parikshit.p2002/apache-spark-sbom-vs-reachability-in-a-custom-spark-image-a276d0a49d2a>

## Questions this post answers

### How can I tell if a CVE flagged by Trivy in my Spark image's jars is actually reachable at runtime?

Enable JVM class-load logging on both the Spark driver and executors using standard JVM flags, then run representative workloads (a no-I/O job, a Parquet read/write round-trip, and a shuffle-heavy job) while capturing the logs. Search the logs for the package name tied to the flagged CVE; if no matching lines appear across all workloads, the vulnerable code never got loaded for those runs, meaning it's not reachable for that usage pattern.

_Teams triaging Spark CVE backlogs can find similar reachability techniques and security workflows on daily.dev._

### Why does a vulnerable dependency in a Gradle build.gradle file sometimes never actually get loaded?

Gradle's dependency resolution collapses conflicting versions of the same library down to one, typically the highest version or an explicitly forced one, so the vulnerable jar never lands in the final classpath. Alternatively, if it does end up present, the JVM classloader resolves classes in classpath order and uses whichever class it finds first, silently ignoring duplicates found later, so the vulnerable class can exist on disk but never load.

_Developers debugging classpath conflicts can track Gradle and JVM dependency-resolution nuances via daily.dev._

### Why can't I rely only on class-load tracing to declare a CVE safe to ignore in a custom Spark image?

Class-load tracing only proves something for the specific workloads actually run, while an SBOM is a complete static inventory that can't miss a component the way a runtime trace can miss an untested code path. A finding marked not reachable today can become reachable tomorrow if a downstream job later exercises a config flag, error branch, or data format none of the test workloads touched, with no change to the CVE itself.

_Anyone weighing static inventories against runtime evidence for vulnerability triage can follow related security practices on daily.dev._

## Similar posts on daily.dev

- [SBOM Generation for Container Workflows](https://daily.dev/posts/sbom-generation-for-container-workflows-nctydjhq9) · Docker · 4 upvotes · 0 comments
- [Rethinking Post-Deployment Vulnerability Detection](https://daily.dev/posts/rethinking-post-deployment-vulnerability-detection-u1tfs0ejg) · OpenSSF · 0 upvotes · 0 comments
- [How the contextual SBOM pattern improves vulnerability management](https://daily.dev/posts/how-the-contextual-sbom-pattern-improves-vulnerability-management-i2kykn8ab) · Red Hat Developer · 0 upvotes · 0 comments
- [Reduce supply chain risk with SBOM-based dependency scanning](https://daily.dev/posts/reduce-supply-chain-risk-with-sbom-based-dependency-scanning-8wz8grafu) · GitLab · 3 upvotes · 0 comments
- [Insignary Closes SBOM Accuracy Gap With Binary-Level Clarity for Regulatory Risk](https://daily.dev/posts/insignary-closes-sbom-accuracy-gap-with-binary-level-clarity-for-regulatory-risk-m1l0zmbwz) · Latest Hacking News · 0 upvotes · 0 comments

---

Tags: [#security](https://daily.dev/tags/security), [#java](https://daily.dev/tags/java), [#apache-spark](https://daily.dev/tags/apache-spark), [#sbom](https://daily.dev/tags/sbom)

[View this post on daily.dev](https://daily.dev/posts/sbom-vs-reachability-in-a-custom-spark-image-gzftgldna)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"SBOM vs. Reachability in a Custom Spark Image","url":"https://daily.dev/posts/sbom-vs-reachability-in-a-custom-spark-image-gzftgldna","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/sbom-vs-reachability-in-a-custom-spark-image-gzftgldna"},"datePublished":"2026-09-11T22:12:08.747Z","dateModified":"2026-09-11T22:16:29.874Z","description":"Custom Spark images accumulate dependencies (Avro, Delta Lake, Iceberg, S3 connectors) that expand the attack surface even when a given job never uses them....","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/11acab275dbe00a4de5a29f30cadac53?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/11acab275dbe00a4de5a29f30cadac53?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Medium","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Medium","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/medium","url":"https://daily.dev/sources/medium_js"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/sbom-vs-reachability-in-a-custom-spark-image-gzftgldna","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"security,java,apache-spark,sbom","timeRequired":"PT11M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Medium","item":"https://daily.dev/sources/medium_js"},{"@type":"ListItem","position":3,"name":"SBOM vs. Reachability in a Custom Spark Image"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/sbom-vs-reachability-in-a-custom-spark-image-gzftgldna#faq","mainEntity":[{"@type":"Question","name":"How can I tell if a CVE flagged by Trivy in my Spark image's jars is actually reachable at runtime?","acceptedAnswer":{"@type":"Answer","text":"Enable JVM class-load logging on both the Spark driver and executors using standard JVM flags, then run representative workloads (a no-I/O job, a Parquet read/write round-trip, and a shuffle-heavy job) while capturing the logs. Search the logs for the package name tied to the flagged CVE; if no matching lines appear across all workloads, the vulnerable code never got loaded for those runs, meaning it's not reachable for that usage pattern. Teams triaging Spark CVE backlogs can find similar reachability techniques and security workflows on daily.dev."}},{"@type":"Question","name":"Why does a vulnerable dependency in a Gradle build.gradle file sometimes never actually get loaded?","acceptedAnswer":{"@type":"Answer","text":"Gradle's dependency resolution collapses conflicting versions of the same library down to one, typically the highest version or an explicitly forced one, so the vulnerable jar never lands in the final classpath. Alternatively, if it does end up present, the JVM classloader resolves classes in classpath order and uses whichever class it finds first, silently ignoring duplicates found later, so the vulnerable class can exist on disk but never load. Developers debugging classpath conflicts can track Gradle and JVM dependency-resolution nuances via daily.dev."}},{"@type":"Question","name":"Why can't I rely only on class-load tracing to declare a CVE safe to ignore in a custom Spark image?","acceptedAnswer":{"@type":"Answer","text":"Class-load tracing only proves something for the specific workloads actually run, while an SBOM is a complete static inventory that can't miss a component the way a runtime trace can miss an untested code path. A finding marked not reachable today can become reachable tomorrow if a downstream job later exercises a config flag, error branch, or data format none of the test workloads touched, with no change to the CVE itself. Anyone weighing static inventories against runtime evidence for vulnerability triage can follow related security practices on daily.dev."}}]}
```

