Skip to content

Commit 396678f

Browse files
committed
Java: Add apache Base64 taint steps.
1 parent 93c6f8f commit 396678f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,13 @@ private predicate taintPreservingArgumentToMethod(Method method, int arg) {
445445
method.getName() = "wrap" and arg = 0
446446
)
447447
or
448+
method.getDeclaringType().hasQualifiedName("org.apache.commons.codec.binary", "Base64") and
449+
(
450+
method.getName() = "decodeBase64" and arg = 0
451+
or
452+
method.getName().matches("encodeBase64%") and arg = 0
453+
)
454+
or
448455
method.getDeclaringType().hasQualifiedName("org.apache.commons.io", "IOUtils") and
449456
(
450457
method.getName() = "buffer" and arg = 0

0 commit comments

Comments
 (0)