Add quick validation test for directed graph
@@ -327,6 +327,19 @@ public class VulnerabilityCacheProcessorPlugin extends Plugin {
var internalCallables = kbDao.getPackageInternalCallableIDs(revision.product().toString(), revision.version.toString());
logger.info("Internal Callables: " + internalCallables.size());
+ logger.info("Quick graph validation...");
+ var a = 0;
+ for (var vuln : vulnerabilities.keySet()) {
+ if (graph.containsVertex(vuln)) a++;
+ }
+ logger.info("Graph contains vulnerable callables: " + a + "/" + vulnerabilities.keySet().size());
+ var b = 0;
+ for (var vuln : internalCallables) {
+ if (graph.containsVertex(vuln)) b++;
+ }
+ logger.info("Graph contains internal callable: " + b + "/" + internalCallables.size());
+
+
// Find all paths between any internal node and any vulnerable node in the graph
var vulnerablePaths = new ArrayList<List<Long>>();
for (var internal : internalCallables) {
