A security policy demands every build records a list of its dependencies.
AdvancedScenarioBuilds, Artifacts, Nexus, SonarQube and Testing
Answer
Situation read → SBOM generation.
What I'd do →
- Generate an SBOM in CI:
syft packages dir:. -o cyclonedx-json > sbom.jsonor the CycloneDX Maven/npm plugins. - Attach it to the build as an artifact and attest it to the image with
cosign attest. - Scan the SBOM with Grype or Dependency-Track continuously.
Why → An SBOM lets you answer "are we affected?" within minutes when a new CVE drops.
Interview tip → Log4Shell is the usual motivating example.
More on Builds, Artifacts, Nexus, SonarQube and Testing
A Maven project resolves dependencies from Maven Central on every build and a left-pad style outage would stop all builds.BeginnerYou must publish snapshot and release artifacts without overwriting a released version.IntermediateEvery merge to main should produce a unique semantic version automatically.IntermediateAn npm build is non-reproducible: different versions install on different days.BeginnerThe SonarQube quality gate must block merging PRs that add new bugs, vulnerabilities or uncovered code.IntermediateCoverage shows 0% in SonarQube although tests run in CI.Intermediate