Class VulnerabilitiesRepository


  • public class VulnerabilitiesRepository
    extends java.lang.Object
    Class that hold the definition of all the libraries.
    • Field Detail

      • jsLibrares

        protected java.util.List<JsLibrary> jsLibrares
    • Constructor Detail

      • VulnerabilitiesRepository

        public VulnerabilitiesRepository()
    • Method Detail

      • addLibrary

        public void addLibrary​(JsLibrary lib)
      • findByUri

        public java.util.List<JsLibraryResult> findByUri​(java.lang.String uri)
        This search mode will identify the vulnerable library base on the full uri.
        Parameters:
        uri - URI taken from a HTTP request
        Returns:
        The list of vulnerable libraries found
      • findByFilename

        public java.util.List<JsLibraryResult> findByFilename​(java.lang.String filename)
        This search mode will identify the library by there filename. (official distribution filename)
        Parameters:
        filename - Filename taken from an URI
        Returns:
        The list of vulnerable libraries found
      • findByFileContent

        public java.util.List<JsLibraryResult> findByFileContent​(java.lang.String scriptContent)
        This search mode will look for literal string specific to the vulnerable libraries.
        Parameters:
        scriptContent - Complete content of the script
        Returns:
        The list of vulnerable libraries found
      • findByHash

        public java.util.List<JsLibraryResult> findByHash​(java.lang.String hash)
        Parameters:
        hash - Hash of the file to search
        Returns:
        The list of vulnerable libraries found
      • findByFunction

        public java.util.List<JsLibraryResult> findByFunction​(java.lang.String scriptContent)
        This search mode will load the script in a sandbox and look for the presence of specific function. NOT IMPLEMENTED
        Parameters:
        scriptContent - Complete content of the script
        Returns:
        The list of vulnerable libraries found