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

Remove MySQL and RabbitMQ #10661

Merged
merged 25 commits into from
Aug 3, 2024
Merged

Remove MySQL and RabbitMQ #10661

merged 25 commits into from
Aug 3, 2024

Conversation

Maffooch
Copy link
Contributor

@Maffooch Maffooch commented Jul 31, 2024

Following the deprecation of MySQL and RabbitMQ (see discussion post here), it is now time for removal. The following places have been touched:

  • Unit tests
    • Remove matrix values for testing mysql/rabbitmq
    • Remove the --profile flag from other tests using dc- helper scripts
  • Simplify docker compose to remove the need for profiles
  • Remove all docker profile environments
    • This includes setting default values in the compose file for all Postgres/redis related env vars
  • Clean up the docs to remove suggestions that mysql/rabbitmq are supported/configurable
  • Remove mysql/rabbitmq traces from the helm chart
  • Add breaking changes to 2.37.0 release notes

[sc-7056]

@github-actions github-actions bot added docker settings_changes Needs changes to settings.py based on changes in settings.dist.py included in this PR docs helm labels Jul 31, 2024
Copy link

dryrunsecurity bot commented Jul 31, 2024

DryRun Security Summary

The pull request includes a wide range of updates to the DefectDojo application's infrastructure, focusing on improving the development, testing, and deployment processes, while ensuring security best practices are followed.

Expand for full summary

Summary:

The code changes in this pull request cover a wide range of updates to the DefectDojo application's infrastructure, including GitHub workflows, Docker Compose configurations, and various utility scripts. The changes are primarily focused on improving the application's development, testing, and deployment processes, with a focus on simplifying the configuration, optimizing the test environments, and aligning with the latest Docker Compose functionality.

From an application security perspective, the changes do not introduce any obvious security concerns. The updates appear to be well-designed and follow security best practices, such as the removal of unnecessary dependencies, the use of environment variables for configuration, and the implementation of robust error handling and input validation. However, it's important to review the entire codebase and configuration to ensure that there are no potential security vulnerabilities or misconfigurations that could be introduced.

Files Changed:

  1. GitHub Workflows:

    • .github/workflows/fetch-oas.yml: Updates the workflow for fetching OpenAPI Specifications (OAS) from a running DefectDojo instance.
    • .github/workflows/integration-tests.yml: Simplifies the workflow for running integration tests.
    • .github/workflows/k8s-tests.yml: Updates the workflow for deploying the application on a Kubernetes cluster.
    • .github/workflows/rest-framework-tests.yml: Simplifies the workflow for running unit tests on the Django Rest Framework.
  2. Docker Compose Configuration:

    • docker-compose.yml: Simplifies the configuration by removing unnecessary services and using environment variables for configuration.
    • Various docker-compose.override.*.yml files: Updates the configuration for different environments, such as development, unit tests, and integration tests.
  3. Utility Scripts:

    • dc-down.sh, dc-stop.sh, dc-integration-tests.sh, dc-unittest.sh, dc-up-d.sh, dc-up.sh: Updates the scripts responsible for managing the Docker Compose environment.
    • docker/setEnv.sh: Improves the management of different application environments.
    • docker/entrypoint-unit-tests-devDocker.sh, docker/entrypoint-unit-tests.sh: Updates the scripts responsible for running unit tests in the Docker environment.
  4. Other Files:

    • Dockerfile.django-debian, Dockerfile.django-alpine, Dockerfile.nginx-alpine, Dockerfile.nginx-debian: Updates the Dockerfiles for the application's components.
    • NOTICE: Updates the NOTICE file with the latest third-party dependencies and their licenses.

Code Analysis

We ran 9 analyzers against 30 files and 0 analyzers had findings. 9 analyzers had no findings.

Riskiness

🟢 Risk threshold not exceeded.

View PR in the DryRun Dashboard.

@Maffooch Maffooch marked this pull request as draft July 31, 2024 18:48
@Maffooch
Copy link
Contributor Author

Converting to draft until I get to the bottom of rest test framework failures

docker-compose.yml Dismissed Show dismissed Hide dismissed
docker-compose.yml Dismissed Show dismissed Hide dismissed
docker-compose.yml Dismissed Show dismissed Hide dismissed
docker-compose.yml Dismissed Show dismissed Hide dismissed
@Maffooch Maffooch marked this pull request as ready for review August 2, 2024 02:35
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
Collaborator

@hblankenship hblankenship left a comment

Choose a reason for hiding this comment

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

I note that there is a comment from gitbot regarding the following:

Check warning on line 461 in helm/defectdojo/values.yaml

GitHub Actions
/ Lint chart

461:12 [truthy] truthy value should be one of [false, true]

Copy link
Contributor

@cneill cneill left a comment

Choose a reason for hiding this comment

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

A few comments on this one, and a couple files that weren't totally purged of MySQL/RabbitMQ references yet:

There are some other comments about MySQL-specific behavior scattered in some other files but we can worry about that later - I don't think it will hurt anything to leave them alone for now.

Dockerfile.django-debian Outdated Show resolved Hide resolved
Dockerfile.django-debian Outdated Show resolved Hide resolved
Dockerfile.nginx-alpine Outdated Show resolved Hide resolved
Dockerfile.nginx-debian Outdated Show resolved Hide resolved
docs/content/en/getting_started/upgrading/2.37.md Outdated Show resolved Hide resolved
dc-up.sh Outdated Show resolved Hide resolved
dc-unittest.sh Show resolved Hide resolved
dc-up-d.sh Show resolved Hide resolved
docker-compose.yml Outdated Show resolved Hide resolved
docs/content/en/getting_started/architecture.md Outdated Show resolved Hide resolved
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.

@Maffooch
Copy link
Contributor Author

Maffooch commented Aug 2, 2024

I would really rather not touch these to be honest 😅 @cneill

@cneill
Copy link
Contributor

cneill commented Aug 2, 2024

I would really rather not touch these to be honest 😅 @cneill

No problem, just thought I'd mention them since ~everything else is cleaned up and we might forget about them. But we're probably already doing enough with this PR.

Copy link
Contributor

github-actions bot commented Aug 2, 2024

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

Copy link

sonarqubecloud bot commented Aug 3, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
3 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@mtesauro mtesauro merged commit e2f4445 into DefectDojo:dev Aug 3, 2024
74 checks passed
@Maffooch Maffooch deleted the mysql branch August 6, 2024 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apiv2 docker docs helm maintenance settings_changes Needs changes to settings.py based on changes in settings.dist.py included in this PR unittests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants