dependency-check-ant/src/main/java/org/owasp/dependencycheck/taskdefs/Check.java
/**
     * Checks to see if a vulnerability has been identified with a CVSS score
     * that is above the threshold set in the configuration.
     *
     * @param dependencies the list of dependency objects
     * @throws BuildException thrown if a CVSS score is found that is higher
     * than the threshold set
     */
Checks to see if a vulnerability has been identified with a CVSS score
that is above the threshold set in the configuration.

@param dependencies the list of dependency objects
@throws BuildException thrown if a CVSS score is found that is higher
than the threshold set
Checks to see if a vulnerability has been identified with a CVSS score that is above the threshold set in the configuration . @param dependencies the list of dependency objects @throws BuildException thrown if a CVSS score is found that is higher than the threshold set
private void checkForFailure(List<Dependency> dependencies) throws BuildException {
        final StringBuilder ids = new StringBuilder();
        for (Dependency d : dependencies) {
            for (Vulnerability v : d.getVulnerabilities()) {
                if (v.getCvssScore() >= failBuildOnCVSS) {
                    if (ids.length() == 0) {
                        ids.append(v.getName());
                    } else {
                        ids.append(", ").append(v.getName());
                    }
                }
            }
        }
        if (ids.length() > 0) {
            final String msg = String.format("%n%nDependency-Check Failure:%n"
                    + "One or more dependencies were identified with vulnerabilities that have a CVSS score greater than '%.1f': %s%n"
                    + "See the dependency-check report for more details.%n%n", failBuildOnCVSS, ids.toString());
            throw new BuildException(msg);
        }
    }
private void checkForFailure ( List < Dependency > dependencies ) throws BuildException { final StringBuilder ids = new StringBuilder ( ) ; for ( Dependency d : dependencies ) { for ( Vulnerability v : d . getVulnerabilities ( ) ) { if ( v . getCvssScore ( ) >= failBuildOnCVSS ) { if ( ids . length ( ) == 0 ) { ids . append ( v . getName ( ) ) ; } else { ids . append ( ", " ) . append ( v . getName ( ) ) ; } } } } if ( ids . length ( ) > 0 ) { final String msg = String . format ( "%n%nDependency-Check Failure:%n" + "One or more dependencies were identified with vulnerabilities that have a CVSS score greater than '%.1f': %s%n" + "See the dependency-check report for more details.%n%n" , failBuildOnCVSS , ids . toString ( ) ) ; throw new BuildException ( msg ) ; } }
Checks to see if a vulnerability has been identified with a CVSS score
 that is above the threshold set in the configuration.
Checks to see if a vulnerability has been identified with a CVSS score that is above the threshold set in the configuration .