Skip to content

Commit 10aa100

Browse files
authored
Merge pull request #11722 from DefectDojo/bugfix
Release 2.43.0: Merge Bugfix into Dev
2 parents e0de953 + d3b3c26 commit 10aa100

29 files changed

Lines changed: 1434 additions & 859 deletions

.github/workflows/gh-pages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ jobs:
3939

4040
- name: Setup Pages
4141
id: pages
42-
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0 - use this after https://github.com/DefectDojo/django-DefectDojo/pull/11329
43-
42+
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
43+
4444
- name: Install dependencies
4545
run: cd docs && npm ci
4646

_config.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

docker/entrypoint-initializer.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ echo "Creating Announcement Banner"
2424
cat <<EOD | python3 manage.py shell
2525
from dojo.models import Announcement, UserAnnouncement, Dojo_User
2626
announcement, created = Announcement.objects.get_or_create(id=1)
27-
announcement.message = '<a href="https://www.defectdojo.com/pricing" target="_blank">Cloud and On-Premise Subscriptions Now Available! Click here for more details</a>'
27+
announcement.message = '<a href="https://defectdojo.com/contact" target="_blank">Cloud and On-Premise Subscriptions Now Available! Click here for more details</a>'
2828
announcement.dismissable = True
2929
announcement.save()
3030
for dojo_user in Dojo_User.objects.all():

docs/content/en/connecting_your_tools/parsers/file/noseyparker.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ Input Type:
66
-
77
This parser takes JSON Lines Output from Nosey Parker: https://github.com/praetorian-inc/noseyparkerSupports
88

9-
Supports version 0.16.0:
10-
https://github.com/praetorian-inc/noseyparker/releases/tag/v0.16.0
9+
Supports versions [0.16.0](https://github.com/praetorian-inc/noseyparker/releases/tag/v0.16.0) and [0.22.0](https://github.com/praetorian-inc/noseyparker/releases/tag/v0.22.0)
1110

1211
Things to note about the Nosey Parker Parser:
1312
-
Lines changed: 0 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,7 @@
11
---
22
title: "Notification Webhooks (experimental)"
3-
description: "How to setup and use webhooks"
43
weight: 7
54
chapter: true
65
sidebar:
76
collapsed: true
87
---
9-
10-
Webhooks are HTTP requests coming from the DefectDojo instance towards a user-defined webserver which expects this kind of incoming traffic.
11-
12-
## Transition graph:
13-
14-
It is not unusual that in some cases a webhook can not be delivered. It is usually connected to network issues, server misconfiguration, or running upgrades on the server. DefectDojo needs to react to these outages. It might temporarily or permanently disable related endpoints. The following graph shows how it might change the status of the webhook definition based on HTTP responses (or manual user interaction).
15-
16-
```mermaid
17-
flowchart TD
18-
19-
START{{Endpoint created}}
20-
ALL{All states}
21-
STATUS_ACTIVE([STATUS_ACTIVE])
22-
STATUS_INACTIVE_TMP
23-
STATUS_INACTIVE_PERMANENT
24-
STATUS_ACTIVE_TMP([STATUS_ACTIVE_TMP])
25-
END{{Endpoint removed}}
26-
27-
START ==> STATUS_ACTIVE
28-
STATUS_ACTIVE --HTTP 200 or 201 --> STATUS_ACTIVE
29-
STATUS_ACTIVE --HTTP 5xx <br>or HTTP 429 <br>or Timeout--> STATUS_INACTIVE_TMP
30-
STATUS_ACTIVE --Any HTTP 4xx response<br>or any other HTTP response<br>or non-HTTP error--> STATUS_INACTIVE_PERMANENT
31-
STATUS_INACTIVE_TMP -.After 60s.-> STATUS_ACTIVE_TMP
32-
STATUS_ACTIVE_TMP --HTTP 5xx <br>or HTTP 429 <br>or Timeout <br>within 24h<br>from the first error-->STATUS_INACTIVE_TMP
33-
STATUS_ACTIVE_TMP -.After 24h.-> STATUS_ACTIVE
34-
STATUS_ACTIVE_TMP --HTTP 200 or 201 --> STATUS_ACTIVE_TMP
35-
STATUS_ACTIVE_TMP --HTTP 5xx <br>or HTTP 429 <br>or Timeout <br>within 24h from the first error<br>or any other HTTP response or error--> STATUS_INACTIVE_PERMANENT
36-
ALL ==Activation by user==> STATUS_ACTIVE
37-
ALL ==Deactivation by user==> STATUS_INACTIVE_PERMANENT
38-
ALL ==Removal of endpoint by user==> END
39-
```
40-
41-
Notes:
42-
43-
1. Transitions:
44-
- bold: manual changes by user
45-
- dotted: automated by celery
46-
- others: based on responses on webhooks
47-
1. Nodes:
48-
- Stadium-shaped: Active - following webhook can be sent
49-
- Rectangles: Inactive - performing of webhook will fail (and not retried)
50-
- Hexagonal: Initial and final states
51-
- Rhombus: All states (meta node to make the graph more readable)
52-
53-
## Body and Headers
54-
55-
The body of each request is JSON which contains data about related events like names and IDs of affected elements.
56-
Examples of bodies are on pages related to each event (see below).
57-
58-
Each request contains the following headers. They might be useful for better handling of events by the server receiving them.
59-
60-
```yaml
61-
User-Agent: DefectDojo-<version of DD>
62-
X-DefectDojo-Event: <name of the event>
63-
X-DefectDojo-Instance: <Base URL for DD instance>
64-
```
65-
## Disclaimer
66-
67-
This functionality is new and in experimental mode. This means functionality might generate breaking changes in following DefectDojo releases and might not be considered final.
68-
69-
However, the community is open to feedback to make this functionality better and get it stable as soon as possible.
70-
71-
## Roadmap
72-
73-
There are a couple of known issues that are expected to be resolved as soon as core functionality is considered ready.
74-
75-
- Support events - Not only adding products, product types, engagements, tests, or upload of new scans but also events around SLA
76-
- User webhook - right now only admins can define webhooks; in the future, users will also be able to define their own
77-
- Improvement in UI - add filtering and pagination of webhook endpoints
78-
79-
## Events
80-
81-
<!-- Hugo automatically renders list of subpages here -->

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Event: engagement_added"
3-
weight: 3
3+
weight: 4
44
chapter: true
55
---
66

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
title: "How to setup and use webhooks"
3+
weight: 1
4+
chapter: true
5+
---
6+
7+
Webhooks are HTTP requests coming from the DefectDojo instance towards a user-defined webserver which expects this kind of incoming traffic.
8+
9+
## Transition graph:
10+
11+
It is not unusual that in some cases a webhook can not be delivered. It is usually connected to network issues, server misconfiguration, or running upgrades on the server. DefectDojo needs to react to these outages. It might temporarily or permanently disable related endpoints. The following graph shows how it might change the status of the webhook definition based on HTTP responses (or manual user interaction).
12+
13+
```kroki {type=mermaid}
14+
flowchart TD
15+
16+
START{{Endpoint created}}
17+
ALL{All states}
18+
STATUS_ACTIVE([STATUS_ACTIVE])
19+
STATUS_INACTIVE_TMP
20+
STATUS_INACTIVE_PERMANENT
21+
STATUS_ACTIVE_TMP([STATUS_ACTIVE_TMP])
22+
END{{Endpoint removed}}
23+
24+
START ==> STATUS_ACTIVE
25+
STATUS_ACTIVE --HTTP 200 or 201 --> STATUS_ACTIVE
26+
STATUS_ACTIVE --HTTP 5xx <br>or HTTP 429 <br>or Timeout--> STATUS_INACTIVE_TMP
27+
STATUS_ACTIVE --Any HTTP 4xx response<br>or any other HTTP response<br>or non-HTTP error--> STATUS_INACTIVE_PERMANENT
28+
STATUS_INACTIVE_TMP -.After 60s.-> STATUS_ACTIVE_TMP
29+
STATUS_ACTIVE_TMP --HTTP 5xx <br>or HTTP 429 <br>or Timeout <br>within 24h<br>from the first error-->STATUS_INACTIVE_TMP
30+
STATUS_ACTIVE_TMP -.After 24h.-> STATUS_ACTIVE
31+
STATUS_ACTIVE_TMP --HTTP 200 or 201 --> STATUS_ACTIVE_TMP
32+
STATUS_ACTIVE_TMP --HTTP 5xx <br>or HTTP 429 <br>or Timeout <br>within 24h from the first error<br>or any other HTTP response or error--> STATUS_INACTIVE_PERMANENT
33+
ALL ==Activation by user==> STATUS_ACTIVE
34+
ALL ==Deactivation by user==> STATUS_INACTIVE_PERMANENT
35+
ALL ==Removal of endpoint by user==> END
36+
```
37+
38+
Notes:
39+
40+
1. Transitions:
41+
- bold: manual changes by user
42+
- dotted: automated by celery
43+
- others: based on responses on webhooks
44+
1. Nodes:
45+
- Stadium-shaped: Active - following webhook can be sent
46+
- Rectangles: Inactive - performing of webhook will fail (and not retried)
47+
- Hexagonal: Initial and final states
48+
- Rhombus: All states (meta node to make the graph more readable)
49+
50+
## Body and Headers
51+
52+
The body of each request is JSON which contains data about related events like names and IDs of affected elements.
53+
Examples of bodies are on pages related to each event (see below).
54+
55+
Each request contains the following headers. They might be useful for better handling of events by the server receiving them.
56+
57+
```yaml
58+
User-Agent: DefectDojo-<version of DD>
59+
X-DefectDojo-Event: <name of the event>
60+
X-DefectDojo-Instance: <Base URL for DD instance>
61+
```
62+
## Disclaimer
63+
64+
This functionality is new and in experimental mode. This means functionality might generate breaking changes in following DefectDojo releases and might not be considered final.
65+
66+
However, the community is open to feedback to make this functionality better and get it stable as soon as possible.
67+
68+
## Roadmap
69+
70+
There are a couple of known issues that are expected to be resolved as soon as core functionality is considered ready.
71+
72+
- Support events - Not only adding products, product types, engagements, tests, or upload of new scans but also events around SLA
73+
- User webhook - right now only admins can define webhooks; in the future, users will also be able to define their own
74+
- Improvement in UI - add filtering and pagination of webhook endpoints
75+
76+
## Events
77+
78+
- [`product_type_added`](../product_type_added)
79+
- [`product_added`](../product_added)
80+
- [`engagement_added`](../engagement_added)
81+
- [`test_added`](../test_added)
82+
- [`scan_added` and `scan_added_empty`](../scan_added)
83+
- [`ping`](../ping)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: "Event: ping"
3+
weight: 7
4+
chapter: true
5+
---
6+
7+
An event `ping` is sent during Webhook setup to test whether the endpoint is up and responding with the expected status code.
8+
9+
## Event HTTP header
10+
```yaml
11+
X-DefectDojo-Event: ping
12+
```
13+
14+
## Event HTTP body
15+
```json
16+
{
17+
"description": "Test webhook notification",
18+
"title": "",
19+
"user": null,
20+
}
21+
```

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Event: product_added"
3-
weight: 2
3+
weight: 3
44
chapter: true
55
---
66

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Event: product_type_added"
3-
weight: 1
3+
weight: 2
44
chapter: true
55
---
66

0 commit comments

Comments
 (0)