Skip to content

fix: DIA-1942: Fix Information exposure through an exception #7258

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 3 commits into from
Mar 19, 2025

Conversation

hakan458
Copy link
Collaborator

Potential fix for https://github.com/HumanSignal/label-studio/security/code-scanning/788

To fix the problem, we should log the detailed exception message on the server and return a generic error message to the user. This approach ensures that sensitive information is not exposed to external users while still allowing developers to access the necessary details for debugging.

  • Modify the except block to log the exception using the logger and return a generic error message to the user.
  • Ensure that the logging captures the full stack trace for debugging purposes.

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

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Copy link

netlify bot commented Mar 19, 2025

Deploy Preview for label-studio-docs-new-theme canceled.

Name Link
🔨 Latest commit 7170725
🔍 Latest deploy log https://app.netlify.com/sites/label-studio-docs-new-theme/deploys/67db3a4a05a93e0008802589

Copy link

netlify bot commented Mar 19, 2025

Deploy Preview for heartex-docs canceled.

Name Link
🔨 Latest commit 7170725
🔍 Latest deploy log https://app.netlify.com/sites/heartex-docs/deploys/67db3a4a9fec66000807a18f

@hakan458 hakan458 changed the title Potential fix for code scanning alert no. 788: Information exposure through an exception fix: DIA-1942: Fix Information exposure through an exception Mar 19, 2025
Copy link

codecov bot commented Mar 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.30%. Comparing base (f758c99) to head (7170725).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7258      +/-   ##
===========================================
- Coverage    77.31%   77.30%   -0.01%     
===========================================
  Files          188      188              
  Lines        14581    14582       +1     
===========================================
  Hits         11273    11273              
- Misses        3308     3309       +1     
Flag Coverage Δ
pytests 77.30% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Co-authored-by: pakelley <patrick@humansignal.com>
@hakan458 hakan458 marked this pull request as ready for review March 19, 2025 21:44
@hakan458 hakan458 enabled auto-merge (squash) March 19, 2025 21:47
@hakan458 hakan458 merged commit 6a7b8aa into develop Mar 19, 2025
64 of 75 checks passed
@robot-ci-heartex robot-ci-heartex deleted the fb-dia-1942 branch March 19, 2025 21:59
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.

2 participants