Skip to content

Commit

Permalink
Merge branch 'bugfix' into ruff-action
Browse files Browse the repository at this point in the history
  • Loading branch information
Maffooch authored Jul 8, 2024
2 parents d33f5d6 + cf864b1 commit 95c41f2
Show file tree
Hide file tree
Showing 35 changed files with 333 additions and 238 deletions.
4 changes: 4 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
"baseBranches": ["dev"],
"rebaseWhen": "conflicted",
"ignorePaths": ["requirements.txt", "requirements-lint.txt", "components/package.json", "components/package-lock.json", "dojo/components/yarn.lock", "dojo/components/package.json", "Dockerfile**"],
"ignoreDeps": [
"mysql",
"rabbitmq"
],
"packageRules": [{
"packagePatterns": ["*"],
"commitMessageExtra": "from {{currentVersion}} to {{#if isMajor}}v{{{newMajor}}}{{else}}{{#if isSingleVersion}}v{{{toVersion}}}{{else}}{{{newValue}}}{{/if}}{{/if}}",
Expand Down
1 change: 0 additions & 1 deletion docker-compose.override.unit_tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
version: '3.8'
services:
nginx:
image: busybox:1.36.1-musl
Expand Down
1 change: 1 addition & 0 deletions docker-compose.override.unit_tests_cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ services:
environment:
PYTHONWARNINGS: error # We are strict about Warnings during testing
DD_DEBUG: 'True'
DD_LOG_LEVEL: 'ERROR'
DD_TEST_DATABASE_NAME: ${DD_TEST_DATABASE_NAME}
DD_DATABASE_NAME: ${DD_TEST_DATABASE_NAME}
DD_DATABASE_ENGINE: ${DD_DATABASE_ENGINE}
Expand Down
3 changes: 2 additions & 1 deletion docker/entrypoint-unit-tests-devDocker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ EOF

echo "Unit Tests"
echo "------------------------------------------------------------"
python3 manage.py test unittests -v 3 --keepdb --no-input --shuffle
python3 manage.py test unittests -v 3 --keepdb --no-input --failfast --shuffle --parallel --exclude-tag="non-parallel"
python3 manage.py test unittests -v 3 --keepdb --no-input --failfast --shuffle --tag="non-parallel"

# you can select a single file to "test" unit tests
# python3 manage.py test unittests.tools.test_npm_audit_scan_parser.TestNpmAuditParser --keepdb -v 3
Expand Down
4 changes: 3 additions & 1 deletion docker/entrypoint-unit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,6 @@ python3 manage.py migrate

echo "Unit Tests"
echo "------------------------------------------------------------"
python3 manage.py test unittests -v 3 --keepdb --no-input --shuffle
python3 manage.py test unittests -v 3 --keepdb --no-input --failfast --shuffle --parallel --exclude-tag="non-parallel"
python3 manage.py test unittests -v 3 --keepdb --no-input --failfast --shuffle --tag="non-parallel"

6 changes: 5 additions & 1 deletion docs/config.dev.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ weight = 1
# See a complete list of available styles at https://xyproto.github.io/splash/docs/all.html
style = "dracula"
# Uncomment if you want your chosen highlight style used for code blocks without a specified language
guessSyntax = "true"
# Do not uncomment otherwise it breaks mermaid
# guessSyntax = "true"

# Everything below this are Site Params

Expand Down Expand Up @@ -198,3 +199,6 @@ enable = false
url = "https://owasp.slack.com/archives/C014H3ZV9U6"
icon = "fab fa-slack"
desc = "Chat with other project developers"

[params.mermaid]
enable = true
6 changes: 5 additions & 1 deletion docs/config.master.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ weight = 1
# See a complete list of available styles at https://xyproto.github.io/splash/docs/all.html
style = "dracula"
# Uncomment if you want your chosen highlight style used for code blocks without a specified language
guessSyntax = "true"
# Do not uncomment otherwise it breaks mermaid
# guessSyntax = "true"

# Everything below this are Site Params

Expand Down Expand Up @@ -198,3 +199,6 @@ enable = false
url = "https://owasp.slack.com/archives/C014H3ZV9U6"
icon = "fab fa-slack"
desc = "Chat with other project developers"

[params.mermaid]
enable = true
4 changes: 2 additions & 2 deletions docs/content/en/integrations/ldap-authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Please check for the latest version of these requirements at the time of impleme

Otherwise add the following to requirements.txt:

```
```python
python-ldap==3.4.2
django-auth-ldap==4.1.0
```
Expand Down Expand Up @@ -119,7 +119,7 @@ Read the docs for Django Authentication with LDAP here: https://django-auth-ldap
In order to pass the variables to the settings.dist.py file via docker, it's a good idea to add these to the docker-compose file.

You can do this by adding the following variables to the environment section for the uwsgi image:
```
```yaml
DD_LDAP_SERVER_URI: "${DD_LDAP_SERVER_URI:-ldap://ldap.example.com}"
DD_LDAP_BIND_DN: "${DD_LDAP_BIND_DN:-}"
DD_LDAP_BIND_PASSWORD: "${DD_LDAP_BIND_PASSWORD:-}"
Expand Down
2 changes: 1 addition & 1 deletion docs/content/en/integrations/parsers/file/fortify.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ per category. To get all issues, copy the [DefaultReportDefinitionAllIssues.xml]

Once this is complete, you can run the following command on your .fpr file to generate the
required XML:
```
```bash
./path/to/ReportGenerator -format xml -f /path/to/output.xml -source /path/to/downloaded/artifact.fpr -template DefaultReportDefinitionAllIssues.xml
```
4 changes: 2 additions & 2 deletions docs/content/en/integrations/parsers/file/veracode.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Veracode reports can be ingested in either XML or JSON Format
- Requires slight modification of the response returned from the API
- Exmample of a request being: `url <endpoint> | jq "{findings}"`
- Desired Format:
```
```json
{
"findings": [
{
Expand All @@ -28,7 +28,7 @@ Veracode reports can be ingested in either XML or JSON Format
- This response can be saved directly to a file and uploaded
- Not as ideal for crafting a refined report consisting of multiple requests
- Desired Format:
```
```json
{
"_embedded": {
"findings": [
Expand Down
4 changes: 2 additions & 2 deletions docs/content/en/integrations/social-authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ Edit the settings (see [Configuration]({{< ref "/getting_started/configuration"

or, alternatively, for helm configuration, add this to the `extraConfig` section:

```
```yaml
DD_SESSION_COOKIE_SECURE: 'True'
DD_CSRF_COOKIE_SECURE: 'True'
DD_SECURE_SSL_REDIRECT: 'True'
Expand Down Expand Up @@ -453,7 +453,7 @@ Some Identity Providers are able to send list of groups to which should user bel

You can bypass the login form if you are only using SSO/Social authentication for login in by enabling these two environment variables:

```
```yaml
DD_SOCIAL_LOGIN_AUTO_REDIRECT: "true"
DD_SOCIAL_AUTH_SHOW_LOGIN_FORM: "false"
```
Expand Down
2 changes: 1 addition & 1 deletion docs/content/en/usage/productgrading.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Note that the following abbreviations were used:
- med: amount of medium findings within the product
- low: amount of low findings within the product

```
```python
health=100
if crit > 0:
health = 40
Expand Down
6 changes: 3 additions & 3 deletions dojo/api_v2/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1645,10 +1645,10 @@ class FindingSerializer(TaggitSerializer, serializers.ModelSerializer):
age = serializers.IntegerField(read_only=True)
sla_days_remaining = serializers.IntegerField(read_only=True)
finding_meta = FindingMetaSerializer(read_only=True, many=True)
related_fields = serializers.SerializerMethodField()
related_fields = serializers.SerializerMethodField(allow_null=True)
# for backwards compatibility
jira_creation = serializers.SerializerMethodField(read_only=True)
jira_change = serializers.SerializerMethodField(read_only=True)
jira_creation = serializers.SerializerMethodField(read_only=True, allow_null=True)
jira_change = serializers.SerializerMethodField(read_only=True, allow_null=True)
display_status = serializers.SerializerMethodField()
finding_groups = FindingGroupSerializer(
source="finding_group_set", many=True, read_only=True
Expand Down
Loading

0 comments on commit 95c41f2

Please sign in to comment.