Class PyPACoreMetadataParser

java.lang.Object
org.owasp.dependencycheck.utils.PyPACoreMetadataParser

public final class PyPACoreMetadataParser extends Object
A utility class to handle Python Packaging Authority (PyPA) core metadata files. It was created based on the specification by PyPA for version 2.2
Author:
Hans Aikema
  • Method Details

    • getProperties

      public static Properties getProperties(File file) throws AnalysisException
      Loads all key/value pairs from PyPA metadata specifications¶.
      Parameters:
      file - The Wheel metadata of a Python package as a File
      Returns:
      The metadata properties read from the file
      Throws:
      AnalysisException - thrown if there is an analysis exception
    • getProperties

      public static Properties getProperties(BufferedReader utf8Reader) throws IOException
      Loads all key/value pairs from PyPA metadata specifications¶.
      Parameters:
      utf8Reader - The Wheel metadata of a Python package as a BufferedReader
      Returns:
      The metadata properties read from the utf8Reader
      Throws:
      IOException - thrown if there is error reading the properties