Define your vulnerability threshold levels.
e.g. if you define critical vulnerability threshold as 10 then your build will fail if more than 10 critical vulnerabilities found in the scan.