devsecops-engine-tools 1.104.1__py3-none-any.whl → 1.104.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of devsecops-engine-tools might be problematic. Click here for more details.
- devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/defect_dojo/defect_dojo.py +17 -31
- devsecops_engine_tools/version.py +1 -1
- {devsecops_engine_tools-1.104.1.dist-info → devsecops_engine_tools-1.104.2.dist-info}/METADATA +1 -1
- {devsecops_engine_tools-1.104.1.dist-info → devsecops_engine_tools-1.104.2.dist-info}/RECORD +7 -7
- {devsecops_engine_tools-1.104.1.dist-info → devsecops_engine_tools-1.104.2.dist-info}/WHEEL +0 -0
- {devsecops_engine_tools-1.104.1.dist-info → devsecops_engine_tools-1.104.2.dist-info}/entry_points.txt +0 -0
- {devsecops_engine_tools-1.104.1.dist-info → devsecops_engine_tools-1.104.2.dist-info}/top_level.txt +0 -0
devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/defect_dojo/defect_dojo.py
CHANGED
|
@@ -304,14 +304,13 @@ class DefectDojoPlatform(VulnerabilityManagementGateway):
|
|
|
304
304
|
white_list=white_list,
|
|
305
305
|
)
|
|
306
306
|
|
|
307
|
-
|
|
307
|
+
return (
|
|
308
308
|
list(exclusions_risk_accepted)
|
|
309
309
|
+ list(exclusions_false_positive)
|
|
310
310
|
+ list(exclusions_out_of_scope)
|
|
311
311
|
+ list(exclusions_transfer_finding)
|
|
312
312
|
+ list(exclusions_white_list)
|
|
313
313
|
)
|
|
314
|
-
return result
|
|
315
314
|
|
|
316
315
|
except Exception as ex:
|
|
317
316
|
raise ExceptionFindingsExcepted(
|
|
@@ -463,8 +462,7 @@ class DefectDojoPlatform(VulnerabilityManagementGateway):
|
|
|
463
462
|
},
|
|
464
463
|
)
|
|
465
464
|
|
|
466
|
-
|
|
467
|
-
return result
|
|
465
|
+
return [entry.unique_id_from_tool for entry in exclusions_black_list]
|
|
468
466
|
|
|
469
467
|
except Exception as ex:
|
|
470
468
|
raise ExceptionVulnerabilityManagement(
|
|
@@ -672,7 +670,7 @@ class DefectDojoPlatform(VulnerabilityManagementGateway):
|
|
|
672
670
|
session_manager, service, max_retries, query_params
|
|
673
671
|
)
|
|
674
672
|
|
|
675
|
-
|
|
673
|
+
return map(
|
|
676
674
|
partial(
|
|
677
675
|
self._create_exclusion,
|
|
678
676
|
date_fn=date_fn,
|
|
@@ -682,7 +680,6 @@ class DefectDojoPlatform(VulnerabilityManagementGateway):
|
|
|
682
680
|
),
|
|
683
681
|
findings,
|
|
684
682
|
)
|
|
685
|
-
return result
|
|
686
683
|
|
|
687
684
|
def _get_findings(self, session_manager, service, max_retries, query_params):
|
|
688
685
|
def request_func():
|
|
@@ -690,8 +687,7 @@ class DefectDojoPlatform(VulnerabilityManagementGateway):
|
|
|
690
687
|
session=session_manager, service=service, **query_params
|
|
691
688
|
).results
|
|
692
689
|
|
|
693
|
-
|
|
694
|
-
return findings
|
|
690
|
+
return Utils().retries_requests(request_func, max_retries, retry_delay=5)
|
|
695
691
|
|
|
696
692
|
def _get_finding_exclusion(self, session_manager, max_retries, query_params):
|
|
697
693
|
def request_func():
|
|
@@ -699,33 +695,29 @@ class DefectDojoPlatform(VulnerabilityManagementGateway):
|
|
|
699
695
|
session=session_manager, **query_params
|
|
700
696
|
).results
|
|
701
697
|
|
|
702
|
-
|
|
703
|
-
return exclusions
|
|
698
|
+
return Utils().retries_requests(request_func, max_retries, retry_delay=5)
|
|
704
699
|
|
|
705
700
|
def _date_reason_based(self, finding, date_fn, reason, tool, **kwargs):
|
|
706
701
|
def get_vuln_id(finding, tool):
|
|
707
702
|
if tool == "engine_risk":
|
|
708
|
-
|
|
703
|
+
return (
|
|
709
704
|
finding.id[0]["vulnerability_id"]
|
|
710
705
|
if finding.id
|
|
711
706
|
else finding.vuln_id_from_tool
|
|
712
707
|
)
|
|
713
708
|
else:
|
|
714
|
-
|
|
709
|
+
return (
|
|
715
710
|
finding.vulnerability_ids[0]["vulnerability_id"]
|
|
716
711
|
if finding.vulnerability_ids
|
|
717
712
|
else finding.vuln_id_from_tool
|
|
718
713
|
)
|
|
719
|
-
return vuln_id
|
|
720
714
|
|
|
721
715
|
def get_dates_from_whitelist(vuln_id, white_list):
|
|
722
716
|
matching_finding = next(
|
|
723
717
|
filter(lambda x: x.unique_id_from_tool == vuln_id, white_list), None
|
|
724
718
|
)
|
|
725
719
|
if matching_finding:
|
|
726
|
-
|
|
727
|
-
expiration_date = date_fn(matching_finding.expiration_date)
|
|
728
|
-
return create_date, expiration_date
|
|
720
|
+
return date_fn(matching_finding.create_date), date_fn(matching_finding.expiration_date)
|
|
729
721
|
return date_fn(None), date_fn(None)
|
|
730
722
|
|
|
731
723
|
reason_to_dates = {
|
|
@@ -759,7 +751,7 @@ class DefectDojoPlatform(VulnerabilityManagementGateway):
|
|
|
759
751
|
create_date, expired_date = self._date_reason_based(
|
|
760
752
|
finding, date_fn, reason, tool, **kwargs
|
|
761
753
|
)
|
|
762
|
-
|
|
754
|
+
return Exclusions(
|
|
763
755
|
id=(
|
|
764
756
|
finding.vuln_id_from_tool
|
|
765
757
|
if finding.vuln_id_from_tool
|
|
@@ -775,7 +767,6 @@ class DefectDojoPlatform(VulnerabilityManagementGateway):
|
|
|
775
767
|
severity=finding.severity.lower(),
|
|
776
768
|
reason=reason,
|
|
777
769
|
)
|
|
778
|
-
return exclusion
|
|
779
770
|
|
|
780
771
|
def _create_report_exclusion(
|
|
781
772
|
self, finding, date_fn, tool, reason, host_dd, **kwargs
|
|
@@ -783,7 +774,7 @@ class DefectDojoPlatform(VulnerabilityManagementGateway):
|
|
|
783
774
|
create_date, expired_date = self._date_reason_based(
|
|
784
775
|
finding, date_fn, reason, tool, **kwargs
|
|
785
776
|
)
|
|
786
|
-
|
|
777
|
+
return Exclusions(
|
|
787
778
|
id=(
|
|
788
779
|
finding.vuln_id_from_tool
|
|
789
780
|
if finding.vuln_id_from_tool
|
|
@@ -799,10 +790,9 @@ class DefectDojoPlatform(VulnerabilityManagementGateway):
|
|
|
799
790
|
service=finding.service,
|
|
800
791
|
tags=finding.tags,
|
|
801
792
|
)
|
|
802
|
-
return exclusion
|
|
803
793
|
|
|
804
794
|
def _create_report(self, finding, host_dd):
|
|
805
|
-
|
|
795
|
+
return Report(
|
|
806
796
|
vm_id=str(finding.id),
|
|
807
797
|
vm_id_url=f"{host_dd}/finding/{finding.id}",
|
|
808
798
|
id=finding.vulnerability_ids,
|
|
@@ -834,33 +824,29 @@ class DefectDojoPlatform(VulnerabilityManagementGateway):
|
|
|
834
824
|
service=finding.service,
|
|
835
825
|
unique_id_from_tool=finding.unique_id_from_tool,
|
|
836
826
|
)
|
|
837
|
-
return report
|
|
838
827
|
|
|
839
828
|
def _format_date_to_dd_format(self, date_string):
|
|
840
|
-
|
|
829
|
+
return (
|
|
841
830
|
format_date(date_string.split("T")[0], "%Y-%m-%d", "%d%m%Y")
|
|
842
831
|
if date_string
|
|
843
832
|
else None
|
|
844
833
|
)
|
|
845
|
-
return result
|
|
846
834
|
|
|
847
835
|
def _get_where(self, finding, tool):
|
|
848
836
|
if tool == "engine_dependencies":
|
|
849
|
-
|
|
837
|
+
return (
|
|
850
838
|
finding.component_name.replace("_", ":")
|
|
851
839
|
+ ":"
|
|
852
840
|
+ finding.component_version
|
|
853
841
|
)
|
|
854
842
|
elif tool == "engine_container":
|
|
855
|
-
|
|
843
|
+
return finding.component_name + ":" + finding.component_version
|
|
856
844
|
elif tool == "engine_dast":
|
|
857
|
-
|
|
845
|
+
return finding.endpoints
|
|
858
846
|
elif tool == "engine_risk":
|
|
859
847
|
for tag in finding.tags:
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
result = finding.file_path
|
|
848
|
+
return self._get_where(finding, tag)
|
|
849
|
+
return finding.file_path
|
|
863
850
|
else:
|
|
864
|
-
|
|
865
851
|
return finding.file_path
|
|
866
852
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
version = '1.104.
|
|
1
|
+
version = '1.104.2'
|
{devsecops_engine_tools-1.104.1.dist-info → devsecops_engine_tools-1.104.2.dist-info}/RECORD
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
devsecops_engine_tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
devsecops_engine_tools/version.py,sha256=
|
|
2
|
+
devsecops_engine_tools/version.py,sha256=e6VwYGP4OnZbUNfscag_I6mr8JLOn9MkDEePi60X42Q,20
|
|
3
3
|
devsecops_engine_tools/engine_core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
devsecops_engine_tools/engine_core/src/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
devsecops_engine_tools/engine_core/src/applications/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -40,7 +40,7 @@ devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/azure/azur
|
|
|
40
40
|
devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/cdxgen/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
41
41
|
devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/cdxgen/cdxgen.py,sha256=t1CTeQG2ePBwUdeNinSYEi3vyMjufD0KuHUIxRZCsAU,4370
|
|
42
42
|
devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/defect_dojo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
43
|
-
devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/defect_dojo/defect_dojo.py,sha256=
|
|
43
|
+
devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/defect_dojo/defect_dojo.py,sha256=0Bupn7nE8xWXgLG2Fk7koZwxzR1Bj4Mifs2yDdxa63c,32973
|
|
44
44
|
devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/github/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
45
45
|
devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/github/github_actions.py,sha256=ed8ybPVNTAVS3UUlelnapMfpSoWJ-0X5aXQ54_wyiQo,4377
|
|
46
46
|
devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/printer_pretty_table/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -383,8 +383,8 @@ devsecops_engine_tools/engine_utilities/utils/name_conversion.py,sha256=ADJrRGax
|
|
|
383
383
|
devsecops_engine_tools/engine_utilities/utils/printers.py,sha256=amYAr9YQfYgR6jK9a2l26z3oovFPQ3FAKmhq6BKhEBA,623
|
|
384
384
|
devsecops_engine_tools/engine_utilities/utils/session_manager.py,sha256=Z0fdhB3r-dxU0nGSD9zW_B4r2Qol1rUnUCkhFR0U-HQ,487
|
|
385
385
|
devsecops_engine_tools/engine_utilities/utils/utils.py,sha256=HCjS900TBoNcHrC4LaiP-Kf9frVdtagF130qOUgnO2M,6757
|
|
386
|
-
devsecops_engine_tools-1.104.
|
|
387
|
-
devsecops_engine_tools-1.104.
|
|
388
|
-
devsecops_engine_tools-1.104.
|
|
389
|
-
devsecops_engine_tools-1.104.
|
|
390
|
-
devsecops_engine_tools-1.104.
|
|
386
|
+
devsecops_engine_tools-1.104.2.dist-info/METADATA,sha256=XkE4LGauh8XlOQXyDcVfKu4UP5_GTZEeeRtseLg8wmU,3233
|
|
387
|
+
devsecops_engine_tools-1.104.2.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
|
|
388
|
+
devsecops_engine_tools-1.104.2.dist-info/entry_points.txt,sha256=OWAww5aBsGeMv0kWhSgVNB0ySKKpYuJd4dly0ikFPkc,283
|
|
389
|
+
devsecops_engine_tools-1.104.2.dist-info/top_level.txt,sha256=ge6y0X_xBAU1aG3EMWFtl9djbVyg5BxuSp2r2Lg6EQU,23
|
|
390
|
+
devsecops_engine_tools-1.104.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
{devsecops_engine_tools-1.104.1.dist-info → devsecops_engine_tools-1.104.2.dist-info}/top_level.txt
RENAMED
|
File without changes
|