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

Django AuditLog: Upgrade to 3.x #11592

Merged
merged 12 commits into from
Jan 31, 2025
Merged

Django AuditLog: Upgrade to 3.x #11592

merged 12 commits into from
Jan 31, 2025

Conversation

Maffooch
Copy link
Contributor

@Maffooch Maffooch commented Jan 17, 2025

django-auditlog has a new version that will make filtering and other things more efficient

[sc-5527]

@github-actions github-actions bot added settings_changes Needs changes to settings.py based on changes in settings.dist.py included in this PR docs ui labels Jan 17, 2025
Copy link

dryrunsecurity bot commented Jan 17, 2025

DryRun Security Summary

The pull request implements various security-focused improvements to the DefectDojo application, including optimized GitHub Actions workflows, enhanced deduplication logic, better false positive handling, updated audit logging, and general bug fixes, all aimed at improving the application's ability to track and manage security-related data.

Expand for full summary

Summary:

The code changes in this pull request cover a wide range of updates to the DefectDojo application, primarily focused on improving the application's security-related functionality, such as the handling of duplicate findings, false positive history, and GitHub Actions workflows.

The key security-related changes include:

  1. Optimizations to the GitHub Actions workflows, including the use of the --no-deps flag to start only the necessary services, which can help improve the reliability and efficiency of the testing process.
  2. Improvements to the deduplication logic, including the introduction of a new _copy_model_util function and updates to the Finding model to calculate and store a hash code for better deduplication.
  3. Enhancements to the handling of false positive findings, including the ability to propagate the false positive status across related findings, tests, and engagements.
  4. Updates to the audit log functionality, including the migration to a more structured JSON format and the introduction of new configuration settings.
  5. Miscellaneous bug fixes and code cleanups, such as the removal of legacy helper scripts and the diversification of disclaimer fields.

From an application security perspective, these changes generally appear to be positive, as they focus on improving the security-related features and functionality of the DefectDojo application. The changes to the deduplication logic, false positive handling, and audit log management are particularly noteworthy, as they can have a direct impact on the application's ability to accurately track and manage security-related data.

However, as with any code changes, it's important to thoroughly review and test the implementation to ensure that no new security vulnerabilities are introduced. Additionally, the application's overall security posture should be regularly assessed, including aspects such as input validation, authentication, authorization, and secure coding practices.

Files Changed:

  1. .github/workflows/rest-framework-tests.yml, .github/workflows/integration-tests.yml, and .github/workflows/fetch-oas.yml: These files contain updates to the GitHub Actions workflows, primarily focused on optimizing the startup of Docker Compose services during the testing process.
  2. docs/content/en/open_source/upgrading/2.43.md: This file contains information about the changes introduced in version 2.43 of the DefectDojo application, including the audit log migration, the removal of legacy helper scripts, and the diversification of disclaimer fields.
  3. requirements.txt: This file updates the django-auditlog package from version 2.3.0 to 3.0.0.
  4. dojo/templatetags/display_tags.py: This file includes a security-focused change to use the literal_eval function instead of json.loads when parsing the value string in the action_log_entry filter.
  5. dojo/settings/settings.dist.py: This file includes changes to the audit log and other settings that could have security implications and should be reviewed carefully.
  6. unittests/test_copy_model.py, dojo/models.py, unittests/test_duplication_loops.py, unittests/test_deduplication_logic.py, unittests/test_utils_deduplication_reopen.py, and unittests/test_false_positive_history_logic.py: These files contain changes and additions to the test suite, focusing on the deduplication, false positive handling, and related functionality of the application.

Code Analysis

We ran 9 analyzers against 13 files and 1 analyzer had findings. 8 analyzers had no findings.

Analyzer Findings
Sensitive Files Analyzer 1 finding

View PR in the DryRun Dashboard.

@github-actions github-actions bot removed the parser label Jan 17, 2025
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

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

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

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

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.

@Maffooch
Copy link
Contributor Author

These tests run and pass locally... Closing and reopening

@Maffooch Maffooch closed this Jan 30, 2025
@Maffooch Maffooch reopened this Jan 30, 2025
@Maffooch Maffooch merged commit 06596fc into DefectDojo:dev Jan 31, 2025
73 checks passed
@Maffooch Maffooch deleted the audit-log branch January 31, 2025 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs 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