-
Notifications
You must be signed in to change notification settings - Fork 130
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
Added minimal-py312-cuda12.4-inference environment #3765
base: main
Are you sure you want to change the base?
Conversation
assets/inference/environments/minimal-py312-cuda11.8-inference/tests/src/valid_score.py
Fixed
Show fixed
Hide fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please complete new image onboarding process
except Exception as e: | ||
error = str(e) | ||
|
||
return AMLResponse({'error': error}, 500, json_str=True) |
Check warning
Code scanning / CodeQL
Information exposure through an exception Medium test
Stack trace information
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI about 10 hours ago
To fix the problem, we should avoid sending the exception details directly to the user. Instead, we should log the detailed error message on the server and return a generic error message to the user. This approach ensures that sensitive information is not exposed while still allowing developers to debug issues using the server logs.
- Modify the exception handling in the
run
function to log the exception details. - Return a generic error message to the user instead of the exception details.
-
Copy modified lines R32-R34 -
Copy modified line R36
@@ -31,4 +31,6 @@ | ||
except Exception as e: | ||
error = str(e) | ||
import traceback | ||
error_details = traceback.format_exc() | ||
print(f"Error occurred: {error_details}") | ||
|
||
return AMLResponse({'error': error}, 500, json_str=True) | ||
return AMLResponse({'error': 'An internal error has occurred.'}, 500, json_str=True) |
Added minimal-py312-cuda11.8-inference environment