dependency-check-core/src/main/java/org/owasp/dependencycheck/Engine.java
/**
     * Runs the analyzers against all of the dependencies. Since the mutable
     * dependencies list is exposed via {@link #getDependencies()}, this method
     * iterates over a copy of the dependencies list. Thus, the potential for
     * {@link java.util.ConcurrentModificationException}s is avoided, and
     * analyzers may safely add or remove entries from the dependencies list.
     * <p>
     * Every effort is made to complete analysis on the dependencies. In some
     * cases an exception will occur with part of the analysis being performed
     * which may not affect the entire analysis. If an exception occurs it will
     * be included in the thrown exception collection.
     *
     * @throws ExceptionCollection a collections of any exceptions that occurred
     * during analysis
     */
Runs the analyzers against all of the dependencies. Since the mutable
dependencies list is exposed via  #getDependencies(), this method
iterates over a copy of the dependencies list. Thus, the potential for
java.util.ConcurrentModificationExceptions is avoided, and
analyzers may safely add or remove entries from the dependencies list.

Every effort is made to complete analysis on the dependencies. In some
cases an exception will occur with part of the analysis being performed
which may not affect the entire analysis. If an exception occurs it will
be included in the thrown exception collection.

@throws ExceptionCollection a collections of any exceptions that occurred
during analysis
Runs the analyzers against all of the dependencies . Since the mutable dependencies list is exposed via #getDependencies () this method iterates over a copy of the dependencies list . Thus the potential for java . util . ConcurrentModificationExceptions is avoided and analyzers may safely add or remove entries from the dependencies list . Every effort is made to complete analysis on the dependencies . In some cases an exception will occur with part of the analysis being performed which may not affect the entire analysis . If an exception occurs it will be included in the thrown exception collection . @throws ExceptionCollection a collections of any exceptions that occurred during analysis
public void analyzeDependencies() throws ExceptionCollection {
        final List<Throwable> exceptions = Collections.synchronizedList(new ArrayList<Throwable>());
        initializeAndUpdateDatabase(exceptions);
        try {
            ensureDataExists();
        } catch (NoDataException ex) {
            throwFatalExceptionCollection("Unable to continue dependency-check analysis.", ex, exceptions);
        }
        LOGGER.debug("\n----------------------------------------------------\nBEGIN ANALYSIS\n----------------------------------------------------");
        LOGGER.info("Analysis Started");
        final long analysisStart = System.currentTimeMillis();
        for (AnalysisPhase phase : mode.getPhases()) {
            final List<Analyzer> analyzerList = analyzers.get(phase);
            for (final Analyzer analyzer : analyzerList) {
                final long analyzerStart = System.currentTimeMillis();
                try {
                    initializeAnalyzer(analyzer);
                } catch (InitializationException ex) {
                    exceptions.add(ex);
                    continue;
                }
                if (analyzer.isEnabled()) {
                    executeAnalysisTasks(analyzer, exceptions);
                    final long analyzerDurationMillis = System.currentTimeMillis() - analyzerStart;
                    final long analyzerDurationSeconds = TimeUnit.MILLISECONDS.toSeconds(analyzerDurationMillis);
                    LOGGER.info("Finished {} ({} seconds)", analyzer.getName(), analyzerDurationSeconds);
                } else {
                    LOGGER.debug("Skipping {} (not enabled)", analyzer.getName());
                }
            }
        }
        for (AnalysisPhase phase : mode.getPhases()) {
            final List<Analyzer> analyzerList = analyzers.get(phase);
            for (Analyzer a : analyzerList) {
                closeAnalyzer(a);
            }
        }
        LOGGER.debug("\n----------------------------------------------------\nEND ANALYSIS\n----------------------------------------------------");
        final long analysisDurationSeconds = TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis() - analysisStart);
        LOGGER.info("Analysis Complete ({} seconds)", analysisDurationSeconds);
        if (exceptions.size() > 0) {
            throw new ExceptionCollection("One or more exceptions occurred during dependency-check analysis", exceptions);
        }
    }
public void analyzeDependencies ( ) throws ExceptionCollection { final List < Throwable > exceptions = Collections . synchronizedList ( new ArrayList < Throwable > ( ) ) ; initializeAndUpdateDatabase ( exceptions ) ; try { ensureDataExists ( ) ; } catch ( NoDataException ex ) { throwFatalExceptionCollection ( "Unable to continue dependency-check analysis." , ex , exceptions ) ; } LOGGER . debug ( "\n----------------------------------------------------\nBEGIN ANALYSIS\n----------------------------------------------------" ) ; LOGGER . info ( "Analysis Started" ) ; final long analysisStart = System . currentTimeMillis ( ) ; for ( AnalysisPhase phase : mode . getPhases ( ) ) { final List < Analyzer > analyzerList = analyzers . get ( phase ) ; for ( final Analyzer analyzer : analyzerList ) { final long analyzerStart = System . currentTimeMillis ( ) ; try { initializeAnalyzer ( analyzer ) ; } catch ( InitializationException ex ) { exceptions . add ( ex ) ; continue ; } if ( analyzer . isEnabled ( ) ) { executeAnalysisTasks ( analyzer , exceptions ) ; final long analyzerDurationMillis = System . currentTimeMillis ( ) - analyzerStart ; final long analyzerDurationSeconds = TimeUnit . MILLISECONDS . toSeconds ( analyzerDurationMillis ) ; LOGGER . info ( "Finished {} ({} seconds)" , analyzer . getName ( ) , analyzerDurationSeconds ) ; } else { LOGGER . debug ( "Skipping {} (not enabled)" , analyzer . getName ( ) ) ; } } } for ( AnalysisPhase phase : mode . getPhases ( ) ) { final List < Analyzer > analyzerList = analyzers . get ( phase ) ; for ( Analyzer a : analyzerList ) { closeAnalyzer ( a ) ; } } LOGGER . debug ( "\n----------------------------------------------------\nEND ANALYSIS\n----------------------------------------------------" ) ; final long analysisDurationSeconds = TimeUnit . MILLISECONDS . toSeconds ( System . currentTimeMillis ( ) - analysisStart ) ; LOGGER . info ( "Analysis Complete ({} seconds)" , analysisDurationSeconds ) ; if ( exceptions . size ( ) > 0 ) { throw new ExceptionCollection ( "One or more exceptions occurred during dependency-check analysis" , exceptions ) ; } }
Runs the analyzers against all of the dependencies.
Runs the analyzers against all of the dependencies .
//need to ensure that data exists // analysis phases