Skip to content
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

feat(django): Upgrade to 5.0 #10409

Merged
merged 5 commits into from
Aug 6, 2024
Merged

feat(django): Upgrade to 5.0 #10409

merged 5 commits into from
Aug 6, 2024

Conversation

kiblik
Copy link
Contributor

@kiblik kiblik commented Jun 15, 2024

We released 4.2 so we can start migration to 5.0

Needs to be considered: https://docs.djangoproject.com/en/5.0/releases/5.0

Needs to be fixed (to be able to upgrade)

Post upgrade improvements (new useful features):

Copy link

dryrunsecurity bot commented Jun 15, 2024

Hi there 👋, @DryRunSecurity here, below is a summary of our analysis and findings.

DryRun Security Status Findings
Configured Codepaths Analyzer 0 findings
Server-Side Request Forgery Analyzer 0 findings
Sensitive Files Analyzer 1 finding
IDOR Analyzer 0 findings
SQL Injection Analyzer 0 findings
Authn/Authz Analyzer 0 findings
Secrets Analyzer 0 findings

Note

🟢 Risk threshold not exceeded.

Change Summary (click to expand)

The following is a summary of changes in this pull request made by me, your security buddy 🤖. Note that this summary is auto-generated and not meant to be a definitive list of security issues but rather a helpful summary from a security perspective.

Summary:

The code changes in this pull request primarily focus on updating the dependencies and configurations for the DefectDojo application. The key changes include:

  1. Updating the Django version from 4.2.13 to 5.0.6, which is a significant version jump and requires careful review of the release notes and changelogs to understand any potential security-related changes or improvements.
  2. Updating the django-multiselectfield library to the latest stable version, which is a positive change to benefit from bug fixes and security improvements.
  3. Replacing the outdated django-tagging library with a direct reference to the newer django-tagging repository on GitHub, indicating a move towards a more secure solution.
  4. Adding new dependencies, such as drf-spectacular, django-ratelimit, and argon2-cffi, which should be reviewed to ensure they are legitimate and necessary for the application, and that they do not introduce any known security vulnerabilities.
  5. Adding Celery-related dependencies, which suggests the application is using asynchronous task processing. This functionality should be reviewed for any potential security implications, such as ensuring that tasks are properly validated and authorized.
  6. Including the cryptography library, which indicates that the application is handling sensitive data and utilizing cryptographic functions. The specific use cases and implementation details should be reviewed to ensure that the cryptography is being used correctly and securely.

Files Changed:

  1. dojo/settings/settings.dist.py: This file is the default settings file for the DefectDojo application. The change sets the FORMS_URLFIELD_ASSUME_HTTPS setting to True to address a warning related to the default scheme for URLField in Django 6.0. This change does not directly impact the security of the application but is a good practice to keep the application's dependencies and configurations up-to-date.
  2. dojo/settings/.settings.dist.py.sha256sum: This file is a checksum file for the settings.dist.py configuration file. The change updates the checksum value, indicating that the settings.dist.py file has been modified. Verifying the integrity of configuration files through checksum validation is a good security practice.
  3. requirements.txt: This file contains the list of dependencies for the DefectDojo application. The changes include updating the Django version, replacing the django-tagging library, adding new dependencies, and including Celery-related and cryptography-related dependencies. These changes should be reviewed carefully to ensure they do not introduce any security vulnerabilities.

Powered by DryRun Security

@github-actions github-actions bot added the settings_changes Needs changes to settings.py based on changes in settings.dist.py included in this PR label Jun 15, 2024
@kiblik kiblik force-pushed the django_5.0 branch 2 times, most recently from 63d67e4 to 505e404 Compare June 15, 2024 11:45
Copy link
Contributor

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

Copy link
Contributor

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

@kiblik kiblik closed this Jun 17, 2024
@kiblik kiblik reopened this Jun 17, 2024
Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

github-actions bot commented Jul 3, 2024

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

Copy link
Contributor

github-actions bot commented Jul 3, 2024

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

@kiblik kiblik marked this pull request as ready for review July 4, 2024 20:00
Copy link
Contributor

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

Copy link
Contributor

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

requirements.txt Outdated Show resolved Hide resolved
Copy link
Contributor

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

@kiblik kiblik force-pushed the django_5.0 branch 2 times, most recently from b7c8b5e to 074e99a Compare July 16, 2024 11:08
Copy link
Contributor

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

Copy link
Contributor

github-actions bot commented Aug 2, 2024

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

Copy link
Contributor

github-actions bot commented Aug 4, 2024

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

Copy link
Contributor

@mtesauro mtesauro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@mtesauro mtesauro merged commit 42722af into DefectDojo:dev Aug 6, 2024
73 checks passed
@kiblik kiblik deleted the django_5.0 branch August 6, 2024 15:58
dogboat pushed a commit to dogboat/django-DefectDojo that referenced this pull request Aug 8, 2024
* feat(django): Upgrade to 5.0

* Remove obsolete code

* Fix RemovedInDjango60Warning for FORMS_URLFIELD_ASSUME_HTTPS

* fix(multiselectfield): Use original repo

* Upgrade to 5.0.8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
settings_changes Needs changes to settings.py based on changes in settings.dist.py included in this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants