diff --git a/dojo/importers/base_importer.py b/dojo/importers/base_importer.py index cab58fd718b..53f55205c83 100644 --- a/dojo/importers/base_importer.py +++ b/dojo/importers/base_importer.py @@ -182,7 +182,7 @@ def parse_dynamic_test_type_findings_from_tests( tests: list[Test], ) -> list[Finding]: """ - currently we only support import one Test + Currently we only support import one Test so for parser that support multiple tests (like SARIF) we aggregate all the findings into one uniq test """ diff --git a/dojo/jira_link/views.py b/dojo/jira_link/views.py index 372b48fbfbe..bb4d4ce3146 100644 --- a/dojo/jira_link/views.py +++ b/dojo/jira_link/views.py @@ -50,7 +50,7 @@ def webhook_responser_handler( @require_POST def webhook(request, secret=None): """ - for examples of incoming json, see the unit tests for the webhook: + For examples of incoming json, see the unit tests for the webhook: https://github.com/DefectDojo/django-DefectDojo/blob/master/unittests/test_jira_webhook.py or the officials docs (which are not always clear): https://developer.atlassian.com/server/jira/platform/webhooks/ @@ -168,7 +168,7 @@ def webhook(request, secret=None): def check_for_and_create_comment(parsed_json): """ - example incoming requests from JIRA Server 8.14.0 + Example incoming requests from JIRA Server 8.14.0 { "timestamp":1610269967824, "webhookEvent":"comment_created", diff --git a/dojo/tools/scantist/parser.py b/dojo/tools/scantist/parser.py index 6b8721d3080..31db1d6e6d5 100644 --- a/dojo/tools/scantist/parser.py +++ b/dojo/tools/scantist/parser.py @@ -34,14 +34,14 @@ def get_findings(self, file, test): def get_items(self, tree, test): """ - tree list: input tree list of all the vulnerability findings + Tree list: input tree list of all the vulnerability findings test: : purpose: parses input rawto extract dojo """ def get_findings(vuln, test): """ - vuln : input vulnerable node + Vuln : input vulnerable node test : """ vulnerability_id = vuln.get("Public ID") diff --git a/dojo/tools/utils.py b/dojo/tools/utils.py index 19f9841ae50..23049469cec 100644 --- a/dojo/tools/utils.py +++ b/dojo/tools/utils.py @@ -6,7 +6,7 @@ def get_npm_cwe(item_node): """ - possible values: + Possible values: "cwe": null "cwe": ["CWE-173", "CWE-200","CWE-601"] (or []) "cwe": "CWE-1234" diff --git a/dojo/tools/wiz/parser.py b/dojo/tools/wiz/parser.py index 219cf715149..ea6ab50fbfe 100644 --- a/dojo/tools/wiz/parser.py +++ b/dojo/tools/wiz/parser.py @@ -156,7 +156,7 @@ def _construct_string_field(self, fields: dict[str, str], row: dict) -> str: def _parse_tags(self, tags: str) -> list[str]: """ - parse the Tag string dict, and convert to a list of strings. + Parse the Tag string dict, and convert to a list of strings. The format of the tags is is "{""key"":""value""}" format """ diff --git a/unittests/test_finding_model.py b/unittests/test_finding_model.py index a156301274a..2e2be817b7e 100644 --- a/unittests/test_finding_model.py +++ b/unittests/test_finding_model.py @@ -332,7 +332,7 @@ def run(self, result=None): def test_sla_expiration_date(self): """ - tests if the SLA expiration date and SLA days remaining are calculated correctly + Tests if the SLA expiration date and SLA days remaining are calculated correctly after a finding's severity is updated """ user, _ = User.objects.get_or_create(username="admin") @@ -357,7 +357,7 @@ def test_sla_expiration_date(self): def test_sla_expiration_date_after_finding_severity_updated(self): """ - tests if the SLA expiration date and SLA days remaining are calculated correctly + Tests if the SLA expiration date and SLA days remaining are calculated correctly after a finding's severity is updated """ user, _ = User.objects.get_or_create(username="admin") @@ -389,7 +389,7 @@ def test_sla_expiration_date_after_finding_severity_updated(self): def test_sla_expiration_date_after_product_updated(self): """ - tests if the SLA expiration date and SLA days remaining are calculated correctly + Tests if the SLA expiration date and SLA days remaining are calculated correctly after a product changed from one SLA configuration to another """ user, _ = User.objects.get_or_create(username="admin") @@ -428,7 +428,7 @@ def test_sla_expiration_date_after_product_updated(self): def test_sla_expiration_date_after_sla_configuration_updated(self): """ - tests if the SLA expiration date and SLA days remaining are calculated correctly + Tests if the SLA expiration date and SLA days remaining are calculated correctly after the SLA configuration on a product was updated to a different number of SLA days """ user, _ = User.objects.get_or_create(username="admin") @@ -461,7 +461,7 @@ def test_sla_expiration_date_after_sla_configuration_updated(self): def test_sla_expiration_date_after_sla_not_enforced(self): """ - tests if the SLA expiration date is none after the after the SLA configuration on a + Tests if the SLA expiration date is none after the after the SLA configuration on a product was updated to not enforce all SLA remediation days """ user, _ = User.objects.get_or_create(username="admin") diff --git a/unittests/tools/test_sonarqube_parser.py b/unittests/tools/test_sonarqube_parser.py index ef4912510b0..0b93fa4bb05 100644 --- a/unittests/tools/test_sonarqube_parser.py +++ b/unittests/tools/test_sonarqube_parser.py @@ -380,7 +380,7 @@ def test_detailed_parse_file_with_vuln_issue_3725(self): def test_detailed_parse_file_table_has_whitespace(self): """ - from version 3.1.1: sonarqube-report has new template with some change. + From version 3.1.1: sonarqube-report has new template with some change. see: https://github.com/soprasteria/sonar-report/commit/7dab559e7ecf9ed319345e9262a8b160bd3af94f Data table will have some whitespaces, parser should strip it before compare or use these properties. """