Skip to content

Commit c654252

Browse files
authored
Merge pull request #11187 from DefectDojo/bugfix
Release 2.40.0: Merge Bugfix into Dev
2 parents 2171d67 + 9273050 commit c654252

File tree

17 files changed

+527
-271
lines changed

17 files changed

+527
-271
lines changed

docs/assets/icons/logo.svg

Lines changed: 15 additions & 244 deletions
Loading

docs/config.dev.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ weight = 1
7777
pre = "<i class='fab fa-github'></i>"
7878
url = "https://github.com/DefectDojo/django-DefectDojo"
7979

80+
[[menu.main]]
81+
name = "Knowledge Base"
82+
weight = 50
83+
pre = "<i class='fas fa-atlas'></i>"
84+
url = "https://support.defectdojo.com"
85+
8086
[markup]
8187
[markup.goldmark]
8288
[markup.goldmark.renderer]

docs/config.master.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ weight = 1
7777
pre = "<i class='fab fa-github'></i>"
7878
url = "https://github.com/DefectDojo/django-DefectDojo"
7979

80+
[[menu.main]]
81+
name = "Knowledge Base"
82+
weight = 50
83+
pre = "<i class='fas fa-atlas'></i>"
84+
url = "https://support.defectdojo.com"
85+
8086
[markup]
8187
[markup.goldmark]
8288
[markup.goldmark.renderer]

docs/content/en/contributing/how-to-write-a-parser.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ All commands assume that you're located at the root of the django-DefectDojo clo
1616
- It's advised that you create a dedicated branch for your development, such as `git checkout -b parser-name`.
1717

1818
It is easiest to use the docker compose deployment as it has hot-reload capbility for uWSGI.
19-
Set up your environment to use the debug environment:
19+
Set up your environment to use the dev environment:
2020

21-
`$ docker/setEnv.sh debug`
21+
`$ docker/setEnv.sh dev`
2222

2323
Please have a look at [DOCKER.md](https://github.com/DefectDojo/django-DefectDojo/blob/master/readme-docs/DOCKER.md) for more details.
2424

@@ -294,12 +294,24 @@ This local command will launch the unit test for your new parser
294294
$ docker compose exec uwsgi bash -c 'python manage.py test unittests.tools.<your_unittest_py_file>.<main_class_name> -v2'
295295
{{< /highlight >}}
296296

297+
or like this:
298+
299+
{{< highlight bash >}}
300+
$ ./dc-unittest.sh --test-case unittests.tools.<your_unittest_py_file>.<main_class_name>
301+
{{< /highlight >}}
302+
297303
Example for the blackduck hub parser:
298304

299305
{{< highlight bash >}}
300306
$ docker compose exec uwsgi bash -c 'python manage.py test unittests.tools.test_blackduck_csv_parser.TestBlackduckHubParser -v2'
301307
{{< /highlight >}}
302308

309+
or like this:
310+
311+
{{< highlight bash >}}
312+
$ ./dc-unittest.sh --test-case unittests.tools.test_blackduck_csv_parser.TestBlackduckHubParser
313+
{{< /highlight >}}
314+
303315
{{% alert title="Information" color="info" %}}
304316
If you want to run all unit tests, simply run `$ docker compose exec uwsgi bash -c 'python manage.py test unittests -v2'`
305317
{{% /alert %}}

docs/content/en/getting_started/installation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ See instructions in [DOCKER.md](<https://github.com/DefectDojo/django-DefectDojo
1414

1515
### SaaS (Includes Support & Supports the Project)
1616

17-
[SaaS link](https://www.defectdojo.com/pricing)
17+
[SaaS link](https://defectdojo.com/platform)
1818

1919
### AWS AMI (Supports the Project)
2020

21-
[Marketplace link](https://aws.amazon.com/marketplace/pp/prodview-m2a25gr67xbzk), and complete [walkthrough](https://www.10security.com/defectdojo-aws-launch-guide)
21+
[Marketplace link](https://aws.amazon.com/marketplace/pp/prodview-m2a25gr67xbzk), and complete [walkthrough](https://defectdojo.com/defectdojo-aws-launch-guide)
2222

2323
---
2424
## **Options for the brave (not officially supported)**

dojo/api_v2/serializers.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2257,6 +2257,13 @@ def setup_common_context(self, data: dict) -> dict:
22572257
if context.get("scan_date")
22582258
else None
22592259
)
2260+
2261+
# engagement end date was not being used at all and so target_end would also turn into None
2262+
# in this case, do not want to change target_end unless engagement_end exists
2263+
eng_end_date = context.get("engagement_end_date", None)
2264+
if eng_end_date:
2265+
context["target_end"] = context.get("engagement_end_date")
2266+
22602267
return context
22612268

22622269

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
39cdd5dfe53499bfe201d3e5a0f55b20514272235e86db7d5238f2663b79f946
1+
6b9365d002880ae64ab54da905ede076db5a8661960f8f1e2793b7f4d25ff7e8

dojo/settings/settings.dist.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@
276276
DD_DELETE_PREVIEW=(bool, True),
277277
# List of acceptable file types that can be uploaded to a given object via arbitrary file upload
278278
DD_FILE_UPLOAD_TYPES=(list, [".txt", ".pdf", ".json", ".xml", ".csv", ".yml", ".png", ".jpeg",
279-
".sarif", ".xlsx", ".doc", ".html", ".js", ".nessus", ".zip"]),
279+
".sarif", ".xlsx", ".doc", ".html", ".js", ".nessus", ".zip", ".fpr"]),
280280
# Max file size for scan added via API in MB
281281
DD_SCAN_FILE_MAX_SIZE=(int, 100),
282282
# When disabled, existing user tokens will not be removed but it will not be
@@ -1742,6 +1742,7 @@ def saml2_attrib_map_format(dict):
17421742
"USN": "https://ubuntu.com/security/notices/", # e.g. https://ubuntu.com/security/notices/USN-6642-1
17431743
"DLA": "https://security-tracker.debian.org/tracker/", # e.g. https://security-tracker.debian.org/tracker/DLA-3917-1
17441744
"ELSA": "https://linux.oracle.com/errata/&&.html", # e.g. https://linux.oracle.com/errata/ELSA-2024-12714.html
1745+
"ELBA": "https://linux.oracle.com/errata/&&.html", # e.g. https://linux.oracle.com/errata/ELBA-2024-7457.html
17451746
"RXSA": "https://errata.rockylinux.org/", # e.g. https://errata.rockylinux.org/RXSA-2024:4928
17461747
}
17471748
# List of acceptable file types that can be uploaded to a given object via arbitrary file upload

dojo/tools/tenable/csv_format.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ def get_findings(self, filename: str, test: Test):
103103
mitigation = str(row.get("Solution", row.get("definition.solution", row.get("Steps to Remediate", "N/A"))))
104104
impact = row.get("Description", row.get("definition.description", "N/A"))
105105
references = row.get("See Also", row.get("definition.see_also", "N/A"))
106+
references += "\nTenable Plugin ID: " + row.get("Plugin", "N/A")
107+
references += "\nPlugin Publication Date: " + row.get("Plugin Publication Date", "N/A")
108+
references += "\nPlugin Modification Date: " + row.get("Plugin Modification Date", "N/A")
106109
# Determine if the current row has already been processed
107110
dupe_key = (
108111
severity

dojo/tools/trivy_operator/checks_handler.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,15 @@
1010

1111

1212
class TrivyChecksHandler:
13-
def handle_checks(self, service, checks, test):
13+
def handle_checks(self, labels, checks, test):
1414
findings = []
15+
resource_namespace = labels.get("trivy-operator.resource.namespace", "")
16+
resource_kind = labels.get("trivy-operator.resource.kind", "")
17+
resource_name = labels.get("trivy-operator.resource.name", "")
18+
container_name = labels.get("trivy-operator.container.name", "")
19+
service = f"{resource_namespace}/{resource_kind}/{resource_name}"
20+
if container_name != "":
21+
service = f"{service}/{container_name}"
1522
for check in checks:
1623
check_title = check.get("title")
1724
check_severity = TRIVY_SEVERITIES[check.get("severity")]
@@ -23,6 +30,10 @@ def handle_checks(self, service, checks, test):
2330
+ check_id.lower()
2431
)
2532
check_description = check.get("description", "")
33+
check_description += "\n**container.name:** " + container_name
34+
check_description += "\n**resource.kind:** " + resource_kind
35+
check_description += "\n**resource.name:** " + resource_name
36+
check_description += "\n**resource.namespace:** " + resource_namespace
2637
title = f"{check_id} - {check_title}"
2738
finding = Finding(
2839
test=test,
@@ -33,6 +44,7 @@ def handle_checks(self, service, checks, test):
3344
static_finding=True,
3445
dynamic_finding=False,
3546
service=service,
47+
tags=[resource_namespace],
3648
)
3749
if check_id:
3850
finding.unsaved_vulnerability_ids = [check_id]

0 commit comments

Comments
 (0)