Scrivio Interview library
DesignAdvanced6 min read · updated 12 November 2026

Design how SBOMs should be generated, stored and used across your company so they help during the next zero-day.

Every release build generates an SBOM from the artifacts it actually resolved and packaged, signs it, and stores it next to the jar or image, while the deployment system records which version runs where. All SBOMs are indexed in a searchable system, so a query for a component and version range returns the affected services and environments within minutes. The SBOMs cover container image layers as well as Java dependencies, and the same index also answers license compliance questions and customer requests.

Why this question is asked

The value of an SBOM programme is decided on the worst day: a zero-day in a common library is announced, and leadership asks which services are exposed. If the answer takes days, the programme failed, however many SBOM files exist. Interviewers ask this design question to see whether we can design the whole chain, from build to query, rather than just turning on a plugin. In this answer, we will design generation, signing and storage, deployment tracking, the searchable index, image coverage and the other uses, and then walk through the zero-day query the design is built for.

1Design for the Question We Will Be Asked

The question on the day of a zero-day is precise: which services that are running right now, in which environments, contain component X in versions within range Y, and who owns them? Each part of the question needs data. Component and version come from SBOMs. Running right now comes from deployment records. Who owns them comes from the service catalogue. A design that lacks any of these three joins gives a partial answer, so we design the data flow first and choose tools second.

Step throughThe SBOM system, top to bottom
  1. Query and reportscomponent and version in, affected services and owners out
  2. Indexevery SBOM parsed and searchable, re-checked against new advisories
  3. Deployment recordsartifact version to environment, from the deploy pipeline
  4. StorageSBOM and signature stored next to each jar and image
  5. Release buildSBOM generated from resolved artifacts, plus an image SBOM

5 layers, from the top down. Step through them one at a time.

2Generate It From What Was Actually Built

The SBOM must describe the artifact, not our intentions. Declared dependencies in a pom are not enough, because conflict resolution, BOMs and exclusions change the real versions. So we generate the SBOM in the release build with the CycloneDX Maven or Gradle plugin, which reads the resolved runtime graph, and we do it in the same build that produces the artifact, never in a separate job that might resolve differently.

We generate it for every release build, not occasionally, and we make it part of the company's shared build configuration, a parent pom or a Gradle convention plugin, so that teams do not have to remember. A release build that fails to produce an SBOM should fail entirely. That rule is what keeps coverage at 100 percent rather than 70.

3Sign, Store and Link to Deployments

An SBOM we cannot trust is worth little, so we sign it. With Sigstore's cosign we can attach the SBOM to a container image as a signed attestation, which ties it cryptographically to the exact image digest. For jars, we publish the SBOM next to the artifact in the repository manager under the same coordinates, for example orders-4.2.1-cyclonedx.json, with a signature or checksum.

Java
# Release pipeline for one service
mvn -B verify # build + target/bom.json (CycloneDX)
docker build -t registry.acme/orders:4.2.1 .
syft registry.acme/orders:4.2.1 -o cyclonedx-json > image-bom.json # image layers too
# Sign and attach both SBOMs to the image digest
cosign attest --predicate target/bom.json --type cyclonedx registry.acme/orders@sha256:ab12...
cosign attest --predicate image-bom.json --type cyclonedx registry.acme/orders@sha256:ab12...
# Upload to the index and record the deployment
curl -X POST https://deptrack.acme/api/v1/bom -H "X-Api-Key: $DT_KEY" \
-F projectName=orders -F projectVersion=4.2.1 -F bom=@image-bom.json
# deploy pipeline later records: orders 4.2.1 -> prod-eu, prod-us

The last line matters as much as the rest. The deployment pipeline writes which artifact version is running in which environment, either into the index itself, for example as tags on the project version, or into a deployment database we can join with. Without it, we know what we built but not what is exposed.

4Index SBOMs So One Query Answers the Question

Thousands of SBOM files in a repository cannot be searched in minutes. So every SBOM is uploaded to an index that parses components and makes them searchable. OWASP Dependency-Track is a common open-source choice; commercial platforms do the same. The index also re-evaluates stored SBOMs against new advisories every day, which turns it into continuous monitoring: when a CVE is published, the index already knows which project versions contain the component.

We keep only relevant versions active, those deployed somewhere or still supported, so results are not flooded with builds from two years ago. Each project in the index carries its owner from the service catalogue, so the result of a query is a list of teams to contact, not just a list of artifacts.

5Include Container Layers, Not Only Java Dependencies

A Java SBOM lists the libraries the build tool knew about. A container image also holds the base operating system packages, the JDK, and anything copied in a Dockerfile, such as a monitoring agent with its own libraries. A zero-day in OpenSSL, glibc or a jar bundled with a vendor agent is invisible to the Java SBOM. So we also generate an image SBOM with Syft or Trivy and store both, or merge them into one.

Base images deserve their own attention: if 200 services share three base images, an SBOM for each base image version, plus a record of which services use which, lets the platform team fix an OS-level vulnerability by rebuilding three images and redeploying.

6The Zero-Day Query, and the Other Uses

With the design in place, the zero-day becomes a short sequence: the security team names the component and versions, the index returns matching project versions, the deployment records filter them to what is running, and the catalogue adds owners.

Step throughThe day a zero-day is announced
SecuritySBOM indexDeploy recordsTeams
search log4j-core versions 2.0 to 2.14.1
37 project versions contain it
which of these are running?
19 services in production, 6 in staging
notify 11 owning teams with exact versions
patched via BOM; new SBOMs confirm fix

6 messages in order. Play them, or step through them one at a time.

Minutes for the first answer, because the data was collected before the incident.

The same data serves other needs every day. Legal can check licenses across all shipped software, for example finding any AGPL component in a product we distribute. Customers who ask for an SBOM, as many large buyers and regulators now do, can be given the signed document for the exact version they run. Auditors can see that every release has one. These everyday uses are what keep the system maintained between incidents.

7Follow-up questions

How long should SBOMs be kept?

At least as long as the artifact can be running or supported, and usually longer for audits and customer agreements. A practical rule is to keep them as long as the artifact itself is retained in the repository, and to keep the index focused on versions that are deployed or supported so searches stay meaningful.

What if a team builds outside the standard pipeline?

Then it will not have SBOMs, and its services will show up as unknown during an incident. We make the standard pipeline the easy path, and make deployment to production require a signed SBOM attestation, for example through an admission policy in Kubernetes that rejects images without one. That turns coverage from a request into a guarantee.

Why sign the SBOM at all?

Because during an incident we rely on it to decide what is safe. If anyone could edit an SBOM in the repository, an attacker or a mistake could hide a vulnerable component. A signature created by the build system, tied to the image digest, shows that this SBOM was produced for this exact artifact by our pipeline.

8Conclusion

In this answer, we designed the SBOM system around the question asked on the day of a zero-day. Release builds generate SBOMs from the resolved artifacts and from the container image, sign them and store them next to the artifact, the deployment pipeline records what runs where, and an index such as Dependency-Track makes everything searchable and re-checks it daily. The result is an answer in minutes, and the same data serves license compliance, customer requests and audits.

What to say in the interviewAbout 80 seconds aloud

Open with

I would design it backwards from the question we get during a zero-day: which running services contain this component in these versions, and who owns them. First, every release build generates the SBOM from the resolved artifacts, using the CycloneDX plugin in the shared parent pom or Gradle convention plugin, and the build fails if it cannot.

Then, if they want more

Because Java SBOMs miss the OS packages, JDK and anything added in the Dockerfile, I would also generate an image SBOM with Syft or Trivy. Second, both are signed, for example as cosign attestations tied to the image digest, and stored next to the artifact.

Third, the deployment pipeline records which version runs in which environment, and the service catalogue gives the owner. Fourth, all SBOMs go into a searchable index such as Dependency-Track, which also re-checks them against new advisories every day. Then on the day of a zero-day, one query plus the deployment join gives affected production services and owners within minutes.

I would enforce coverage by refusing to deploy images without a signed SBOM, and I would use the same data for license compliance and customer SBOM requests, which keeps the system maintained between incidents.

About this answer

Last updated
12 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "Design how SBOMs should be generated, stored and used across your company so they help...": https://scrivio-interview-library.netlify.app/java/dependency-and-supply-chain/da79b84bb4/