Package org.owasp.dependencycheck

Examples of org.owasp.dependencycheck.Engine.cleanup()


                    "Unable to connect to the dependency-check database; analysis has stopped");
            LOGGER.log(Level.FINE, "", ex);
        } finally {
            Settings.cleanup(true);
            if (engine != null) {
                engine.cleanup();
            }
        }
    }

    /**
 
View Full Code Here


        instance.analyze(dependency, engine);
        cveSize = cveSize > 1 ? cveSize - 2 : 0;
        cpeSize = cpeSize > 0 ? cpeSize - 1 : 0;
        assertTrue(dependency.getVulnerabilities().size() == cveSize);
        assertTrue(dependency.getIdentifiers().size() == cpeSize);
        engine.cleanup();
    }

    /**
     * Retrieves a specific dependency from the engine.
     *
 
View Full Code Here

        cveDB.close();

        ReportGenerator generator = new ReportGenerator("Test Report", engine.getDependencies(), engine.getAnalyzers(), dbProp);
        generator.generateReport(templateName, writeTo);

        engine.cleanup();

        InputStream xsdStream = ReportGenerator.class.getClassLoader().getResourceAsStream("schema/DependencyCheck.xsd");
        StreamSource xsdSource = new StreamSource(xsdStream);
        StreamSource xmlSource = new StreamSource(new File(writeTo));
        SchemaFactory sf = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
View Full Code Here

            int initial_size = engine.getDependencies().size();
            instance.analyze(dependency, engine);
            int ending_size = engine.getDependencies().size();

            engine.cleanup();

            assertTrue(initial_size < ending_size);

        } finally {
            instance.close();
View Full Code Here

            Engine engine = new Engine();

            int initial_size = engine.getDependencies().size();
            instance.analyze(dependency, engine);
            int ending_size = engine.getDependencies().size();
            engine.cleanup();

            assertTrue(initial_size < ending_size);

        } finally {
            instance.close();
View Full Code Here

            int initial_size = engine.getDependencies().size();
            //instance.analyze(dependency, engine);
            engine.scan(file);
            engine.analyzeDependencies();
            int ending_size = engine.getDependencies().size();
            engine.cleanup();
            assertTrue(initial_size < ending_size);

        } finally {
            instance.close();
        }
View Full Code Here

            int initial_size = engine.getDependencies().size();
            engine.scan(file);
            engine.analyzeDependencies();
            int ending_size = engine.getDependencies().size();
            engine.cleanup();
            assertTrue(initial_size < ending_size);

        } finally {
            instance.close();
        }
View Full Code Here

//            } catch (java.lang.UnsupportedClassVersionError ex) {
//                failed = true;
//            }
//            assertTrue(failed);
            int ending_size = engine.getDependencies().size();
            engine.cleanup();
            assertEquals(initial_size, ending_size);
        } finally {
            instance.close();
        }
    }
View Full Code Here

            LOGGER.log(Level.SEVERE, "Unable to connect to the dependency-check database; analysis has stopped");
            LOGGER.log(Level.FINE, "", ex);
        } finally {
            Settings.cleanup(true);
            if (engine != null) {
                engine.cleanup();
            }
        }
    }

    /**
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.