Skip to content

Commit 2d03441

Browse files
authored
Merge branch 'dev' into master-into-dev/2.48.2-2.49.0-dev
2 parents 6d72c33 + 713aaad commit 2d03441

71 files changed

Lines changed: 13949 additions & 2313 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/gh-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Setup Node
2222
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
2323
with:
24-
node-version: '22.17.0'
24+
node-version: '22.17.1'
2525

2626
- name: Cache dependencies
2727
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3

.github/workflows/release-x-manual-helm-chart.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
helm dependency update ./helm/defectdojo
7272
7373
- name: Add yq
74-
uses: mikefarah/yq@b534aa9ee5d38001fba3cd8fe254a037e4847b37 # v4.45.4
74+
uses: mikefarah/yq@1187c954ec44c3a0e62c13ca7dc9dadc1ca80ae7 # v4.46.1
7575

7676
- name: Pin version docker version
7777
id: pin_image

.github/workflows/validate_docs_build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Setup Node
1919
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
2020
with:
21-
node-version: '22.17.0'
21+
node-version: '22.17.1'
2222

2323
- name: Cache dependencies
2424
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3

components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"chosen-js": "^1.8.7",
1414
"clipboard": "^2.0.11",
1515
"datatables.net": "^2.3.1",
16-
"datatables.net-buttons-bs": "^3.2.3",
16+
"datatables.net-buttons-bs": "^3.2.4",
1717
"datatables.net-colreorder": "^2.1.1",
1818
"drmonty-datatables-plugins": "^1.0.0",
1919
"drmonty-datatables-responsive": "^1.0.0",

components/yarn.lock

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -187,19 +187,19 @@ datatables.net-bs@^2:
187187
datatables.net "2.3.2"
188188
jquery ">=1.7"
189189

190-
datatables.net-buttons-bs@^3.2.3:
191-
version "3.2.3"
192-
resolved "https://registry.yarnpkg.com/datatables.net-buttons-bs/-/datatables.net-buttons-bs-3.2.3.tgz#989dfaebad1731fc72ebe1fc33bf9e94b365ec2a"
193-
integrity sha512-1Td8OKEeyKB+W26pbqxUlea6NUoR0znQq2c2tqDfnCAWRBfJaNs2+xXBdYhylC5ACGmie1HieliS8kV9gAfY6w==
190+
datatables.net-buttons-bs@^3.2.4:
191+
version "3.2.4"
192+
resolved "https://registry.yarnpkg.com/datatables.net-buttons-bs/-/datatables.net-buttons-bs-3.2.4.tgz#7a883c3ee8c6428fb99e6e6e56c39d0051386039"
193+
integrity sha512-wOljUlsJ4sU5pABim+cwbO61ZFRv4aak1PkNL812i/qFwIEcsji7uz59PAx1ZoP1YdNtetj4Vn7D5oTU+Ijedw==
194194
dependencies:
195195
datatables.net-bs "^2"
196-
datatables.net-buttons "3.2.3"
196+
datatables.net-buttons "3.2.4"
197197
jquery ">=1.7"
198198

199-
datatables.net-buttons@3.2.3:
200-
version "3.2.3"
201-
resolved "https://registry.yarnpkg.com/datatables.net-buttons/-/datatables.net-buttons-3.2.3.tgz#26eae1f012fd5cfbfcf28dfbfd8a4b644ea8a4ae"
202-
integrity sha512-K+WeQWUYVGe5c3Gwb8Gfi7YpUXbJEerik3B2vynnVKpBlYBF5AHTGbrK1Psek2q/mjxeIVNHafQ9eX2otLhJVw==
199+
datatables.net-buttons@3.2.4:
200+
version "3.2.4"
201+
resolved "https://registry.yarnpkg.com/datatables.net-buttons/-/datatables.net-buttons-3.2.4.tgz#c58cc0bb518da8738bec6e64a54c1135dc257141"
202+
integrity sha512-anA39/R0kpHA2DOwqEHy/ZMXD5vf4tWmyNO0BnO0kJG7AFNvGTUCWBnBifXYg3G64U6JYpYY+MuTFKIB1/ZMTQ==
203203
dependencies:
204204
datatables.net "^2"
205205
jquery ">=1.7"

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ services:
120120
source: ./docker/extra_settings
121121
target: /app/docker/extra_settings
122122
postgres:
123-
image: postgres:17.5-alpine@sha256:fbe21607052bb5c298674f2fd8cf044a63aa3ddf50b81627f894f91f40f50bcb
123+
image: postgres:17.5-alpine@sha256:6567bca8d7bc8c82c5922425a0baee57be8402df92bae5eacad5f01ae9544daa
124124
environment:
125125
POSTGRES_DB: ${DD_DATABASE_NAME:-defectdojo}
126126
POSTGRES_USER: ${DD_DATABASE_USER:-defectdojo}
@@ -129,7 +129,7 @@ services:
129129
- defectdojo_postgres:/var/lib/postgresql/data
130130
redis:
131131
# Pinning to this version due to licensing constraints
132-
image: redis:7.2.9-alpine@sha256:fce236b99c58ef7196c4e243e43f533b404d5c17239cae4e6e262b729a1952b3
132+
image: redis:7.2.10-alpine@sha256:395ccd7ee4db0867de0d0410f4712a9e0331cff9fdbd864f71ec0f7982d3ffe6
133133
volumes:
134134
- defectdojo_redis:/data
135135
volumes:
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: "Mayhem SARIF Reports"
3+
toc_hide: true
4+
---
5+
Import for Mayhem generated SARIF reports. In general, the exiting
6+
SARIF report consumer should work, and for general cases does. However,
7+
since Mayhem is A. DAST and B. includes fuzzed data in the content of
8+
the report, a Mayhem-specific SARIF consumer is added.
9+
See more below:
10+
[Mayhem SARIF Report (API)](https://docs.mayhem.security/api-testing/tutorials/identifying-api-issues/bug-reporting/#sarif-reports).
11+
[Mayhem SARIF Report (CI)](https://docs.mayhem.security/integrations/ci-integrations/github/#analyzing-sarif-reports).
12+
13+
14+
#### Parity with Existing SARIF Consumer
15+
16+
The current implementation is mostly lifted from the existing SARIF parser support. As such, it will also aggregate all the findings in the SARIF file in one single report, and it also supports fingerprint deduplication.
17+
18+
### Sample Scan Data
19+
Sample Mayhem SARIF reports can be found [here](https://github.com/DefectDojo/django-DefectDojo/tree/master/unittests/scans/mayhem).

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

Lines changed: 34 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -166,43 +166,52 @@ Good example:
166166
finding.cwe = data["mykey"]
167167
```
168168

169-
### Do not parse CVSS by hand (vector, score or severity)
169+
### Parsing of CVSS vectors
170170

171-
Data can have `CVSS` vectors or scores. Don't write your own CVSS score algorithm.
172-
For parser, we rely on module `cvss`. But we also have a helper method to validate the vector and extract the base score and severity from it.
171+
Data can have `CVSS` vectors or scores. Defect Dojo use the `cvss` module provided by RedHat Security.
172+
There's also a helper method to validate the vector and extract the base score and severity from it.
173173

174174
```python
175-
from dojo.utils import parse_cvss_data
176-
cvss_data = parse_cvss_data("CVSS:3.0/S:C/C:H/I:H/A:N/AV:P/AC:H/PR:H/UI:R/E:H/RL:O/RC:R/CR:H/IR:X/AR:X/MAC:H/MPR:X/MUI:X/MC:L/MA:X")
177-
if cvss_data:
178-
finding.cvssv3 = cvss_data.get("vector")
179-
finding.cvssv3_score = cvss_data.get("score")
180-
finding.severity = cvss_data.get("severity") # if your tool does generate severity
175+
from dojo.utils import parse_cvss_data
176+
177+
cvss_vector = <get CVSS3 or CVSS4 vector from the report>
178+
cvss_data = parse_cvss_data(cvss_vector)
179+
if cvss_data:
180+
finding.severity = cvss_data["severity"]
181+
finding.cvssv3 = cvss_data["cvssv3"]
182+
finding.cvssv4 = cvss_data["cvssv4"]
183+
# we don't set any score fields as those will be overwritten by Defect Dojo
181184
```
185+
Not all values have to be used as scan reports usually provide their own value for `severity`.
186+
And sometimes also for `cvss_score`. Defect Dojo will not overwrite any `cvss3_score` or `cvss4_score`.
187+
If no score is set, Defect Dojo will use the `cvss` library to calculate the score.
188+
The response also has the detected major version of the CVSS vector in `cvss_data["major_version"]`.
182189

183-
If you need more manual processing, you can parse the `CVSS3` vector directly.
190+
191+
If you need more manual processing, you can parse the `CVSS` vector directly.
184192

185193
Example of use:
186194

187195
```python
188-
import cvss.parser
189-
from cvss import CVSS2, CVSS3
190-
191-
vectors = cvss.parser.parse_cvss_from_text("CVSS:3.0/S:C/C:H/I:H/A:N/AV:P/AC:H/PR:H/UI:R/E:H/RL:O/RC:R/CR:H/IR:X/AR:X/MAC:H/MPR:X/MUI:X/MC:L/MA:X")
192-
if len(vectors) > 0 and type(vectors[0]) is CVSS3:
193-
print(vectors[0].severities()) # this is the 3 severities
194-
195-
cvssv3 = vectors[0].clean_vector()
196-
severity = vectors[0].severities()[0]
197-
vectors[0].compute_base_score()
198-
cvssv3_score = vectors[0].scores()[0]
199-
finding.severity = severity
200-
finding.cvssv3_score = cvssv3_score
196+
import cvss.parser
197+
from cvss import CVSS2, CVSS3, CVSS4
198+
199+
# TEMPORARY: Use Defect Dojo implementation of `parse_cvss_from_text` white waiting for https://github.com/RedHatProductSecurity/cvss/pull/75 to be released
200+
vectors = dojo.utils.parse_cvss_from_text("CVSS:3.0/S:C/C:H/I:H/A:N/AV:P/AC:H/PR:H/UI:R/E:H/RL:O/RC:R/CR:H/IR:X/AR:X/MAC:H/MPR:X/MUI:X/MC:L/MA:X")
201+
if len(vectors) > 0 and type(vectors[0]) is CVSS3:
202+
print(vectors[0].severities()) # this is the 3 severities
203+
204+
cvssv3 = vectors[0].clean_vector()
205+
severity = vectors[0].severities()[0]
206+
vectors[0].compute_base_score()
207+
cvssv3_score = vectors[0].scores()[0]
208+
finding.severity = severity
209+
finding.cvssv3_score = cvssv3_score
201210
```
202211

203-
Bad example (DIY):
212+
Do not do something like this:
204213

205-
```python
214+
```
206215
def get_severity(self, cvss, cvss_version="2.0"):
207216
cvss = float(cvss)
208217
cvss_version = float(cvss_version[:1])
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: 'Upgrading to DefectDojo Version 2.49.x'
3+
toc_hide: true
4+
weight: -20250707
5+
description: No special instructions.
6+
---
7+
There are no special instructions for upgrading to 2.49.x. Check the [Release Notes](https://github.com/DefectDojo/django-DefectDojo/releases/tag/2.49.0) for the contents of the release.

docs/package-lock.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)