codeql: close java/error-message-exposure #572-#583 (Task 8) - #47
Merged
Conversation
Real fixes (CodeQL-modeled) for 12 alerts across 6 files, following the CWE-209 pattern: generic client-facing message + server-side log of the detailed exception. Matches 004 T054 (PR #1268). 1. PSEmsRestService (#575-#581): 7 endpoints replaced entity(e.getMessage()) with GENERIC_EMS_ERROR constant; details logged. 2. PSSiteimprove (#582): GENERIC_SAVE_CONFIG_ERROR replaces message concatenation; details logged. 3. PSWebResourcesRestService (#574): deleteFile/uploadFile/ validateFileUpload use GENERIC_FILE_OPERATION_ERROR; details logged. 4. SimpleXmlView x2 (#572, #573): findResult uses GENERIC_RENDER_ERROR instead of leaking the internal result-key; detail logged. 5. PSTemplateServlet (#583): sendError uses generic message; details logged server-side. Verification: compile + tests pass (213 perc-toolkit tests, 0 failures).
4 tasks
Collaborator
Author
|
Superseded by #50 (consolidated onto current |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes 12 CodeQL
java/error-message-exposurealerts (#572-#583) with real fixes following the CWE-209 pattern: generic client-facing message + server-side log of the detailed exception.Changes
entity(e.getMessage())withGENERIC_EMS_ERRORconstant; details logged server-side.GENERIC_SAVE_CONFIG_ERRORreplaces message concatenation; details logged.deleteFile/uploadFile/validateFileUploaduseGENERIC_FILE_OPERATION_ERROR; details logged.findResultusesGENERIC_RENDER_ERRORinstead of leaking the internal result-key; detail logged.sendErroruses generic message; details logged server-side.Pattern
All fixes follow the CWE-209 pattern: generic client-facing message + server-side log of the detailed exception. Matches 004 T054 (PR #1268).
Verification
Notes
Version.propertiesnot modified (build-number workflow handles that on merge).