in dusty/reporters/html/presenter.py [0:0]
def project_meta(self):
""" Returns project meta """
result = list()
result.append(HTMLReportMeta(
name="Project name",
value=self.context.get_meta("project_name", "Unnamed Project")
))
if self.context.get_meta("project_description", None):
result.append(HTMLReportMeta(
name="Application name",
value=self.context.get_meta("project_description")
))
if self.context.get_meta("environment_name", None):
result.append(HTMLReportMeta(
name="Environment",
value=self.context.get_meta("environment_name")
))
if self.context.get_meta("testing_type", None):
result.append(HTMLReportMeta(
name="Testing type",
value=self.context.get_meta("testing_type")
))
if self.context.get_meta("dast_target", None):
result.append(HTMLReportMeta(
name="DAST target",
value=self.context.get_meta("dast_target")
))
if self.context.get_meta("sast_code", None):
result.append(HTMLReportMeta(
name="SAST code",
value=self.context.get_meta("sast_code")
))
if self.context.get_meta("scan_type", None):
result.append(HTMLReportMeta(
name="Scan type",
value=self.context.get_meta("scan_type")
))
if self.context.get_meta("build_id", None):
result.append(HTMLReportMeta(
name="Build ID",
value=self.context.get_meta("build_id")
))
if self.context.get_meta("dusty_version", None):
result.append(HTMLReportMeta(
name="Dusty version",
value=self.context.get_meta("dusty_version")
))
testing_time = self.context.performers["reporting"].get_module_meta(
"time_meta", "testing_run_time", None
)
if testing_time:
result.append(HTMLReportMeta(
name="Testing time",
value=f"{testing_time} second(s)"
))
result.append(HTMLReportMeta(
name="Total findings",
value=str(len(self.project_findings))
))
result.append(HTMLReportMeta(
name="Total false positives",
value=str(len(self.project_false_positive_findings))
))
result.append(HTMLReportMeta(
name="Total information findings",
value=str(len(self.project_information_findings))
))
result.append(HTMLReportMeta(
name="Total excluded findings",
value=str(len(self.project_excluded_findings))
))
result.append(HTMLReportMeta(
name="Total errors",
value=str(len(self.project_errors))
))
return result