Interview Prep/CI/CD/Builds, Artifacts, Nexus, SonarQube and Testing

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 →

  1. Generate an SBOM in CI: syft packages dir:. -o cyclonedx-json > sbom.json or the CycloneDX Maven/npm plugins.
  2. Attach it to the build as an artifact and attest it to the image with cosign attest.
  3. 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.

All CI/CD questions Roadmap: CI/CD fundamentals

More on Builds, Artifacts, Nexus, SonarQube and Testing