Skip to content

Commit bcda481

Browse files
authored
Merge pull request github#3086 from aschackmull/java/apache-base64-taint
Java: Add apache Base64 taint steps.
2 parents 67cb852 + 396678f commit bcda481

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)