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): preload django app #10138

Merged
merged 4 commits into from
May 31, 2024

Conversation

sebglon
Copy link
Contributor

@sebglon sebglon commented May 7, 2024

Description

Pre-load Django app before wsgi start listening http queries
#10137

Test results

Ideally you extend the test suite in tests/ and dojo/unittests to cover the changed in this PR.
Alternatively, describe what you have and haven't tested.

Documentation

Please update any documentation when needed in the documentation folder)

Checklist

This checklist is for your information.

  • Make sure to rebase your PR against the very latest dev.
  • Features/Changes should be submitted against the dev.
  • Bugfixes should be submitted against the bugfix branch.
  • Give a meaningful name to your PR, as it may end up being used in the release notes.
  • Your code is flake8 compliant.
  • Your code is python 3.11 compliant.
  • If this is a new feature and not a bug fix, you've included the proper documentation in the docs at https://github.com/DefectDojo/django-DefectDojo/tree/dev/docs as part of this PR.
  • Model changes must include the necessary migrations in the dojo/db_migrations folder.
  • Add applicable tests to the unit tests.
  • Add the proper label to categorize your PR.

Copy link

dryrunsecurity bot commented May 7, 2024

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

DryRun Security Status Findings
Configured Codepaths Analyzer 0 findings
Sensitive Files Analyzer 0 findings
AppSec Analyzer 0 findings
Authn/Authz Analyzer 1 finding
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 change in the wsgi.py file is related to the Django web framework application and is focused on preloading the application code by preloading the URLs configuration. This change is primarily a performance optimization and does not introduce any obvious security vulnerabilities.

While the change itself does not raise any immediate security concerns, it's important to ensure that the overall application is properly secured. This includes reviewing the URLs configuration and the application's routes and views to ensure that user input is properly handled, appropriate access controls are in place, and best practices for secure web application development are followed. Additionally, it's crucial to monitor the application for any potential security issues that may arise due to changes in the codebase or external dependencies.

Files Changed:

  • wsgi.py: This file is part of the Django web framework application and is responsible for the Web Server Gateway Interface (WSGI) configuration. The changes in this file preload the application code by preloading the URLs configuration, which can help improve the performance of the application. The changes include importing the necessary modules and adding a line to preload the URLs configuration.

Powered by DryRun Security

@sebglon sebglon changed the base branch from master to dev May 7, 2024 10:05
Copy link
Contributor

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

DefectDojo and others added 2 commits May 14, 2024 09:12
Signed-off-by: DefectDojo <defectdojo-project@owasp.org>
Copy link
Contributor

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

@cneill cneill merged commit 3a6aaa8 into DefectDojo:dev May 31, 2024
123 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants