File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
java/ql/src/Security/CWE/CWE-209 Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,10 @@ import semmle.code.java.security.XSS
2222 */
2323class PrintStackTraceMethod extends Method {
2424 PrintStackTraceMethod ( ) {
25- getDeclaringType ( ) .hasQualifiedName ( "java.lang" , "Throwable" ) and
25+ getDeclaringType ( )
26+ .getSourceDeclaration ( )
27+ .getASourceSupertype * ( )
28+ .hasQualifiedName ( "java.lang" , "Throwable" ) and
2629 getName ( ) = "printStackTrace"
2730 }
2831}
@@ -96,7 +99,8 @@ class StackTraceStringToXssSinkFlowConfig extends TaintTracking2::Configuration
9699 */
97100predicate printsStackExternally ( MethodAccess call , Expr stackTrace ) {
98101 printsStackToWriter ( call ) and
99- call .getQualifier ( ) = stackTrace
102+ call .getQualifier ( ) = stackTrace and
103+ not call .getQualifier ( ) instanceof SuperAccess
100104}
101105
102106/**
You can’t perform that action at this time.
0 commit comments