Skip to content

Commit 1cb5892

Browse files
Minor changes to formulations for java/error-message-exposure
Co-authored-by: Anders Schack-Mulligen <[email protected]>
1 parent feb31d2 commit 1cb5892

File tree

4 files changed

+4
-7
lines changed

4 files changed

+4
-7
lines changed

java/ql/src/Security/CWE/CWE-209/SensitiveDataExposureThroughErrorMessage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) {
1212
try {
1313
doSomeWork();
1414
} catch (NullPointerException ex) {
15-
// GOOD: log the stack trace, and send back a non-revealing response
15+
// GOOD: log the exception message, and send back a non-revealing response
1616
log("Exception occurred", ex.getMessage);
1717
response.sendError(
1818
HttpServletResponse.SC_INTERNAL_SERVER_ERROR,

java/ql/src/Security/CWE/CWE-209/SensitiveDataExposureThroughErrorMessage.qhelp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,5 @@ information.</p>
3434
<a href="https://www.securecoding.cert.org/confluence/display/java/ERR01-J.+Do+not+allow+exceptions+to+expose+sensitive+information">ERR01-J.
3535
Do not allow exceptions to expose sensitive information</a>.</li>
3636

37-
<li>
38-
CWE-209: <a href="https://cwe.mitre.org/data/definitions/209.html">Information Exposure Through an Error Message</a>.
39-
</li>
4037
</references>
4138
</qhelp>

java/ql/src/Security/CWE/CWE-209/SensitiveDataExposureThroughErrorMessage.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* @name Information exposure through a error message
3-
* @description Information from a error message propagates to an external user.
2+
* @name Information exposure through an error message
3+
* @description Information from an error message propagates to an external user.
44
* Error messages can unintentionally reveal implementation details
55
* that are useful to an attacker for developing a subsequent exploit.
66
* @kind problem
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
22
category: minorAnalysis
33
---
4-
* Now alerts about exposing `exception.getMessage()` in servlet responses are split out of `java/stack-trace-exposure` into its own alert `java/error-message-exposure` because this is a better fit.
4+
* Alerts about exposing `exception.getMessage()` in servlet responses are now split out of `java/stack-trace-exposure` into its own query `java/error-message-exposure`.

0 commit comments

Comments
 (0)