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

You want to fail the build on high-severity vulnerabilities in a container image.

BeginnerScenarioBuilds, Artifacts, Nexus, SonarQube and Testing
Answer

Situation read → Image scanning gate.

What I'd do →

trivy image --severity HIGH,CRITICAL --ignore-unfixed --exit-code 1 app:$TAG

Add a .trivyignore with expiry-dated, reviewed exceptions.

Why → --ignore-unfixed avoids blocking on issues with no available fix, and the exit code fails the step.

Interview tip → Exceptions need an owner and an expiry.

All CI/CD questions Roadmap: CI/CD fundamentals

More on Builds, Artifacts, Nexus, SonarQube and Testing