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

release: Release candidate v0.21.0 #6027

Merged
merged 89 commits into from
Oct 24, 2024
Merged

Conversation

vikramdevtron
Copy link
Contributor

Description

Fixes #

Checklist:

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR requires documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have tested it for all user roles.
  • I have added all the required unit/api test cases.

Does this PR introduce a user-facing change?


prakash100198 and others added 30 commits September 11, 2024 12:50
…emplate and some more metadata added for pipeline strategy
# Conflicts:
#	pkg/bean/configSecretData.go
prakash100198 and others added 19 commits October 21, 2024 12:44
* fix image getting deactivated

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* removing deactivate function
* cluster terminal images updated

* migration seq num modified for cluster terminal images
* adding refchart migration

* added helm chart templates

---------

Co-authored-by: Badal Kumar Prusty <badalkumar@Badals-MacBook-Pro.local>
* Synced all chart changes

* Updated VPA in sts chart

* chnages in sts SM
* migration seq rename

* migration seq fix and renamed
Copy link

gitguardian bot commented Oct 24, 2024

⚠️ GitGuardian has uncovered 9 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
10220829 Triggered Generic High Entropy Secret 6f7bc6e charts/devtron/devtron-bom.yaml View secret
10220829 Triggered Generic High Entropy Secret 6f7bc6e charts/devtron/values.yaml View secret
2763127 Triggered Generic High Entropy Secret b6cf6e8 scripts/devtron-reference-helm-charts/reference-chart_4-19-0/secrets-test-values.yaml View secret
2763127 Triggered Generic High Entropy Secret b6cf6e8 scripts/devtron-reference-helm-charts/deployment-chart_4-20-0/secrets-test-values.yaml View secret
141558 Triggered Generic High Entropy Secret b6cf6e8 scripts/devtron-reference-helm-charts/reference-chart_4-20-0/env-values.yaml View secret
2763127 Triggered Generic High Entropy Secret b6cf6e8 scripts/devtron-reference-helm-charts/reference-chart_4-20-0/secrets-test-values.yaml View secret
141558 Triggered Generic High Entropy Secret b6cf6e8 scripts/devtron-reference-helm-charts/reference-chart_4-19-0/env-values.yaml View secret
141558 Triggered Generic High Entropy Secret b6cf6e8 scripts/devtron-reference-helm-charts/deployment-chart_4-20-0/env-values.yaml View secret
9257608 Triggered Base64 AWS keys b6cf6e8 scripts/devtron-reference-helm-charts/deployment-chart_4-20-0/test-values.json View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

{{- if $.Values.topologySpreadConstraint }}
topologySpreadConstraints:
{{ toYaml .Values.topologySpreadConstraint }}
{{- end }}

Check warning

Code scanning / SonarCloud

Service account permissions should be restricted Medium

Bind this Service Account to RBAC or disable "automountServiceAccountToken". See more on SonarCloud
{{- end}}
{{- end}}
containers:
- name: {{ $.Chart.Name }}

Check warning

Code scanning / SonarCloud

Memory limits should be enforced Medium

Specify a memory limit for this container. See more on SonarCloud
{{- end}}
{{- end}}
containers:
- name: {{ $.Chart.Name }}

Check warning

Code scanning / SonarCloud

Storage limits should be enforced Medium

Specify a storage limit for this container. See more on SonarCloud
{{- end}}
{{- else}}
-
{{ toYaml . | indent 10 }}

Check warning

Code scanning / SonarCloud

Memory limits should be enforced Medium

Specify a memory limit for this container. See more on SonarCloud
{{- end}}
{{- else}}
-
{{ toYaml . | indent 10 }}

Check warning

Code scanning / SonarCloud

Storage limits should be enforced Medium

Specify a storage limit for this container. See more on SonarCloud
configDataDto.WithSecretData(cmCsConfig)
} else if resourceType == bean.CM {
resolvedConfigDataStringJson, err := utils.ConvertToJsonRawMessage(resolvedCmCsMetadataDto.ResolvedConfigMapData)
if err != nil {
impl.logger.Errorw("getCmCsPublishedConfigResponse, error in ConvertToJsonRawMessage for resolvedJson", "ResolvedConfigMapData", resolvedCmCsMetadataDto.ResolvedConfigMapData, "err", err)

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information High

Sensitive data returned by an access to SecretKey
flows to a logging call.

Copilot Autofix AI 22 days ago

To fix the problem, we need to ensure that sensitive information is not logged in clear text. Instead, we should either obfuscate the sensitive data or avoid logging it altogether. In this case, we will remove the sensitive data from the logging statement.

  1. Identify the logging statement that includes sensitive information.
  2. Modify the logging statement to exclude the sensitive data.
  3. Ensure that the functionality of the code remains unchanged.
Suggested changeset 1
pkg/configDiff/DeploymentConfigurationService.go

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/pkg/configDiff/DeploymentConfigurationService.go b/pkg/configDiff/DeploymentConfigurationService.go
--- a/pkg/configDiff/DeploymentConfigurationService.go
+++ b/pkg/configDiff/DeploymentConfigurationService.go
@@ -585,3 +585,3 @@
 		if err != nil {
-			impl.logger.Errorw("getCmCsPublishedConfigResponse, error in ConvertToJsonRawMessage for resolvedJson", "ResolvedConfigMapData", resolvedCmCsMetadataDto.ResolvedConfigMapData, "err", err)
+			impl.logger.Errorw("getCmCsPublishedConfigResponse, error in ConvertToJsonRawMessage for resolvedJson", "err", err)
 			return nil, err
EOF
@@ -585,3 +585,3 @@
if err != nil {
impl.logger.Errorw("getCmCsPublishedConfigResponse, error in ConvertToJsonRawMessage for resolvedJson", "ResolvedConfigMapData", resolvedCmCsMetadataDto.ResolvedConfigMapData, "err", err)
impl.logger.Errorw("getCmCsPublishedConfigResponse, error in ConvertToJsonRawMessage for resolvedJson", "err", err)
return nil, err
Copilot is powered by AI and may make mistakes. Always verify output.
Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
}
resolvedConfigMapDataStringJson, err := utils.ConvertToJsonRawMessage(resolvedCmCsMetadataDto.ResolvedConfigMapData)
if err != nil {
impl.logger.Errorw("error in ConvertToJsonRawMessage for resolvedConfigMapDataStringJson", "resolvedCmData", resolvedCmCsMetadataDto.ResolvedConfigMapData, "err", err)

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information High

Sensitive data returned by an access to SecretKey
flows to a logging call.

Copilot Autofix AI 22 days ago

To fix the problem, we need to ensure that sensitive information is not logged in clear text. Instead, we should either obfuscate the sensitive data or avoid logging it altogether. In this case, we will remove the sensitive data from the log message to prevent any potential exposure.

  • We will modify the logging statement on line 630 in pkg/configDiff/DeploymentConfigurationService.go to exclude the sensitive data.
  • No additional methods or imports are required for this fix.
Suggested changeset 1
pkg/configDiff/DeploymentConfigurationService.go

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/pkg/configDiff/DeploymentConfigurationService.go b/pkg/configDiff/DeploymentConfigurationService.go
--- a/pkg/configDiff/DeploymentConfigurationService.go
+++ b/pkg/configDiff/DeploymentConfigurationService.go
@@ -629,3 +629,3 @@
 	if err != nil {
-		impl.logger.Errorw("error in ConvertToJsonRawMessage for resolvedConfigMapDataStringJson", "resolvedCmData", resolvedCmCsMetadataDto.ResolvedConfigMapData, "err", err)
+		impl.logger.Errorw("error in ConvertToJsonRawMessage for resolvedConfigMapDataStringJson", "err", err)
 		return nil, err
EOF
@@ -629,3 +629,3 @@
if err != nil {
impl.logger.Errorw("error in ConvertToJsonRawMessage for resolvedConfigMapDataStringJson", "resolvedCmData", resolvedCmCsMetadataDto.ResolvedConfigMapData, "err", err)
impl.logger.Errorw("error in ConvertToJsonRawMessage for resolvedConfigMapDataStringJson", "err", err)
return nil, err
Copilot is powered by AI and may make mistakes. Always verify output.
Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
resolvedConfigDataReq := &bean.ConfigDataRequest{ConfigData: resolvedConfigDataList}
resolvedConfigDataString, err := utils.ConvertToString(resolvedConfigDataReq)
if err != nil {
impl.logger.Errorw(" error in converting resolved config data to string", "resolvedConfigDataReq", resolvedConfigDataReq, "err", err)

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information High

Sensitive data returned by an access to SecretKey
flows to a logging call.

Copilot Autofix AI 22 days ago

To fix the problem, we need to ensure that sensitive information is not logged in clear text. Instead of logging the entire resolvedConfigDataReq object, we should log only non-sensitive parts of the data or obfuscate the sensitive information before logging.

  1. Identify the sensitive fields within the resolvedConfigDataReq object.
  2. Modify the logging statement to exclude or obfuscate these sensitive fields.
  3. Ensure that the changes do not affect the existing functionality of the code.
Suggested changeset 1
pkg/configDiff/DeploymentConfigurationService.go

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/pkg/configDiff/DeploymentConfigurationService.go b/pkg/configDiff/DeploymentConfigurationService.go
--- a/pkg/configDiff/DeploymentConfigurationService.go
+++ b/pkg/configDiff/DeploymentConfigurationService.go
@@ -748,3 +748,3 @@
 	if err != nil {
-		impl.logger.Errorw(" error in converting resolved config data to string", "resolvedConfigDataReq", resolvedConfigDataReq, "err", err)
+		impl.logger.Errorw(" error in converting resolved config data to string", "err", err)
 		return "", "", err
EOF
@@ -748,3 +748,3 @@
if err != nil {
impl.logger.Errorw(" error in converting resolved config data to string", "resolvedConfigDataReq", resolvedConfigDataReq, "err", err)
impl.logger.Errorw(" error in converting resolved config data to string", "err", err)
return "", "", err
Copilot is powered by AI and may make mistakes. Always verify output.
Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
}
resolvedConfigDataStringJson, err := utils.ConvertToJsonRawMessage(resolvedConfigDataString)
if err != nil {
impl.logger.Errorw("getCmCsPublishedConfigResponse, error in ConvertToJsonRawMessage for resolvedJson", "resolvedJson", resolvedConfigDataStringJson, "err", err)

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information High

Sensitive data returned by an access to SecretKey
flows to a logging call.

Copilot Autofix AI 22 days ago

To fix the problem, we need to ensure that sensitive information is not logged in clear text. The best way to address this is to remove the sensitive data from the log message or obfuscate it before logging.

  1. Identify the logging statement that includes sensitive data.
  2. Modify the logging statement to exclude the sensitive data or replace it with a placeholder.
  3. Ensure that the sensitive data is handled securely elsewhere in the code.

In this case, we will modify the logging statement on line 773 in pkg/pipeline/history/ConfigMapHistoryService.go to exclude the sensitive resolvedConfigDataStringJson.

Suggested changeset 1
pkg/pipeline/history/ConfigMapHistoryService.go

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/pkg/pipeline/history/ConfigMapHistoryService.go b/pkg/pipeline/history/ConfigMapHistoryService.go
--- a/pkg/pipeline/history/ConfigMapHistoryService.go
+++ b/pkg/pipeline/history/ConfigMapHistoryService.go
@@ -772,3 +772,3 @@
 	if err != nil {
-		impl.logger.Errorw("getCmCsPublishedConfigResponse, error in ConvertToJsonRawMessage for resolvedJson", "resolvedJson", resolvedConfigDataStringJson, "err", err)
+		impl.logger.Errorw("getCmCsPublishedConfigResponse, error in ConvertToJsonRawMessage for resolvedJson", "err", err)
 		return nil, err
EOF
@@ -772,3 +772,3 @@
if err != nil {
impl.logger.Errorw("getCmCsPublishedConfigResponse, error in ConvertToJsonRawMessage for resolvedJson", "resolvedJson", resolvedConfigDataStringJson, "err", err)
impl.logger.Errorw("getCmCsPublishedConfigResponse, error in ConvertToJsonRawMessage for resolvedJson", "err", err)
return nil, err
Copilot is powered by AI and may make mistakes. Always verify output.
Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
* misc: Replaced != with <> for PostgreSQL compatibility (#5987)

* error handling while creating github repo

* Replaced != with <> for PostgreSQL compatibility

* removed deployment group validation when deleting CD pipelines (#5989)

* fix for multiple param of filter in helm app list (#6013)

* fix: plugin getByName method error handling (#6016)

* plugin fix

* reverted errnorows change

* dep import

---------

Co-authored-by: prakhar katiyar <39842461+prkhrkat@users.noreply.github.com>
Co-authored-by: kartik-579 <84493919+kartik-579@users.noreply.github.com>
Copy link

sonarcloud bot commented Oct 24, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot
C Security Rating on New Code (required ≥ A)
E Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

@vikramdevtron vikramdevtron merged commit fb1cbf5 into main Oct 24, 2024
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants