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

Potential fix for code scanning alert no. 20: Information exposure through an exception #124

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

TilmanGriesel
Copy link
Owner

Potential fix for https://github.com/TilmanGriesel/chipper/security/code-scanning/20

To fix the problem, we need to ensure that the exception messages returned to the user do not contain sensitive information. Instead, we should return a generic error message while logging the detailed exception message on the server for debugging purposes. This approach maintains the application's security while still providing developers with the necessary information to diagnose issues.

We will update the exception handling in the copy, delete, pull, and push methods to return a generic error message instead of the exception message. The check_blob, push_blob, list_local_models, list_running_models, and version methods already follow this practice, so no changes are needed for them.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…rough an exception

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@TilmanGriesel TilmanGriesel marked this pull request as ready for review February 13, 2025 07:55
@TilmanGriesel TilmanGriesel self-assigned this Feb 13, 2025
@TilmanGriesel TilmanGriesel merged commit 25e7aea into main Feb 13, 2025
6 checks passed
@TilmanGriesel TilmanGriesel deleted the alert-autofix-20 branch February 13, 2025 07:57
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