Skip to content

Release: Merge back 2.48.2 into dev from: master-into-dev/2.48.2-2.49.0-dev #12823

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Jul 21, 2025

Conversation

github-actions[bot]
Copy link
Contributor

Release triggered by rossops

DefectDojo release bot and others added 15 commits July 14, 2025 15:05
….49.0-dev

Release: Merge back 2.48.1 into bugfix from: master-into-bugfix/2.48.1-2.49.0-dev
* reimport: close_old_findings must respect service field

* reimport: close_old_findings must respect service field

* close_old_findings: update docs and help texts

* typo

* reimport docs tweak

* reimport: assert that reopen respect service field
* add display of kev data to findings listing and filtering

* kev date filter to use date widget

* define labels for kev date filter

* change column title for kev date

* add before/after filters for kev date
* update minimum and maximum password length validation in system settings form

* update minimum and maximum password length validation in system settings serializer

* Apply suggestions from code review

* Update dojo/api_v2/serializers.py

* move validation to model

* fix ruff

* add migration
* twistlock: fix no cvss case

* twistlock: use markdown instead html
* view_test: use subquery for finding counts

* fix two more group by errors

* change all counts to subqueries

* fix query
* sysdig parsers: stop using spaces in tags

* add clean_tags method

* sysdig: clean tags

* add migration to clean invalid characters

* api edgescan: use unsaved_tags

* edgescan test case fix

* force parsers to use unsaved_tags

* fix tag=None cleaning and validation

* fix []!=None

* restore reimport tag behaviour

* finetune

* rename upgrade notes
Release: Merge release into master from: release/2.48.2
Copy link
Contributor Author

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Copy link

dryrunsecurity bot commented Jul 21, 2025

DryRun Security

🔴 Risk threshold exceeded.

This pull request contains multiple sensitive file edits across various components of the Dojo application, including views, models, and utility files, with potential security considerations around password policy, privilege escalation in scan imports, and a supply chain risk in GitHub Actions configuration.

🔴 Configured Codepaths Edit in dojo/search/views.py
Vulnerability Configured Codepaths Edit
Description Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml.
🔴 Configured Codepaths Edit in dojo/templates/dojo/findings_list_snippet.html
Vulnerability Configured Codepaths Edit
Description Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml.
🔴 Configured Codepaths Edit in dojo/test/views.py
Vulnerability Configured Codepaths Edit
Description Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml.
🔴 Configured Codepaths Edit in dojo/utils.py
Vulnerability Configured Codepaths Edit
Description Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml.
🔴 Configured Codepaths Edit in dojo/api_v2/serializers.py
Vulnerability Configured Codepaths Edit
Description Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml.
🔴 Configured Codepaths Edit in dojo/db_migrations/0234_alter_system_settings_maximum_password_length_and_more.py
Vulnerability Configured Codepaths Edit
Description Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml.
🔴 Configured Codepaths Edit in dojo/endpoint/views.py
Vulnerability Configured Codepaths Edit
Description Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml.
🔴 Configured Codepaths Edit in dojo/engagement/views.py
Vulnerability Configured Codepaths Edit
Description Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml.
🔴 Configured Codepaths Edit in dojo/filters.py
Vulnerability Configured Codepaths Edit
Description Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml.
🔴 Configured Codepaths Edit in dojo/finding/queries.py
Vulnerability Configured Codepaths Edit
Description Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml.
🔴 Configured Codepaths Edit in dojo/finding/views.py
Vulnerability Configured Codepaths Edit
Description Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml.
🔴 Configured Codepaths Edit in dojo/finding_group/views.py
Vulnerability Configured Codepaths Edit
Description Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml.
🔴 Configured Codepaths Edit in dojo/forms.py
Vulnerability Configured Codepaths Edit
Description Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml.
🔴 Configured Codepaths Edit in dojo/importers/default_importer.py
Vulnerability Configured Codepaths Edit
Description Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml.
🔴 Configured Codepaths Edit in dojo/importers/default_reimporter.py
Vulnerability Configured Codepaths Edit
Description Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml.
🔴 Configured Codepaths Edit in dojo/importers/endpoint_manager.py
Vulnerability Configured Codepaths Edit
Description Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml.
🔴 Configured Codepaths Edit in dojo/models.py
Vulnerability Configured Codepaths Edit
Description Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml.
🔴 Configured Codepaths Edit in dojo/product/views.py
Vulnerability Configured Codepaths Edit
Description Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml.
🔴 Configured Codepaths Edit in dojo/product_type/views.py
Vulnerability Configured Codepaths Edit
Description Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml.
🔴 Configured Codepaths Edit in dojo/utils.py
Vulnerability Configured Codepaths Edit
Description Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml.
Weak Password Policy Configuration in dojo/db_migrations/0234_alter_system_settings_maximum_password_length_and_more.py
Vulnerability Weak Password Policy Configuration
Description The current maximum password length of 48 characters, while preventing some DoS attacks, is lower than modern security recommendations. OWASP, referencing NIST 800-63B, suggests a minimum of 64 characters to accommodate passphrases. For common hashing algorithms like bcrypt, a limit of 72 bytes is typical. The current limit unnecessarily restricts users from creating longer, more secure passphrases without a clear technical justification from the provided code snippets (e.g., database column size or hashing algorithm limitation).

# Generated by Django 5.1.8 on 2025-07-17 20:45
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dojo', '0233_remove_test_actual_time_remove_test_estimated_time'),
]
operations = [
migrations.AlterField(
model_name='system_settings',
name='maximum_password_length',
field=models.IntegerField(default=48, help_text='Requires user to set passwords less than maximum length.', validators=[django.core.validators.MinValueValidator(9), django.core.validators.MaxValueValidator(48)], verbose_name='Maximum password length'),
),
migrations.AlterField(
model_name='system_settings',
name='minimum_password_length',
field=models.IntegerField(default=9, help_text='Requires user to set passwords greater than minimum length.', validators=[django.core.validators.MinValueValidator(9), django.core.validators.MaxValueValidator(48)], verbose_name='Minimum password length'),
),
]

Privilege Escalation via Form Field in dojo/forms.py
Vulnerability Privilege Escalation via Form Field
Description The ReImportScanForm includes a close_old_findings field which, when set to True, causes the re-importer to close findings that are no longer present in the imported scan. The ReImportScanResultsView (which processes this form) only checks for Permissions.Import_Scan_Result. The API_Importer role has Permissions.Import_Scan_Result but does not have Permissions.Finding_Edit (which is required to close/mitigate findings). Therefore, a user with the API_Importer role could potentially upload a scan with close_old_findings enabled, effectively closing findings they are not authorized to close, leading to a privilege escalation.

label="Choose report file",
allow_empty_file=True,
required=False)
close_old_findings = forms.BooleanField(help_text="Select if old findings in the same test that are no longer present in the report get closed as mitigated when importing.",
required=False, initial=True)
version = forms.CharField(max_length=100, required=False, help_text="Version that will be set on existing Test object. Leave empty to leave existing value in place.")
branch_tag = forms.CharField(max_length=100, required=False, help_text="Branch or Tag that was scanned.")

Supply Chain Risk in .github/workflows/close-stale.yml
Vulnerability Supply Chain Risk
Description The use of actions/stale@v9 introduces a supply chain risk. While using third-party GitHub Actions is common, pinning to a mutable tag (@v9) means that the action's code can change without explicit review, potentially introducing vulnerabilities or malicious code. Best practices for GitHub Actions recommend pinning to a full commit SHA to ensure immutability and prevent unexpected changes. Additionally, the action is granted issues: write and pull-requests: write permissions, which are necessary for its intended functionality but represent a significant privilege. A compromise of the action or a malicious update could lead to unauthorized modifications of issues and pull requests in the repository. Although no specific vulnerabilities for actions/stale@v9 were found in the available databases, the general risk associated with mutable action versions and broad write permissions remains.

name: Close Stale Issues and PRs
on:
schedule:
# Run daily at 02:00 UTC
- cron: '0 2 * * *'
workflow_dispatch:
# Allow manual triggering
permissions:
issues: write
pull-requests: write
jobs:
close-stale:
runs-on: ubuntu-latest
steps:
- name: Close stale issues and PRs
uses: actions/stale@v9
with:
# Disable automatic stale marking - only close manually labeled items
days-before-stale: -1
days-before-close: 7
stale-issue-label: 'stale'
stale-pr-label: 'stale'
close-issue-message: 'This issue has been automatically closed because it was manually labeled as stale. If you believe this was closed in error, please reopen it and remove the stale label.'
close-pr-message: 'This PR has been automatically closed because it was manually labeled as stale. If you believe this was closed in error, please reopen it and remove the stale label.'

We've notified @mtesauro.


All finding details can be found in the DryRun Security Dashboard.

Copy link
Contributor Author

Conflicts have been resolved. A maintainer will review the pull request shortly.

@github-actions github-actions bot added New Migration Adding a new migration file. Take care when merging. settings_changes Needs changes to settings.py based on changes in settings.dist.py included in this PR apiv2 conflicts-detected docs unittests ui and removed conflicts-detected labels Jul 21, 2025
Copy link
Contributor Author

Conflicts have been resolved. A maintainer will review the pull request shortly.

@Maffooch Maffooch merged commit dae9299 into dev Jul 21, 2025
88 checks passed
@Maffooch Maffooch deleted the master-into-dev/2.48.2-2.49.0-dev branch July 21, 2025 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apiv2 docs helm New Migration Adding a new migration file. Take care when merging. parser settings_changes Needs changes to settings.py based on changes in settings.dist.py included in this PR ui unittests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants