Skip to content

Commit 2b63f9e

Browse files
authored
Merge pull request #12962 from DefectDojo/release/2.49.1
Release: Merge release into master from: release/2.49.1
2 parents f50d5fe + 4c4b9c2 commit 2b63f9e

File tree

36 files changed

+823
-76
lines changed

36 files changed

+823
-76
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ Navigate to `http://localhost:8080` to see your new instance!
8787
* [OAuth2/SAML2](https://docs.defectdojo.com/en/open_source/archived_docs/integrations/social-authentication/)
8888
* [LDAP](https://docs.defectdojo.com/en/open_source/ldap-authentication/)
8989
* [Supported tools](https://docs.defectdojo.com/en/connecting_your_tools/parsers/)
90+
* [How to Write Documentation Locally](/docs/README.md)
9091

9192
## Supported Installation Options
9293

components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "defectdojo",
3-
"version": "2.49.0",
3+
"version": "2.49.1",
44
"license" : "BSD-3-Clause",
55
"private": true,
66
"dependencies": {

docker/entrypoint-nginx.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ else
2020
NGINX_CONFIG="/etc/nginx/nginx.conf"
2121
fi
2222

23+
if ! ip -6 addr show dev lo | grep -q 'inet6 ::1'; then
24+
sed -i '/listen \[::\]:/d' "$NGINX_CONFIG"
25+
fi
26+
2327
if [ "${NGINX_METRICS_ENABLED}" = true ]; then
2428
sed -i "s/#stub_status/stub_status/g;" $NGINX_CONFIG
2529
echo "Nginx metrics are enabled"

docker/entrypoint-unit-tests-devDocker.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,15 @@ echo "Unit Tests"
7373
echo "------------------------------------------------------------"
7474

7575
# Removing parallel and shuffle for now to maintain stability
76-
# python3 manage.py test unittests -v 3 --keepdb --no-input --exclude-tag="non-parallel" || {
77-
# exit 1;
78-
# }
79-
# python3 manage.py test unittests -v 3 --keepdb --no-input --tag="non-parallel" || {
80-
# exit 1;
81-
# }
76+
python3 manage.py test unittests -v 3 --keepdb --no-input --exclude-tag="non-parallel" || {
77+
exit 1;
78+
}
79+
python3 manage.py test unittests -v 3 --keepdb --no-input --tag="non-parallel" || {
80+
exit 1;
81+
}
8282

8383
# you can select a single file to "test" unit tests
84-
python3 manage.py test unittests.test_importers_performance.TestDojoImporterPerformance --keepdb -v 3 &> /app/dev2.log
84+
# python3 manage.py test unittests.test_importers_performance.TestDojoImporterPerformance --keepdb -v 3 &> /app/dev2.log
8585

8686
# or even a single method
8787
# python3 manage.py test unittests.tools.test_npm_audit_scan_parser.TestNpmAuditParser.test_npm_audit_parser_many_vuln_npm7 --keepdb -v 3

docs/README.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Guide to Writing Documentation
2+
3+
When developing documentation, there are steps to take before submitting a pull request
4+
5+
1. Writing your documentation with [hot reloading](#development-with-hot-reloading) live in your browser
6+
2. Verifying your changes with a [production build](#mimic-production-environment) to ensure Hugo will minify everything correctly
7+
8+
## Development with Hot Reloading
9+
10+
This method performs the following from the `django-DefectDojo/docs` directory:
11+
12+
1. Remove any existing packages to perform a fresh install each time: `rm -rf public node_modules`
13+
2. Install all packages: `npm install`
14+
3. Start the server: `npm run dev`
15+
4. Access the [site in the browser at http://localhost:1313](http://localhost:1313)
16+
17+
### Execution List
18+
19+
```bash
20+
rm -rf public node_modules
21+
npm install
22+
npm run dev
23+
```
24+
25+
or for a one liner:
26+
27+
```bash
28+
rm -rf public node_modules && \
29+
npm install && \
30+
npm run dev
31+
```
32+
33+
## Mimic Production Environment
34+
35+
This method performs the following from the `django-DefectDojo/docs` directory:
36+
37+
1. Remove any existing packages to perform a fresh install each time: `rm -rf public node_modules`
38+
2. Install all packages in CI mode to only install from `package-lock.json`: `npm ci`
39+
3. Run Hugo to build the site in the way the CI job does, but in development environment to point at `localhost` for integrity checks : `npm run build -- --environment development`
40+
4. Change directory to the new `public` directory to run the site locally: `cd public`
41+
5. Run a light weight webserver to server the files, and [access the site at http://localhost:8080](http://localhost:8080): `python3 -m http.server 8080`
42+
6. After killing the webserver process, navigate back to the `django-DefectDojo/docs` directory: `cd ../`
43+
44+
### Execution List
45+
46+
```bash
47+
rm -rf public node_modules
48+
npm ci
49+
npm run build -- --environment development
50+
cd public
51+
python3 -m http.server 8080
52+
cd ../
53+
```
54+
55+
or for a one liner:
56+
57+
```bash
58+
rm -rf public node_modules && \
59+
npm ci && \
60+
npm run build -- --environment development && \
61+
cd public && \
62+
python3 -m http.server 8080 && \
63+
cd ../
64+
```

docs/assets/scss/app.scss

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,62 @@
11
// Source: https://getbootstrap.com/docs/5.3/customize/sass/#importing
22

33
// 1. Include functions first (so you can manipulate colors, SVGs, calc, etc)
4-
@import "bootstrap/scss/functions";
4+
@import "node_modules/bootstrap/scss/functions";
55

66
// 2. Include any default variable overrides here
77
@import "common/colors";
88
@import "common/variables-overrides";
99
@import "common/variables-custom";
1010

1111
// 3. Include remainder of required Bootstrap stylesheets (including any separate color mode stylesheets)
12-
@import "bootstrap/scss/variables";
13-
@import "bootstrap/scss/variables-dark";
12+
@import "node_modules/bootstrap/scss/variables";
13+
@import "node_modules/bootstrap/scss/variables-dark";
1414

1515
// 4. Include any default map overrides here
1616

1717
// 5. Include remainder of required parts
18-
@import "bootstrap/scss/maps";
19-
@import "bootstrap/scss/mixins";
20-
@import "bootstrap/scss/root";
18+
@import "node_modules/bootstrap/scss/maps";
19+
@import "node_modules/bootstrap/scss/mixins";
20+
@import "node_modules/bootstrap/scss/root";
2121

2222
// 6. Optionally include any other parts as needed
2323

2424
// Layout & components
25-
@import "bootstrap/scss/utilities";
26-
@import "bootstrap/scss/reboot";
27-
@import "bootstrap/scss/type";
28-
@import "bootstrap/scss/images";
29-
@import "bootstrap/scss/containers";
30-
@import "bootstrap/scss/grid";
31-
@import "bootstrap/scss/helpers";
32-
@import "bootstrap/scss/tables";
33-
@import "bootstrap/scss/forms";
34-
@import "bootstrap/scss/buttons";
35-
@import "bootstrap/scss/transitions";
36-
@import "bootstrap/scss/dropdown";
37-
@import "bootstrap/scss/button-group";
38-
@import "bootstrap/scss/nav";
39-
@import "bootstrap/scss/navbar";
40-
@import "bootstrap/scss/card";
41-
@import "bootstrap/scss/accordion";
42-
@import "bootstrap/scss/breadcrumb";
43-
@import "bootstrap/scss/pagination";
44-
@import "bootstrap/scss/badge";
45-
@import "bootstrap/scss/alert";
46-
@import "bootstrap/scss/progress";
47-
@import "bootstrap/scss/list-group";
48-
@import "bootstrap/scss/close";
49-
@import "bootstrap/scss/toasts";
50-
@import "bootstrap/scss/modal";
51-
@import "bootstrap/scss/tooltip";
52-
@import "bootstrap/scss/popover";
53-
@import "bootstrap/scss/carousel";
54-
@import "bootstrap/scss/spinners";
55-
@import "bootstrap/scss/offcanvas";
56-
@import "bootstrap/scss/placeholders";
25+
@import "node_modules/bootstrap/scss/utilities";
26+
@import "node_modules/bootstrap/scss/reboot";
27+
@import "node_modules/bootstrap/scss/type";
28+
@import "node_modules/bootstrap/scss/images";
29+
@import "node_modules/bootstrap/scss/containers";
30+
@import "node_modules/bootstrap/scss/grid";
31+
@import "node_modules/bootstrap/scss/helpers";
32+
@import "node_modules/bootstrap/scss/tables";
33+
@import "node_modules/bootstrap/scss/forms";
34+
@import "node_modules/bootstrap/scss/buttons";
35+
@import "node_modules/bootstrap/scss/transitions";
36+
@import "node_modules/bootstrap/scss/dropdown";
37+
@import "node_modules/bootstrap/scss/button-group";
38+
@import "node_modules/bootstrap/scss/nav";
39+
@import "node_modules/bootstrap/scss/navbar";
40+
@import "node_modules/bootstrap/scss/card";
41+
@import "node_modules/bootstrap/scss/accordion";
42+
@import "node_modules/bootstrap/scss/breadcrumb";
43+
@import "node_modules/bootstrap/scss/pagination";
44+
@import "node_modules/bootstrap/scss/badge";
45+
@import "node_modules/bootstrap/scss/alert";
46+
@import "node_modules/bootstrap/scss/progress";
47+
@import "node_modules/bootstrap/scss/list-group";
48+
@import "node_modules/bootstrap/scss/close";
49+
@import "node_modules/bootstrap/scss/toasts";
50+
@import "node_modules/bootstrap/scss/modal";
51+
@import "node_modules/bootstrap/scss/tooltip";
52+
@import "node_modules/bootstrap/scss/popover";
53+
@import "node_modules/bootstrap/scss/carousel";
54+
@import "node_modules/bootstrap/scss/spinners";
55+
@import "node_modules/bootstrap/scss/offcanvas";
56+
@import "node_modules/bootstrap/scss/placeholders";
5757

5858
// 7. Optionally include utilities API last to generate classes based on the Sass map in `_utilities.scss`
59-
@import "bootstrap/scss/utilities/api";
59+
@import "node_modules/bootstrap/scss/utilities/api";
6060

6161
// 8. Add additional custom code here
6262
@import "common/fonts";
@@ -96,4 +96,4 @@ body {
9696

9797
// 10. DocSearch
9898
@import "common/variables-docsearch";
99-
@import "@docsearch/css/dist/modal";
99+
@import "node_modules/@docsearch/css/dist/modal";

docs/config/development/hugo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Overrides for production environment
2+
baseurl = "http://localhost/"

docs/config/production/hugo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
# Overrides for production environment
2-
# baseurl = "https://documentation.defectdojo.com/"
3-
baseurl = "https://docs.defectdojo.com"
2+
baseurl = "https://docs.defectdojo.com"
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
title: "Snyk Issue API"
3+
toc_hide: true
4+
---
5+
The Snyk Issue API parser supports importing vulnerability data from the Snyk Issue API in JSON format. Currently only parsing issues of type `code` is supported. Samples of ther issue types are welcome.
6+
7+
For more information about the Snyk Issue API, refer to the [official Snyk API documentation](https://docs.snyk.io/snyk-api/reference/issues#get-orgs-org_id-issues).
8+
9+
### API request
10+
Example API request to get only code issues:
11+
```
12+
GET https://api.snyk.io/rest/orgs/{org_id}/issues?version=2025-08-02&type=code
13+
```
14+
15+
For more details see: https://docs.snyk.io/snyk-api/reference/issues#get-orgs-org_id-issues
16+
17+
### Sample Scan Data
18+
Sample Snyk Issue API scans can be found [here](https://github.com/DefectDojo/django-DefectDojo/tree/master/unittests/scans/snyk_issue_api).
19+
20+
### Field Mapping
21+
The parser maps fields from the Snyk Issue API response to DefectDojo's Finding model as follows:
22+
23+
| Finding Field | Snyk Issue API Field | Notes |
24+
|--------------|---------------------|-------|
25+
| title | attributes.title | |
26+
| severity | attributes.effective_severity_level | Mapped to Critical/High/Medium/Low/Info |
27+
| description | attributes.description | |
28+
| unique_id_from_tool | id | Top-level issue ID |
29+
| file_path | coordinates[].representations[].sourceLocation.file | First occurrence |
30+
| line | coordinates[].representations[].sourceLocation.region.start.line | Line where the issue starts |
31+
| date | attributes.created_at | ISO format date |
32+
| cwe | classes[].id | First CWE class found |
33+
| active | attributes.status == "open" AND NOT attributes.ignored | Inactive if ignored or not open |
34+
| verified | true | Always set to true |
35+
| static_finding | true | Always set to true |
36+
| dynamic_finding | false | Always set to false |
37+
| out_of_scope | attributes.ignored | Set to true if issue is ignored |
38+
| fix_available* | coordinates[].is_fixable_* | True if any fixability flag is true. |
39+
40+
#### Impact Field
41+
The impact field combines multiple pieces of information:
42+
1. Problem details:
43+
- Source (e.g., "SNYK")
44+
- Type (e.g., "vulnerability")
45+
- Last update timestamp
46+
- Severity level
47+
2. All source locations, each containing:
48+
- File path
49+
- Commit ID
50+
- Line range (start-end)
51+
- Column range (start-end)
52+
53+
#### Additional Processing
54+
- Multiple CWEs are handled by using the first one as the primary CWE and listing additional ones in the references field
55+
- Risk scores are included in the severity_justification field when available
56+
- Only issues with type="code" are processed
57+
- Line numbers: Only the starting line is stored in the Finding model, but both start and end lines are included in the impact field for reference
58+
59+
### Default Deduplication Hashcode Fields
60+
By default, DefectDojo identifies duplicate Findings using these [hashcode fields](https://docs.defectdojo.com/en/working_with_findings/finding_deduplication/about_deduplication/):
61+
62+
- unique id from tool
63+
- file path

docs/content/en/open_source/notification_webhooks/engagement_added.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ X-DefectDojo-Event: engagement_added
3434
},
3535
"url_api": "http://localhost:8080/api/v2/engagements/7/",
3636
"url_ui": "http://localhost:8080/engagement/7",
37-
"user": null
37+
"user": {
38+
"id": 1,
39+
"email": "[email protected]",
40+
"first_name": "Admin",
41+
"last_name": "User",
42+
"username": "admin",
43+
"url_api": "http://localhost:8080/api/v2/users/1/",
44+
"url_ui": "http://localhost:8080/user/1"
45+
}
3846
}
3947
```

0 commit comments

Comments
 (0)