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

[Helm] Fix typo in ingress netpol #10869

Closed

Conversation

C4tWithShell
Copy link
Contributor

No description provided.

C4tWithShell and others added 17 commits August 6, 2024 15:55
….38.0-2.39.0-dev

Release: Merge back 2.38.0 into dev from: master-into-dev/2.38.0-2.39.0-dev
…ackage.json) (DefectDojo#10834)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Bumps [boto3](https://github.com/boto/boto3) from 1.35.9 to 1.35.10.
- [Release notes](https://github.com/boto/boto3/releases)
- [Commits](boto/boto3@1.35.9...1.35.10)

---
updated-dependencies:
- dependency-name: boto3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [boto3](https://github.com/boto/boto3) from 1.35.10 to 1.35.11.
- [Release notes](https://github.com/boto/boto3/releases)
- [Commits](boto/boto3@1.35.10...1.35.11)

---
updated-dependencies:
- dependency-name: boto3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [cryptography](https://github.com/pyca/cryptography) from 43.0.0 to 43.0.1.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](pyca/cryptography@43.0.0...43.0.1)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) from 2.0.32 to 2.0.33.
- [Release notes](https://github.com/sqlalchemy/sqlalchemy/releases)
- [Changelog](https://github.com/sqlalchemy/sqlalchemy/blob/main/CHANGES.rst)
- [Commits](https://github.com/sqlalchemy/sqlalchemy/commits)

---
updated-dependencies:
- dependency-name: sqlalchemy
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ackage.json) (DefectDojo#10860)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Bumps [django-tagulous](https://github.com/radiac/django-tagulous) from 1.3.3 to 2.1.0.
- [Changelog](https://github.com/radiac/django-tagulous/blob/main/docs/changelog.rst)
- [Commits](radiac/django-tagulous@v1.3.3...v2.1.0)

---
updated-dependencies:
- dependency-name: django-tagulous
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [jquery-ui](https://github.com/jquery/jquery-ui) from 1.13.3 to 1.14.0.
- [Release notes](https://github.com/jquery/jquery-ui/releases)
- [Commits](jquery/jquery-ui@1.13.3...1.14.0)

---
updated-dependencies:
- dependency-name: jquery-ui
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@github-actions github-actions bot added the helm label Sep 5, 2024
Copy link

dryrunsecurity bot commented Sep 5, 2024

DryRun Security Summary

The provided patch updates the network policy configuration for the DefectDojo application in a Kubernetes environment, including correcting the ingress condition, enabling the network policy based on the networkPolicy.enabled value, and defining separate network policies for the application and the Django component to enhance application security.

Expand for full summary

Summary:

The code change in the provided patch is related to the network policy configuration for the DefectDojo application in a Kubernetes environment. The key changes include:

  1. Correcting the condition for the ingress configuration in the network policy.
  2. Enabling the network policy when the networkPolicy.enabled value is set to true.
  3. Defining a network policy that matches the pods with the label app.kubernetes.io/instance: {{ .Release.Name }} and configures the ingress and egress traffic based on the networkPolicy.ingress and networkPolicy.egress settings.
  4. Defining a separate network policy for the Django component of the DefectDojo application, which allows traffic to the Django component on the appropriate port (8443 if TLS is enabled, 8080 otherwise).

From an application security perspective, the network policy implementation is a good security practice as it helps restrict the network traffic to and from the DefectDojo application, reducing the attack surface. The separate network policy for the Django component allows for more granular control over the traffic to the different components of the application. It is important to ensure that the networkPolicy.ingress and networkPolicy.egress configurations are properly defined to allow the necessary traffic while restricting unnecessary access. The use of Kubernetes network policies is a recommended security practice, as it helps to implement the principle of least privilege and reduce the risk of unauthorized access to the application.

Files Changed:

  • helm/defectdojo/templates/network-policy.yaml: This file contains the network policy configuration for the DefectDojo application in a Kubernetes environment. The changes include correcting the condition for the ingress configuration, enabling the network policy based on the networkPolicy.enabled value, and defining the network policy for the application and the Django component.

Code Analysis

We ran 9 analyzers against 1 file and 0 analyzers had findings. 9 analyzers had no findings.

Riskiness

🟢 Risk threshold not exceeded.

View PR in the DryRun Dashboard.

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

@Maffooch Maffooch changed the base branch from dev to bugfix September 9, 2024 14:25
@Maffooch Maffooch changed the base branch from bugfix to dev September 9, 2024 14:25
@kiblik
Copy link
Contributor

kiblik commented Sep 12, 2024

Hi. Is it possible to merge this into bugfix, please?
I know it will need rebase but it would be nice to have it available.

@C4tWithShell C4tWithShell changed the base branch from dev to bugfix September 12, 2024 08:41
@C4tWithShell
Copy link
Contributor Author

Hi. Is it possible to merge this into bugfix, please? I know it will need rebase but it would be nice to have it available.

Sure, but I will create new PR. Will send a link here

@C4tWithShell
Copy link
Contributor Author

@kiblik @cneill @Maffooch @mtesauro
New PR to bugfix - #10898

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants