Skip to content

Commit be86a01

Browse files
author
Paul Osinski
committed
Merge branch 'bugfix' of https://github.com/paulOsinski/django-DefectDojo into bugfix
2 parents 4323b40 + 3fa721a commit be86a01

34 files changed

Lines changed: 7378 additions & 275 deletions
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: "Docs: Dry Run Production Deployment"
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'docs/**'
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Setup Hugo
13+
uses: peaceiris/actions-hugo@75d2e84710de30f6ff7268e08f310b60ef14033f # v3.0.0
14+
with:
15+
hugo-version: '0.125.3'
16+
extended: true
17+
18+
- name: Setup Node
19+
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
20+
with:
21+
node-version: '22.14.0'
22+
23+
- name: Cache dependencies
24+
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
25+
with:
26+
path: ~/.npm
27+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
28+
restore-keys: |
29+
${{ runner.os }}-node-
30+
31+
- name: Checkout
32+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
33+
with:
34+
submodules: recursive
35+
fetch-depth: 0
36+
37+
- name: Test the build process
38+
env:
39+
HUGO_ENVIRONMENT: production
40+
HUGO_ENV: production
41+
run: cd docs && npm ci && hugo --minify --gc --config config/production/hugo.toml

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

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,32 +9,7 @@ DefectDojo parser accepts a .json file.
99
Using the [Anchore CLI](https://docs.anchore.com/current/docs/using/cli_usage/images/inspecting_image_content/) is the most reliable way to generate an Anchore report which DefectDojo can parse. When generating a report with the Anchore CLI, please use the following command to ensure complete data: `anchore-cli --json image vuln <image:tag> all`
1010

1111
### Acceptable JSON Format
12-
All properties are strings and are required by the parser.
13-
14-
~~~
15-
16-
{
17-
"imageDigest": "sha256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
18-
"vulnerabilities": [
19-
{
20-
"feed": "example-feed",
21-
"feed_group": "example-feed-group",
22-
"fix": "1.2.4",
23-
"package": "example-package",
24-
"package_cpe": "cpe:2.3:a:*:example:1.2.3:*:*:*:*:*:*:*",
25-
"package_name": "example-package-name",
26-
"package_path": "path/to/package",
27-
"package_type": "dpkg",
28-
"package_version": "1.2.3",
29-
"severity": "Medium",
30-
"url": "https://example.com/cve/CVE-2011-3389",
31-
"vuln": "CVE-2011-3389"
32-
},
33-
...
34-
],
35-
"vulnerability_type": "os"
36-
}
37-
~~~
12+
All properties are strings and are required by the parser. As the parser evolved, two anchore engine parser JSON formats are present till now. Both ([old](https://github.com/DefectDojo/django-DefectDojo/tree/master/unittests/scans/anchore_engine/many_vulns.json) / [new](https://github.com/DefectDojo/django-DefectDojo/tree/master/unittests/scans/anchore_engine/new_format_issue_11552.json)) are supported.
3813

3914
### Sample Scan Data
4015
Sample Anchore-Engine scans can be found [here](https://github.com/DefectDojo/django-DefectDojo/tree/master/unittests/scans/anchore_engine).

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

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,37 @@
22
title: "Aqua"
33
toc_hide: true
44
---
5-
JSON report format.
5+
6+
### File Types
7+
DefectDojo parser accepts JSON report format.
8+
9+
See Aqua documention: https://docs.aquasec.com
10+
11+
### CI/CD Scans
12+
Aqua scanning can be integrated with several types of third-party CI/CD systems.
13+
14+
If there is no plugin available for a particular development tool, Aqua can be integrated with the CI/CD pipeline using Scanner CLI.
15+
16+
CI/CD scans produces JSON scan reports that are supported by the parser. With this kind of report, the parser is able to retrieve vulnerabilities as well as sensitive datas.
17+
18+
### REST API
19+
20+
You can also retrieve the JSON directly from Aqua if you use one of the following endpoint:
21+
22+
- `/api/v1/scanner/registry/<registryName>/image/<imageName>/scan_result`
23+
24+
- `/api/v2/risks/vulnerabilities`
25+
26+
Example
27+
```
28+
curl -X GET <aquaseceurl>/api/v1/scanner/registry/<registryName>/image/<imageName>/scan_result > report.json
29+
```
30+
31+
```
32+
curl -X GET <aquaseceurl>/api/v2/risks/vulnerabilities?show_negligible=true&image_name_exact_match=true&registry_name=<registryName>&image_name=<imageName> > report.json
33+
```
34+
35+
Those JSON files will only list vulnerabilities. Thus, DefectDojo parser will not retrieve findings such as sensitive datas.
636

737
### Sample Scan Data
8-
Sample Aqua scans can be found [here](https://github.com/DefectDojo/django-DefectDojo/tree/master/unittests/scans/aqua).
38+
Sample Aqua scans can be found [here](https://github.com/DefectDojo/django-DefectDojo/tree/master/unittests/scans/aqua).

docs/content/en/customize_dojo/user_management/configure_sso.md

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@ When a user is removed from a given group in Azure AD, they will also be removed
141141

142142
### Open-Source
143143

144-
Open-Source users will need to set these variables as an environment variable, or in the `local_settings.py` file. (see [Configuration](/en/open_source/installation/configuration)).
144+
Open-Source users will need to set these variables as an environment variable, or without the `DD_` prefix in the `local_settings.py` file. (see [Configuration](/en/open_source/installation/configuration)).
145145

146-
1. Add the following information to the settings file:
146+
1. Set the following environment variables
147147

148148
{{< highlight python >}}
149149
DD_SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_KEY=(str, 'YOUR_APPLICATION_ID_FROM_STEP_ABOVE'),
@@ -213,9 +213,9 @@ Both <span style="background-color:rgba(242, 86, 29, 0.3)">DefectDojo Pro</span>
213213

214214
### Open-Source
215215

216-
Open-Source users will need to set these fields as Docker environment variables, or add them to the `local_settings.py` file. (see [Configuration](/en/open_source/installation/configuration)).
216+
Open-Source users will need to set these variables as an environment variable, or without the `DD_` prefix in the `local_settings.py` file. (see [Configuration](/en/open_source/installation/configuration)).
217217

218-
1. Add the following variables to Docker, or to local_settings.py:
218+
1. Set the following environment variables
219219
{{< highlight python >}}
220220
DD_SOCIAL_AUTH_GITHUB_ENTERPRISE_KEY=(str, 'GitHub Enterprise OAuth App Client ID'),
221221
DD_SOCIAL_AUTH_GITHUB_ENTERPRISE_SECRET=(str, 'GitHub Enterprise OAuth App Client Secret'),
@@ -259,9 +259,9 @@ Follow along below.
259259

260260
### Open-Source
261261

262-
Open-Source users will need to set these fields as Docker environment variables, or add them to the `local_settings.py` file. (see [Configuration](/en/open_source/installation/configuration)).
262+
Open-Source users will need to set these variables as an environment variable, or without the `DD_` prefix in the `local_settings.py` file. (see [Configuration](/en/open_source/installation/configuration)).
263263

264-
1. Add the following variables to Docker, or to the `local_settings.py` file:
264+
1. Set the following environment variables
265265
{{< highlight python >}}
266266
DD_SOCIAL_AUTH_GITLAB_KEY=(str, 'YOUR_APPLICATION_ID_FROM_STEP_ABOVE'),
267267
DD_SOCIAL_AUTH_GITLAB_SECRET=(str, 'YOUR_SECRET_FROM_STEP_ABOVE'),
@@ -320,9 +320,9 @@ In order to use Google Authentication, a Google Authentication Server will need
320320

321321
### Open-Source
322322

323-
Open-Source users will need to set these fields as Docker environment variables, or add them to the `local_settings.py` file. (see [Configuration](/en/open_source/installation/configuration)).
323+
Open-Source users will need to set these variables as an environment variable, or without the `DD_` prefix in the `local_settings.py` file. (see [Configuration](/en/open_source/installation/configuration)).
324324

325-
1. Add the following variables to Docker, or to the `local_settings.py` file:
325+
1. Set the following environment variables
326326

327327
{{< highlight python >}}
328328
DD_SOCIAL_AUTH_GOOGLE_OAUTH2_ENABLED=True,
@@ -404,9 +404,11 @@ This guide assumes you already have a KeyCloak Realm set up. If not, you will n
404404
### Open-Source
405405

406406

407-
Open-Source users will need to set these fields as Docker environment variables, or add them to the `local_settings.py` file. (see [Configuration](/en/open_source/installation/configuration)).
407+
Open-Source users will need to set these variables as an environment variable, or without the `DD_` prefix in the `local_settings.py` file. (see [Configuration](/en/open_source/installation/configuration)).
408408

409-
1. {{< highlight python >}}
409+
1. Set the following environment variables
410+
411+
{{< highlight python >}}
410412
DD_SESSION_COOKIE_SECURE=True,
411413
DD_CSRF_COOKIE_SECURE=True,
412414
DD_SECURE_SSL_REDIRECT=True,
@@ -490,7 +492,9 @@ Both <span style="background-color:rgba(242, 86, 29, 0.3)">DefectDojo Pro</span>
490492

491493
### Open-Source
492494

493-
1. Open-Source users will need to set these fields as Docker environment variables, or add them to the `local_settings.py` file. (see [Configuration](/en/open_source/installation/configuration)).
495+
Open-Source users will need to set these variables as an environment variable, or without the `DD_` prefix in the `local_settings.py` file. (see [Configuration](/en/open_source/installation/configuration)).
496+
497+
1. Set the following environment variables
494498

495499
{{< highlight python >}}
496500
DD_SOCIAL_AUTH_OKTA_OAUTH2_ENABLED=True,
@@ -504,7 +508,7 @@ If during the login process you get the following error: *The
504508
in the client app settings.* and the `redirect_uri` HTTP
505509
GET parameter starts with `http://` instead of
506510
`https://` you need to add
507-
`SOCIAL_AUTH_REDIRECT_IS_HTTPS = True` to Docker environment variables, or to your local_settings.py file.
511+
`SOCIAL_AUTH_REDIRECT_IS_HTTPS = True` to Docker environment variables, or to your `local_settings.py` file.
508512

509513
2. Restart DefectDojo, and 'Login With Okta' should appear on the login screen.
510514

@@ -559,7 +563,7 @@ The left side of the ‘=’ sign represents the attribute you want to map from
559563
### Open-Source SAML
560564

561565
1. Navigate to your SAML IdP and find your metadata.
562-
2. Set these fields as Docker environment variables, or add them to the `local_settings.py` file. (see [Configuration](/en/open_source/installation/configuration)).
566+
2. Set these variables as an environment variable, or without the `DD_` prefix in the `local_settings.py` file. (see [Configuration](/en/open_source/installation/configuration)).
563567

564568
{{< highlight python >}}
565569
DD_SAML2_ENABLED=(bool, **True**),

0 commit comments

Comments
 (0)