MCPcopy Create free account
hub / github.com/aboutcode-org/vulnerablecode / _collect_pkgs

Method _collect_pkgs

vulnerabilities/importer.py:810–821  ·  view source on GitHub ↗

Helper method, used for loading the API. It expects data from OvalParser.get_data().

(parsed_oval_data: Mapping)

Source from the content-addressed store, hash-verified

808
809 @staticmethod
810 def _collect_pkgs(parsed_oval_data: Mapping) -> Set:
811 """
812 Helper method, used for loading the API. It expects data from
813 OvalParser.get_data().
814 """
815 all_pkgs = set()
816 for definition_data in parsed_oval_data:
817 for test_data in definition_data["test_data"]:
818 for package in test_data["package_list"]:
819 all_pkgs.add(package)
820
821 return all_pkgs
822
823 def _fetch(self) -> Tuple[Mapping, Iterable[ET.ElementTree]]:
824 """

Callers 1

test__collect_pkgsFunction · 0.80

Calls 1

addMethod · 0.80

Tested by 1

test__collect_pkgsFunction · 0.64