mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-25 18:41:44 +01:00
temporary travis debugging code
This commit is contained in:
@@ -179,41 +179,47 @@ public class RubyBundleAuditAnalyzerTest extends BaseDBTestCase {
|
|||||||
final Engine engine = new Engine();
|
final Engine engine = new Engine();
|
||||||
engine.scan(BaseTest.getResourceAsFile(this,
|
engine.scan(BaseTest.getResourceAsFile(this,
|
||||||
"ruby/vulnerable/gems/rails-4.1.15/"));
|
"ruby/vulnerable/gems/rails-4.1.15/"));
|
||||||
engine.analyzeDependencies();
|
|
||||||
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
engine.analyzeDependencies();
|
||||||
|
} catch (NullPointerException ex) {
|
||||||
|
LOGGER.error("NPE", ex);
|
||||||
|
throw ex;
|
||||||
|
}
|
||||||
List<Dependency> dependencies = engine.getDependencies();
|
List<Dependency> dependencies = engine.getDependencies();
|
||||||
LOGGER.info(dependencies.size() + " dependencies found.");
|
LOGGER.info(dependencies.size() + " dependencies found.");
|
||||||
Iterator<Dependency> dIterator = dependencies.iterator();
|
Iterator<Dependency> dIterator = dependencies.iterator();
|
||||||
while(dIterator.hasNext()) {
|
while (dIterator.hasNext()) {
|
||||||
Dependency dept = dIterator.next();
|
Dependency dept = dIterator.next();
|
||||||
LOGGER.info("dept path: " + dept.getActualFilePath());
|
LOGGER.info("dept path: " + dept.getActualFilePath());
|
||||||
|
|
||||||
Set<Identifier> identifiers = dept.getIdentifiers();
|
Set<Identifier> identifiers = dept.getIdentifiers();
|
||||||
Iterator<Identifier> idIterator = identifiers.iterator();
|
Iterator<Identifier> idIterator = identifiers.iterator();
|
||||||
while(idIterator.hasNext()) {
|
while (idIterator.hasNext()) {
|
||||||
Identifier id = idIterator.next();
|
Identifier id = idIterator.next();
|
||||||
LOGGER.info(" Identifier: " + id.getValue() + ", type=" + id.getType() + ", url=" + id.getUrl() + ", conf="+ id.getConfidence());
|
LOGGER.info(" Identifier: " + id.getValue() + ", type=" + id.getType() + ", url=" + id.getUrl() + ", conf=" + id.getConfidence());
|
||||||
}
|
}
|
||||||
|
|
||||||
Set<Evidence> prodEv = dept.getProductEvidence().getEvidence();
|
Set<Evidence> prodEv = dept.getProductEvidence().getEvidence();
|
||||||
Iterator<Evidence> it = prodEv.iterator();
|
Iterator<Evidence> it = prodEv.iterator();
|
||||||
while(it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
Evidence e = it.next();
|
Evidence e = it.next();
|
||||||
LOGGER.info(" prod: name=" + e.getName() + ", value=" + e.getValue() + ", source=" + e.getSource() + ", confidence=" + e.getConfidence());
|
LOGGER.info(" prod: name=" + e.getName() + ", value=" + e.getValue() + ", source=" + e.getSource() + ", confidence=" + e.getConfidence());
|
||||||
}
|
}
|
||||||
Set<Evidence> versionEv = dept.getVersionEvidence().getEvidence();
|
Set<Evidence> versionEv = dept.getVersionEvidence().getEvidence();
|
||||||
Iterator<Evidence> vIt = versionEv.iterator();
|
Iterator<Evidence> vIt = versionEv.iterator();
|
||||||
while(vIt.hasNext()) {
|
while (vIt.hasNext()) {
|
||||||
Evidence e = vIt.next();
|
Evidence e = vIt.next();
|
||||||
LOGGER.info(" version: name=" + e.getName() + ", value=" + e.getValue() + ", source=" + e.getSource() + ", confidence=" + e.getConfidence());
|
LOGGER.info(" version: name=" + e.getName() + ", value=" + e.getValue() + ", source=" + e.getSource() + ", confidence=" + e.getConfidence());
|
||||||
}
|
}
|
||||||
|
|
||||||
Set<Evidence> vendorEv = dept.getVendorEvidence().getEvidence();
|
Set<Evidence> vendorEv = dept.getVendorEvidence().getEvidence();
|
||||||
Iterator<Evidence> vendorIt = vendorEv.iterator();
|
Iterator<Evidence> vendorIt = vendorEv.iterator();
|
||||||
while(vendorIt.hasNext()) {
|
while (vendorIt.hasNext()) {
|
||||||
Evidence e = vendorIt.next();
|
Evidence e = vendorIt.next();
|
||||||
LOGGER.info(" vendor: name=" + e.getName() + ", value=" + e.getValue() + ", source=" + e.getSource() + ", confidence=" + e.getConfidence());
|
LOGGER.info(" vendor: name=" + e.getName() + ", value=" + e.getValue() + ", source=" + e.getSource() + ", confidence=" + e.getConfidence());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user