We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a83f9ce commit dcb7324Copy full SHA for dcb7324
java/ql/src/experimental/Security/CWE/CWE-600/UncaughtServletException.ql
@@ -48,9 +48,10 @@ class UncaughtServletExceptionSink extends DataFlow::ExprNode {
48
UncaughtServletExceptionSink() {
49
exists(Method m, MethodAccess ma | ma.getMethod() = m |
50
isServletMethod(ma.getEnclosingCallable()) and
51
+ exists(m.getAThrownExceptionType()) and // The called method might plausibly throw an exception.
52
ma.getAnArgument() = this.getExpr() and
53
not exists(TryStmt t |
- t.getBlock() = ma.getEnclosingStmt().getEnclosingStmt*() and
54
+ t.getBlock() = ma.getAnEnclosingStmt() and
55
exceptionIsCaught(t, m.getAThrownExceptionType())
56
)
57
0 commit comments