@@ -120,6 +120,15 @@ def get_location(self):
120120 return self .__location .get_location ()
121121
122122
123+ class MavenDependencyCheckVulnerability (_Vulnerability ):
124+ def __init__ (self , raw_vulnerability : dict ):
125+ super ().__init__ (raw_vulnerability )
126+ self .__location = MavenDependencyCheckLocation (super ()._parse_required_property ('location' ))
127+
128+ def get_location (self ):
129+ return self .__location .get_location ()
130+
131+
123132class SecretsVulnerability (SastVulnerability ):
124133 def __init__ (self , raw_vulnerability : dict ):
125134 super ().__init__ (raw_vulnerability )
@@ -180,6 +189,16 @@ def get_location(self):
180189 return self .__image
181190
182191
192+ class MavenDependencyCheckLocation (Location ):
193+ def __init__ (self , raw_location : dict ):
194+ super ().__init__ (raw_location )
195+ self .__dependency = Dependency (super ()._parse_required_property ('dependency' ))
196+ self .__file = super ()._parse_required_property ('file' )
197+
198+ def get_location (self ):
199+ return str (self .__dependency )
200+
201+
183202# https://gitlab.com/gitlab-org/security-products/security-report-schemas/-/blob/master/src/security-report-format.json
184203class Dependency (_Base ):
185204 def __init__ (self , raw_dependency : dict ):
@@ -190,9 +209,15 @@ def __init__(self, raw_dependency: dict):
190209 self .__direct = super ()._parse_simple_property ('direct' )
191210 # dependency_path - TODO in future ?
192211
212+ def __repr__ (self ):
213+ return str (self .__package ) + " version: " + self .__version
214+
193215
194216# https://gitlab.com/gitlab-org/security-products/security-report-schemas/-/blob/master/src/security-report-format.json
195217class Package (_Base ):
196218 def __init__ (self , raw_package : dict ):
197219 super ().__init__ (raw_package )
198220 self .__name = super ()._parse_required_property ('name' )
221+
222+ def __repr__ (self ):
223+ return "Package: " + self .__name
0 commit comments