Skip to content

Release/v3.0.0 #652

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

Merged
merged 153 commits into from
Jun 11, 2025
Merged

Release/v3.0.0 #652

merged 153 commits into from
Jun 11, 2025

Conversation

mms-gianni
Copy link
Member

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Template (non-breaking change which adds a template)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • I've built the image and tested it on a kubernetes cluster

Test Configuration:

  • Operator Version:
  • Kubernetes Version:
  • Kubero CLI Version (if applicable):

Checklist:

  • I removed unnecessary debug logs
  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I documented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

res.send(template);
} catch (err) {
this.logger.error(err);
res.status(500).send(err);

Check warning

Code scanning / CodeQL

Exception text reinterpreted as HTML Medium

Exception text
is reinterpreted as HTML without escaping meta-characters.

Copilot Autofix

AI 2 days ago

To fix the issue, we need to ensure that error messages sent in the HTTP response are sanitized or replaced with a generic error message. This prevents any user-controlled input from being reflected back to the client in an unsafe manner.

  1. Replace the direct use of err in the response with a generic error message, such as "An internal server error occurred."
  2. Log the full error details on the server side for debugging purposes, but do not expose them to the client.
  3. Ensure that no sensitive or user-controlled data is included in the error message sent to the client.

Suggested changeset 1
server/src/templates/templates.controller.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/server/src/templates/templates.controller.ts b/server/src/templates/templates.controller.ts
--- a/server/src/templates/templates.controller.ts
+++ b/server/src/templates/templates.controller.ts
@@ -41,3 +41,3 @@
       this.logger.error(err);
-      res.status(500).send(err);
+      res.status(500).send('An internal server error occurred.');
     }
EOF
@@ -41,3 +41,3 @@
this.logger.error(err);
res.status(500).send(err);
res.status(500).send('An internal server error occurred.');
}
Copilot is powered by AI and may make mistakes. Always verify output.
res.send(template);
} catch (err) {
this.logger.error(err);
res.status(500).send(err);

Check warning

Code scanning / CodeQL

Information exposure through a stack trace Medium

This information exposed to the user depends on
stack trace information
.

Copilot Autofix

AI 2 days ago

To fix the issue, the error message sent to the client should be replaced with a generic message that does not expose sensitive information. The stack trace and other details from the err object should be logged on the server for debugging purposes. This ensures that developers can still access the error details while preventing attackers from exploiting sensitive information.

Steps to implement the fix:

  1. Replace res.status(500).send(err) with a generic error message, such as "An internal server error occurred".
  2. Ensure the detailed error information (err) is logged using this.logger.error(err).
  3. No additional imports or dependencies are required, as the Logger class is already being used.

Suggested changeset 1
server/src/templates/templates.controller.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/server/src/templates/templates.controller.ts b/server/src/templates/templates.controller.ts
--- a/server/src/templates/templates.controller.ts
+++ b/server/src/templates/templates.controller.ts
@@ -41,3 +41,3 @@
       this.logger.error(err);
-      res.status(500).send(err);
+      res.status(500).send("An internal server error occurred");
     }
EOF
@@ -41,3 +41,3 @@
this.logger.error(err);
res.status(500).send(err);
res.status(500).send("An internal server error occurred");
}
Copilot is powered by AI and may make mistakes. Always verify output.
Copy link

Lines Statements Branches Functions
Coverage: 87%
87.07% (10817/12422) 70.58% (559/792) 80.7% (297/368)
Tests Skipped Failures Errors Time
382 0 💤 0 ❌ 0 🔥 54.465s ⏱️

@mms-gianni mms-gianni merged commit 01b35bd into main Jun 11, 2025
3 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.

1 participant