Untitled

 avatar
unknown
python
2 years ago
855 B
6
Indexable
if event['reportType'] == 'CFN-NAG':
            (normalized_severity,
             severity) = aggregated_severity.calculate_severity_cfn_nag(report)

            report_url = upload.upload_report("cfn_nag", report, created_at, source_repository, source_branch)
            if IMPORT_TO_SH == "True":
            # import to Security Hub
                securityhub.import_finding_to_sh(account_id, region, created_at, source_repository,
                                             source_branch, source_commitid, build_id, report_url,
                                             finding_id, generator_id, normalized_severity, severity,
                                             finding_type, FINDING_TITLE, finding_description, BEST_PRACTICES_CFN)

            return junit_report.generate_junit_report_from_cfn_nag(report).encode("unicode_escape")
Editor is loading...