Skip to content

Commit 9742d38

Browse files
committed
Java: Add org.apache.commons.codec.(De|En)coder to TainTrackingUtil
The commons codec library contains many encoder and decoder methods and is fairly commonly used.
1 parent fcc2b66 commit 9742d38

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

java/ql/src/semmle/code/java/dataflow/internal/TaintTrackingUtil.qll

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,15 @@ private predicate taintPreservingArgumentToMethod(Method method, int arg) {
434434
or
435435
(
436436
method.getDeclaringType().hasQualifiedName("java.util", "Base64$Encoder") or
437-
method.getDeclaringType().hasQualifiedName("java.util", "Base64$Decoder")
437+
method.getDeclaringType().hasQualifiedName("java.util", "Base64$Decoder") or
438+
method
439+
.getDeclaringType()
440+
.getASupertype*()
441+
.hasQualifiedName("org.apache.commons.codec", "Encoder") or
442+
method
443+
.getDeclaringType()
444+
.getASupertype*()
445+
.hasQualifiedName("org.apache.commons.codec", "Decoder")
438446
) and
439447
(
440448
method.getName() = "encode" and arg = 0 and method.getNumberOfParameters() = 1

0 commit comments

Comments
 (0)