All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.danielsomerfield.cvecheck.FileVulnerabilities.groovy Maven / Gradle / Ivy

There is a newer version: 0.6.2-100
Show newest version
package com.danielsomerfield.cvecheck

import org.owasp.dependencycheck.Engine
import org.owasp.dependencycheck.dependency.Dependency
import org.owasp.dependencycheck.dependency.Vulnerability

class FileVulnerabilities {

  def static List getVulnerabilitiesForFiles(Engine engine, Collection files){
    files.each {
      engine.scan(it)
    }

    engine.analyzeDependencies()

    engine.getDependencies().collect { Dependency dependency ->
      dependency.getVulnerabilities()
    }.flatten()
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy