Merge branch 'main' into atorralba/promote-unsafe-android-webview-fetch

This commit is contained in:
Tony Torralba
2021-07-20 17:30:56 +02:00
2246 changed files with 205894 additions and 30303 deletions

View File

@@ -0,0 +1,2 @@
lgtm,codescanning
* Added additional taint steps modeling the Spring `validation.Errors` class (`org.springframework.validation.Errors`).

View File

@@ -0,0 +1,2 @@
lgtm,codescanning
* Added models for the Apache Commons Lang tuple types (Pair, Triple and their immutable and mutable implementations). This may lead to more results from any query using data-flow analysis where a relevant path uses one of these container types.

View File

@@ -0,0 +1,2 @@
lgtm,codescanning
* Added additional taint steps modeling the Spring `util` package (`org.springframework.util`).

View File

@@ -0,0 +1,3 @@
lgtm,codescanning
* Additional flow steps in the `org.springframework.http` package of the Spring framework have been modelled.
This may result in additional results for security queries on projects using this framework.

View File

@@ -0,0 +1,2 @@
lgtm,codescanning
* Added additional taint steps modeling the Spring classes `PropertyValue`, `PropertyValues` and `MutablePropertyValues`. (`org.springframework.beans.*`).

View File

@@ -0,0 +1,2 @@
lgtm,codescanning
* Added models for the Apache Commons Lang Mutable types. This may lead to more results from any query using data-flow analysis where a relevant path uses one of these container types.

View File

@@ -0,0 +1,2 @@
lgtm,codescanning
* Models for java.util.Optional added. This may lead to more results whenever a data-flow path involves this type.

View File

@@ -0,0 +1,2 @@
lgtm,codescanning
* Static inner classes and static methods' enclosing and declaring types are now unbound rather than raw types. This means that, for example, Map.Entry's name is now `Map$Entry` not `Map<>$Entry` as before. This may impact custom queries that explicitly named these types.

View File

@@ -0,0 +1,2 @@
lgtm,codescanning
* The DataFlow libraries have been augmented with support for `Configuration`-specific in-place read steps at, for example, sinks and custom taint steps. This means that it is now possible to specify sinks that accept flow with non-empty access paths.

View File

@@ -0,0 +1,2 @@
lgtm,codescanning
* Added models for the package `keyvalue` and the classes `KeyValue` and `MapUtils` from Apache Commons Collections. This may lead to more results from any query using data-flow analysis where a relevant path uses one of these container types.

View File

@@ -0,0 +1,2 @@
lgtm,codescanning
* Added models of `javax.json` classes and methods. This may lead to more results where tracking tainted dataflow across JSON encoding or decoding is needed to diagnose a security or other issue.

View File

@@ -0,0 +1,4 @@
lgtm,codescanning
* Additional flow steps in the `org.springframework.ui`, and `org.springframework.cache` packages of
the Spring framework have been modelled. This may result in additional results for security
queries on projects using this framework.

View File

@@ -0,0 +1,4 @@
lgtm,codescanning
* Additional flow steps in the `org.springframework.web.multipart` package of the Spring framework
have been modelled. This may result in additional results for security queries on projects using
this framework.

View File

@@ -0,0 +1,2 @@
lgtm,codescanning
* Added support for two new APIs susceptible to server-side request forgery (SSRF): using a `URLClassLoader`, and using Spring Web Reactive's `WebClient`.

View File

@@ -0,0 +1,2 @@
lgtm,codescanning
* Library `semmle.code.java.security.Random` is split into `RandomQuery`, for use by randomness-related queries, and `RandomValueSource`, for use by libraries wishing to augment the built-in set of random value sources. Any code importing `Random` will need changing to import one or other of these.

View File

@@ -0,0 +1,2 @@
lgtm,codescanning
* SQL-injection vulnerabilities relating to the `org.springframework.jdbc.object` are now recognised.

View File

@@ -1,44 +1,66 @@
package,sink,source,summary,sink:bean-validation,sink:create-file,sink:header-splitting,sink:information-leak,sink:jexl,sink:ldap,sink:open-url,sink:set-hostname-verifier,sink:url-open-stream,sink:xpath,sink:xss,source:remote,summary:taint,summary:value
android.util,,16,,,,,,,,,,,,,16,,
android.webkit,3,2,,,,,,,,,,,,3,2,,
com.esotericsoftware.kryo.io,,,1,,,,,,,,,,,,,1,
com.esotericsoftware.kryo5.io,,,1,,,,,,,,,,,,,1,
com.fasterxml.jackson.databind,,,3,,,,,,,,,,,,,3,
com.google.common.base,,,34,,,,,,,,,,,,,28,6
com.google.common.io,6,,73,,,,,,,,,6,,,,72,1
com.unboundid.ldap.sdk,17,,,,,,,,17,,,,,,,,
java.beans,,,1,,,,,,,,,,,,,1,
java.io,3,,20,,3,,,,,,,,,,,20,
java.lang,,,3,,,,,,,,,,,,,1,2
java.net,2,3,4,,,,,,,2,,,,,3,4,
java.nio,10,,2,,10,,,,,,,,,,,2,
java.util,,,283,,,,,,,,,,,,,15,268
javax.naming.directory,1,,,,,,,,1,,,,,,,,
javax.net.ssl,2,,,,,,,,,,2,,,,,,
javax.servlet,4,21,2,,,3,1,,,,,,,,21,2,
javax.validation,1,1,,1,,,,,,,,,,,1,,
javax.ws.rs.core,1,,,,,1,,,,,,,,,,,
javax.xml.transform.sax,,,4,,,,,,,,,,,,,4,
javax.xml.transform.stream,,,2,,,,,,,,,,,,,2,
javax.xml.xpath,3,,,,,,,,,,,,3,,,,
org.apache.commons.codec,,,2,,,,,,,,,,,,,2,
org.apache.commons.io,,,22,,,,,,,,,,,,,22,
org.apache.commons.jexl2,15,,,,,,,15,,,,,,,,,
org.apache.commons.jexl3,15,,,,,,,15,,,,,,,,,
org.apache.commons.lang3,,,370,,,,,,,,,,,,,324,46
org.apache.commons.text,,,272,,,,,,,,,,,,,220,52
org.apache.directory.ldap.client.api,1,,,,,,,,1,,,,,,,,
org.apache.hc.core5.function,,,1,,,,,,,,,,,,,1,
org.apache.hc.core5.http,1,2,39,,,,,,,,,,,1,2,39,
org.apache.hc.core5.net,,,2,,,,,,,,,,,,,2,
org.apache.hc.core5.util,,,24,,,,,,,,,,,,,18,6
org.apache.http,2,3,67,,,,,,,,,,,2,3,59,8
org.dom4j,20,,,,,,,,,,,,20,,,,
org.springframework.ldap.core,14,,,,,,,,14,,,,,,,,
org.springframework.security.web.savedrequest,,6,,,,,,,,,,,,,6,,
org.springframework.web.client,,3,,,,,,,,,,,,,3,,
org.springframework.web.context.request,,8,,,,,,,,,,,,,8,,
org.springframework.web.multipart,,12,,,,,,,,,,,,,12,,
org.xml.sax,,,1,,,,,,,,,,,,,1,
org.xmlpull.v1,,3,,,,,,,,,,,,,3,,
play.mvc,,4,,,,,,,,,,,,,4,,
package,sink,source,summary,sink:bean-validation,sink:create-file,sink:header-splitting,sink:information-leak,sink:jexl,sink:ldap,sink:open-url,sink:set-hostname-verifier,sink:sql,sink:url-open-stream,sink:url-redirect,sink:xpath,sink:xss,source:remote,summary:taint,summary:value
android.content,8,,4,,,,,,,,,8,,,,,,4,
android.database,59,,30,,,,,,,,,59,,,,,,30,
android.util,,16,,,,,,,,,,,,,,,16,,
android.webkit,3,2,,,,,,,,,,,,,,3,2,,
com.esotericsoftware.kryo.io,,,1,,,,,,,,,,,,,,,1,
com.esotericsoftware.kryo5.io,,,1,,,,,,,,,,,,,,,1,
com.fasterxml.jackson.databind,,,3,,,,,,,,,,,,,,,3,
com.google.common.base,,,85,,,,,,,,,,,,,,,62,23
com.google.common.io,6,,73,,,,,,,,,,6,,,,,72,1
com.unboundid.ldap.sdk,17,,,,,,,,17,,,,,,,,,,
jakarta.json,,,123,,,,,,,,,,,,,,,100,23
jakarta.ws.rs.client,1,,,,,,,,,1,,,,,,,,,
jakarta.ws.rs.core,2,,143,,,,,,,,,,,2,,,,88,55
java.beans,,,1,,,,,,,,,,,,,,,1,
java.io,3,,20,,3,,,,,,,,,,,,,20,
java.lang,,,3,,,,,,,,,,,,,,,1,2
java.net,10,3,6,,,,,,,10,,,,,,,3,6,
java.nio,10,,2,,10,,,,,,,,,,,,,2,
java.sql,7,,,,,,,,,,,7,,,,,,,
java.util,,,295,,,,,,,,,,,,,,,15,280
javax.json,,,123,,,,,,,,,,,,,,,100,23
javax.naming.directory,1,,,,,,,,1,,,,,,,,,,
javax.net.ssl,2,,,,,,,,,,2,,,,,,,,
javax.servlet,4,21,2,,,3,1,,,,,,,,,,21,2,
javax.validation,1,1,,1,,,,,,,,,,,,,1,,
javax.ws.rs.client,1,,,,,,,,,1,,,,,,,,,
javax.ws.rs.core,3,,143,,,1,,,,,,,,2,,,,88,55
javax.xml.transform.sax,,,4,,,,,,,,,,,,,,,4,
javax.xml.transform.stream,,,2,,,,,,,,,,,,,,,2,
javax.xml.xpath,3,,,,,,,,,,,,,,3,,,,
org.apache.commons.codec,,,6,,,,,,,,,,,,,,,6,
org.apache.commons.collections,,,99,,,,,,,,,,,,,,,4,95
org.apache.commons.collections4,,,99,,,,,,,,,,,,,,,4,95
org.apache.commons.io,,,22,,,,,,,,,,,,,,,22,
org.apache.commons.jexl2,15,,,,,,,15,,,,,,,,,,,
org.apache.commons.jexl3,15,,,,,,,15,,,,,,,,,,,
org.apache.commons.lang3,,,423,,,,,,,,,,,,,,,292,131
org.apache.commons.text,,,272,,,,,,,,,,,,,,,220,52
org.apache.directory.ldap.client.api,1,,,,,,,,1,,,,,,,,,,
org.apache.hc.core5.function,,,1,,,,,,,,,,,,,,,1,
org.apache.hc.core5.http,1,2,39,,,,,,,,,,,,,1,2,39,
org.apache.hc.core5.net,,,2,,,,,,,,,,,,,,,2,
org.apache.hc.core5.util,,,24,,,,,,,,,,,,,,,18,6
org.apache.http,27,3,70,,,,,,,25,,,,,,2,3,62,8
org.apache.ibatis.jdbc,6,,,,,,,,,,,6,,,,,,,
org.dom4j,20,,,,,,,,,,,,,,20,,,,
org.hibernate,7,,,,,,,,,,,7,,,,,,,
org.jooq,1,,,,,,,,,,,1,,,,,,,
org.springframework.beans,,,26,,,,,,,,,,,,,,,,26
org.springframework.cache,,,13,,,,,,,,,,,,,,,,13
org.springframework.http,14,,70,,,,,,,14,,,,,,,,60,10
org.springframework.jdbc.core,10,,,,,,,,,,,10,,,,,,,
org.springframework.jdbc.object,9,,,,,,,,,,,9,,,,,,,
org.springframework.ldap.core,14,,,,,,,,14,,,,,,,,,,
org.springframework.security.web.savedrequest,,6,,,,,,,,,,,,,,,6,,
org.springframework.ui,,,32,,,,,,,,,,,,,,,,32
org.springframework.util,,,139,,,,,,,,,,,,,,,87,52
org.springframework.validation,,,13,,,,,,,,,,,,,,,13,
org.springframework.web.client,13,3,,,,,,,,13,,,,,,,3,,
org.springframework.web.context.request,,8,,,,,,,,,,,,,,,8,,
org.springframework.web.multipart,,12,13,,,,,,,,,,,,,,12,13,
org.springframework.web.reactive.function.client,2,,,,,,,,,2,,,,,,,,,
org.xml.sax,,,1,,,,,,,,,,,,,,,1,
org.xmlpull.v1,,3,,,,,,,,,,,,,,,3,,
play.mvc,,4,,,,,,,,,,,,,,,4,,
1 package sink source summary sink:bean-validation sink:create-file sink:header-splitting sink:information-leak sink:jexl sink:ldap sink:open-url sink:set-hostname-verifier sink:sql sink:url-open-stream sink:url-redirect sink:xpath sink:xss source:remote summary:taint summary:value
2 android.util android.content 8 16 4 8 16 4
3 android.webkit android.database 3 59 2 30 59 3 2 30
4 com.esotericsoftware.kryo.io android.util 16 1 16 1
5 com.esotericsoftware.kryo5.io android.webkit 3 2 1 3 2 1
6 com.fasterxml.jackson.databind com.esotericsoftware.kryo.io 3 1 3 1
7 com.google.common.base com.esotericsoftware.kryo5.io 34 1 28 1 6
8 com.google.common.io com.fasterxml.jackson.databind 6 73 3 6 72 3 1
9 com.unboundid.ldap.sdk com.google.common.base 17 85 17 62 23
10 java.beans com.google.common.io 6 1 73 6 1 72 1
11 java.io com.unboundid.ldap.sdk 3 17 20 3 17 20
12 java.lang jakarta.json 3 123 1 100 2 23
13 java.net jakarta.ws.rs.client 2 1 3 4 2 1 3 4
14 java.nio jakarta.ws.rs.core 10 2 2 143 10 2 2 88 55
15 java.util java.beans 283 1 15 1 268
16 javax.naming.directory java.io 1 3 20 3 1 20
17 javax.net.ssl java.lang 2 3 2 1 2
18 javax.servlet java.net 4 10 21 3 2 6 3 1 10 21 3 2 6
19 javax.validation java.nio 1 10 1 2 1 10 1 2
20 javax.ws.rs.core java.sql 1 7 1 7
21 javax.xml.transform.sax java.util 4 295 4 15 280
22 javax.xml.transform.stream javax.json 2 123 2 100 23
23 javax.xml.xpath javax.naming.directory 3 1 1 3
24 org.apache.commons.codec javax.net.ssl 2 2 2 2
25 org.apache.commons.io javax.servlet 4 21 22 2 3 1 21 22 2
26 org.apache.commons.jexl2 javax.validation 15 1 1 1 15 1
27 org.apache.commons.jexl3 javax.ws.rs.client 15 1 15 1
28 org.apache.commons.lang3 javax.ws.rs.core 3 370 143 1 2 324 88 46 55
29 org.apache.commons.text javax.xml.transform.sax 272 4 220 4 52
30 org.apache.directory.ldap.client.api javax.xml.transform.stream 1 2 1 2
31 org.apache.hc.core5.function javax.xml.xpath 3 1 3 1
32 org.apache.hc.core5.http org.apache.commons.codec 1 2 39 6 1 2 39 6
33 org.apache.hc.core5.net org.apache.commons.collections 2 99 2 4 95
34 org.apache.hc.core5.util org.apache.commons.collections4 24 99 18 4 6 95
35 org.apache.http org.apache.commons.io 2 3 67 22 2 3 59 22 8
36 org.dom4j org.apache.commons.jexl2 20 15 15 20
37 org.springframework.ldap.core org.apache.commons.jexl3 14 15 15 14
38 org.springframework.security.web.savedrequest org.apache.commons.lang3 6 423 6 292 131
39 org.springframework.web.client org.apache.commons.text 3 272 3 220 52
40 org.springframework.web.context.request org.apache.directory.ldap.client.api 1 8 1 8
41 org.springframework.web.multipart org.apache.hc.core5.function 12 1 12 1
42 org.xml.sax org.apache.hc.core5.http 1 2 1 39 1 2 1 39
43 org.xmlpull.v1 org.apache.hc.core5.net 3 2 3 2
44 play.mvc org.apache.hc.core5.util 4 24 4 18 6
45 org.apache.http 27 3 70 25 2 3 62 8
46 org.apache.ibatis.jdbc 6 6
47 org.dom4j 20 20
48 org.hibernate 7 7
49 org.jooq 1 1
50 org.springframework.beans 26 26
51 org.springframework.cache 13 13
52 org.springframework.http 14 70 14 60 10
53 org.springframework.jdbc.core 10 10
54 org.springframework.jdbc.object 9 9
55 org.springframework.ldap.core 14 14
56 org.springframework.security.web.savedrequest 6 6
57 org.springframework.ui 32 32
58 org.springframework.util 139 87 52
59 org.springframework.validation 13 13
60 org.springframework.web.client 13 3 13 3
61 org.springframework.web.context.request 8 8
62 org.springframework.web.multipart 12 13 12 13
63 org.springframework.web.reactive.function.client 2 2
64 org.xml.sax 1 1
65 org.xmlpull.v1 3 3
66 play.mvc 4 4

View File

@@ -6,16 +6,17 @@ Java framework & library support
:class: fullWidthTable
:widths: auto
Framework / library,Package,Remote flow sources,Taint & value steps,Sinks (total),`CWE022` :sub:`Path injection`,`CWE036` :sub:`Path traversal`,`CWE079` :sub:`Cross-site scripting`,`CWE089` :sub:`SQL injection`,`CWE090` :sub:`LDAP injection`,`CWE094` :sub:`Code injection`,`CWE319` :sub:`Cleartext transmission`
Android,``android.*``,18,,3,,,3,,,,
Framework / library,Package,Flow sources,Taint & value steps,Sinks (total),`CWE022` :sub:`Path injection`,`CWE036` :sub:`Path traversal`,`CWE079` :sub:`Cross-site scripting`,`CWE089` :sub:`SQL injection`,`CWE090` :sub:`LDAP injection`,`CWE094` :sub:`Code injection`,`CWE319` :sub:`Cleartext transmission`
Android,``android.*``,18,34,70,,,3,67,,,
`Apache Commons Collections <https://commons.apache.org/proper/commons-collections/>`_,"``org.apache.commons.collections``, ``org.apache.commons.collections4``",,198,,,,,,,,
`Apache Commons IO <https://commons.apache.org/proper/commons-io/>`_,``org.apache.commons.io``,,22,,,,,,,,
`Apache Commons Lang <https://commons.apache.org/proper/commons-lang/>`_,``org.apache.commons.lang3``,,370,,,,,,,,
`Apache Commons Lang <https://commons.apache.org/proper/commons-lang/>`_,``org.apache.commons.lang3``,,423,,,,,,,,
`Apache Commons Text <https://commons.apache.org/proper/commons-text/>`_,``org.apache.commons.text``,,272,,,,,,,,
`Apache HttpComponents <https://hc.apache.org/>`_,"``org.apache.hc.core5.*``, ``org.apache.http``",5,133,3,,,3,,,,
`Google Guava <https://guava.dev/>`_,``com.google.common.*``,,107,6,,6,,,,,
Java Standard Library,``java.*``,3,313,15,13,,,,,,2
Java extensions,``javax.*``,22,8,12,,,,,1,1,
`Spring <https://spring.io/>`_,``org.springframework.*``,29,,14,,,,,14,,
Others,"``com.esotericsoftware.kryo.io``, ``com.esotericsoftware.kryo5.io``, ``com.fasterxml.jackson.databind``, ``com.unboundid.ldap.sdk``, ``org.apache.commons.codec``, ``org.apache.commons.jexl2``, ``org.apache.commons.jexl3``, ``org.apache.directory.ldap.client.api``, ``org.dom4j``, ``org.xml.sax``, ``org.xmlpull.v1``, ``play.mvc``",7,8,68,,,,,18,,
Totals,,84,1233,121,13,6,6,,33,1,2
`Apache HttpComponents <https://hc.apache.org/>`_,"``org.apache.hc.core5.*``, ``org.apache.http``",5,136,28,,,3,,,,25
`Google Guava <https://guava.dev/>`_,``com.google.common.*``,,158,6,,6,,,,,
Java Standard Library,``java.*``,3,327,30,13,,,7,,,10
Java extensions,"``javax.*``, ``jakarta.*``",22,540,18,,,,,1,1,2
`Spring <https://spring.io/>`_,``org.springframework.*``,29,306,62,,,,19,14,,29
Others,"``com.esotericsoftware.kryo.io``, ``com.esotericsoftware.kryo5.io``, ``com.fasterxml.jackson.databind``, ``com.unboundid.ldap.sdk``, ``org.apache.commons.codec``, ``org.apache.commons.jexl2``, ``org.apache.commons.jexl3``, ``org.apache.directory.ldap.client.api``, ``org.apache.ibatis.jdbc``, ``org.dom4j``, ``org.hibernate``, ``org.jooq``, ``org.xml.sax``, ``org.xmlpull.v1``, ``play.mvc``",7,12,82,,,,14,18,,
Totals,,84,2428,296,13,6,6,107,33,1,66

View File

@@ -1,10 +1,11 @@
Framework name,URL,Package prefixes
Java Standard Library,,java.*
Java extensions,,javax.*
Java extensions,,javax.* jakarta.*
Google Guava,https://guava.dev/,com.google.common.*
Apache Commons Collections,https://commons.apache.org/proper/commons-collections/,org.apache.commons.collections org.apache.commons.collections4
Apache Commons IO,https://commons.apache.org/proper/commons-io/,org.apache.commons.io
Apache Commons Lang,https://commons.apache.org/proper/commons-lang/,org.apache.commons.lang3
Apache Commons Text,https://commons.apache.org/proper/commons-text/,org.apache.commons.text
Apache HttpComponents,https://hc.apache.org/,org.apache.hc.core5.* org.apache.http
Android,,android.*
Spring,https://spring.io/,org.springframework.*
Spring,https://spring.io/,org.springframework.*
1 Framework name URL Package prefixes
2 Java Standard Library java.*
3 Java extensions javax.* javax.* jakarta.*
4 Google Guava https://guava.dev/ com.google.common.*
5 Apache Commons Collections https://commons.apache.org/proper/commons-collections/ org.apache.commons.collections org.apache.commons.collections4
6 Apache Commons IO https://commons.apache.org/proper/commons-io/ org.apache.commons.io
7 Apache Commons Lang https://commons.apache.org/proper/commons-lang/ org.apache.commons.lang3
8 Apache Commons Text https://commons.apache.org/proper/commons-text/ org.apache.commons.text
9 Apache HttpComponents https://hc.apache.org/ org.apache.hc.core5.* org.apache.http
10 Android android.*
11 Spring https://spring.io/ org.springframework.*

View File

@@ -7,7 +7,7 @@
* Such operations could interfere with the EJB container's operation.
* @kind problem
* @problem.severity error
* @security-severity 4.9
* @security-severity 5.8
* @precision low
* @id java/ejb/container-interference
* @tags reliability

View File

@@ -5,7 +5,7 @@
* for enterprise components.
* @kind problem
* @problem.severity error
* @security-severity 4.9
* @security-severity 5.8
* @precision low
* @id java/ejb/file-io
* @tags reliability

View File

@@ -4,7 +4,7 @@
* Such use could compromise security and system stability.
* @kind problem
* @problem.severity error
* @security-severity 4.9
* @security-severity 5.8
* @precision low
* @id java/ejb/native-code
* @tags reliability

View File

@@ -4,7 +4,7 @@
* as this could compromise security.
* @kind problem
* @problem.severity error
* @security-severity 4.9
* @security-severity 5.8
* @precision low
* @id java/ejb/reflection
* @tags external/cwe/cwe-573

View File

@@ -5,7 +5,7 @@
* This functionality is reserved for the EJB container for security reasons.
* @kind problem
* @problem.severity error
* @security-severity 4.9
* @security-severity 5.8
* @precision low
* @id java/ejb/security-configuration-access
* @tags external/cwe/cwe-573

View File

@@ -4,7 +4,7 @@
* the Java serialization protocol, since their use could compromise security.
* @kind problem
* @problem.severity error
* @security-severity 4.9
* @security-severity 5.8
* @precision low
* @id java/ejb/substitution-in-serialization
* @tags external/cwe/cwe-573

View File

@@ -5,7 +5,7 @@
* compromise security or interfere with the EJB container's operation.
* @kind problem
* @problem.severity error
* @security-severity 4.9
* @security-severity 5.8
* @precision low
* @id java/ejb/socket-or-stream-handler-factory
* @tags reliability

View File

@@ -11,7 +11,7 @@
*/
import java
import semmle.code.java.security.Random
import semmle.code.java.security.RandomQuery
from MethodAccess ma, Method abs, Method nextIntOrLong, RandomDataSource nma
where

View File

@@ -5,7 +5,7 @@
* numeric errors such as overflows.
* @kind problem
* @problem.severity warning
* @security-severity 5.9
* @security-severity 8.1
* @precision very-high
* @id java/implicit-cast-in-compound-assignment
* @tags reliability

View File

@@ -4,7 +4,7 @@
* guarantee an evenly distributed sequence of random numbers.
* @kind problem
* @problem.severity warning
* @security-severity 5.9
* @security-severity 9.8
* @precision medium
* @id java/random-used-once
* @tags reliability
@@ -13,7 +13,7 @@
*/
import java
import semmle.code.java.security.Random
import semmle.code.java.security.RandomQuery
from RandomDataSource ma
where ma.getQualifier() instanceof ClassInstanceExpr

View File

@@ -4,7 +4,7 @@
* may cause a deadlock.
* @kind problem
* @problem.severity error
* @security-severity 6.9
* @security-severity 5.0
* @precision medium
* @id java/unreleased-lock
* @tags reliability

View File

@@ -5,7 +5,7 @@
* @kind path-problem
* @precision low
* @problem.severity error
* @security-severity 5.9
* @security-severity 7.8
* @tags security external/cwe/cwe-20
*/

View File

@@ -3,7 +3,7 @@
* @description Accessing paths influenced by users can allow an attacker to access unexpected resources.
* @kind path-problem
* @problem.severity error
* @security-severity 6.4
* @security-severity 7.5
* @precision high
* @id java/path-injection
* @tags security

View File

@@ -3,7 +3,7 @@
* @description Accessing paths influenced by users can allow an attacker to access unexpected resources.
* @kind path-problem
* @problem.severity recommendation
* @security-severity 6.4
* @security-severity 7.5
* @precision medium
* @id java/path-injection-local
* @tags security

View File

@@ -6,7 +6,7 @@
* @kind path-problem
* @id java/zipslip
* @problem.severity error
* @security-severity 6.4
* @security-severity 7.5
* @precision high
* @tags security
* external/cwe/cwe-022

View File

@@ -4,7 +4,7 @@
* malicious changes in the PATH environment variable.
* @kind problem
* @problem.severity warning
* @security-severity 5.9
* @security-severity 9.8
* @precision medium
* @id java/relative-path-command
* @tags security

View File

@@ -4,7 +4,7 @@
* changes in the strings.
* @kind path-problem
* @problem.severity error
* @security-severity 5.9
* @security-severity 9.8
* @precision high
* @id java/command-line-injection
* @tags security
@@ -15,7 +15,7 @@
import java
import semmle.code.java.dataflow.FlowSources
import semmle.code.java.security.ExternalProcess
import ExecCommon
import semmle.code.java.security.CommandLineQuery
import DataFlow::PathGraph
from DataFlow::PathNode source, DataFlow::PathNode sink, ArgumentToExec execArg

View File

@@ -4,7 +4,7 @@
* changes in the strings.
* @kind path-problem
* @problem.severity recommendation
* @security-severity 5.9
* @security-severity 9.8
* @precision medium
* @id java/command-line-injection-local
* @tags security

View File

@@ -4,7 +4,7 @@
* insertion of special characters in the strings.
* @kind problem
* @problem.severity error
* @security-severity 5.9
* @security-severity 9.8
* @precision high
* @id java/concatenated-command-line
* @tags security
@@ -14,7 +14,7 @@
import java
import semmle.code.java.security.ExternalProcess
import ExecCommon
import semmle.code.java.security.CommandLineQuery
/**
* Strings that are known to be sane by some simple local analysis. Such strings

View File

@@ -4,7 +4,7 @@
* allows for a cross-site scripting vulnerability.
* @kind path-problem
* @problem.severity error
* @security-severity 2.9
* @security-severity 6.1
* @precision high
* @id java/xss
* @tags security

View File

@@ -4,7 +4,7 @@
* allows for a cross-site scripting vulnerability.
* @kind path-problem
* @problem.severity recommendation
* @security-severity 2.9
* @security-severity 6.1
* @precision medium
* @id java/xss-local
* @tags security

View File

@@ -4,7 +4,7 @@
* malicious code by the user.
* @kind path-problem
* @problem.severity error
* @security-severity 6.4
* @security-severity 8.8
* @precision high
* @id java/sql-injection
* @tags security

View File

@@ -4,7 +4,7 @@
* malicious code by the user.
* @kind path-problem
* @problem.severity recommendation
* @security-severity 6.4
* @security-severity 8.8
* @precision medium
* @id java/sql-injection-local
* @tags security

View File

@@ -4,7 +4,7 @@
* characters is vulnerable to insertion of malicious code.
* @kind problem
* @problem.severity error
* @security-severity 6.4
* @security-severity 8.8
* @precision high
* @id java/concatenated-sql-query
* @tags security

View File

@@ -4,7 +4,7 @@
* malicious LDAP code by the user.
* @kind path-problem
* @problem.severity error
* @security-severity 5.9
* @security-severity 9.8
* @precision high
* @id java/ldap-injection
* @tags security

View File

@@ -3,7 +3,7 @@
* @description User-controlled data may be evaluated as a Java EL expression, leading to arbitrary code execution.
* @kind path-problem
* @problem.severity error
* @security-severity 10.0
* @security-severity 9.3
* @precision high
* @id java/insecure-bean-validation
* @tags security

View File

@@ -4,7 +4,7 @@
* may lead to arbitrary code execution.
* @kind path-problem
* @problem.severity error
* @security-severity 10.0
* @security-severity 9.3
* @precision high
* @id java/jexl-expression-injection
* @tags security
@@ -12,27 +12,9 @@
*/
import java
import semmle.code.java.dataflow.FlowSources
import semmle.code.java.security.JexlInjection
import semmle.code.java.security.JexlInjectionQuery
import DataFlow::PathGraph
/**
* A taint-tracking configuration for unsafe user input
* that is used to construct and evaluate a JEXL expression.
* It supports both JEXL 2 and 3.
*/
class JexlInjectionConfig extends TaintTracking::Configuration {
JexlInjectionConfig() { this = "JexlInjectionConfig" }
override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource }
override predicate isSink(DataFlow::Node sink) { sink instanceof JexlEvaluationSink }
override predicate isAdditionalTaintStep(DataFlow::Node node1, DataFlow::Node node2) {
any(JexlInjectionAdditionalTaintStep c).step(node1, node2)
}
}
from DataFlow::PathNode source, DataFlow::PathNode sink, JexlInjectionConfig conf
where conf.hasFlowPath(source, sink)
select sink.getNode(), source, sink, "JEXL injection from $@.", source.getNode(), "this user input"

View File

@@ -5,7 +5,7 @@
* an HTTP header.
* @kind problem
* @problem.severity error
* @security-severity 3.6
* @security-severity 6.1
* @precision high
* @id java/netty-http-response-splitting
* @tags security

View File

@@ -4,7 +4,7 @@
* makes code vulnerable to attack by header splitting.
* @kind path-problem
* @problem.severity error
* @security-severity 3.6
* @security-severity 6.1
* @precision high
* @id java/http-response-splitting
* @tags security

View File

@@ -4,7 +4,7 @@
* makes code vulnerable to attack by header splitting.
* @kind path-problem
* @problem.severity recommendation
* @security-severity 3.6
* @security-severity 6.1
* @precision medium
* @id java/http-response-splitting-local
* @tags security

View File

@@ -1,7 +1,7 @@
import java
import semmle.code.java.dataflow.DataFlow
import semmle.code.java.dataflow.DefUse
import semmle.code.java.security.Random
import semmle.code.java.security.RandomDataSource
private import BoundingChecks
/**

View File

@@ -3,7 +3,7 @@
* @description Using unvalidated external input as the argument to a construction of an array can lead to index out of bound exceptions.
* @kind path-problem
* @problem.severity warning
* @security-severity 5.9
* @security-severity 8.8
* @precision medium
* @id java/improper-validation-of-array-construction
* @tags security

View File

@@ -4,7 +4,7 @@
* a construction of an array can lead to index out of bound exceptions.
* @kind path-problem
* @problem.severity recommendation
* @security-severity 5.9
* @security-severity 8.8
* @precision medium
* @id java/improper-validation-of-array-construction-code-specified
* @tags security

View File

@@ -4,7 +4,7 @@
* a construction of an array can lead to index out of bound exceptions.
* @kind path-problem
* @problem.severity recommendation
* @security-severity 5.9
* @security-severity 8.8
* @precision medium
* @id java/improper-validation-of-array-construction-local
* @tags security

View File

@@ -3,7 +3,7 @@
* @description Using external input as an index to an array, without proper validation, can lead to index out of bound exceptions.
* @kind path-problem
* @problem.severity warning
* @security-severity 5.9
* @security-severity 8.8
* @precision medium
* @id java/improper-validation-of-array-index
* @tags security

View File

@@ -4,7 +4,7 @@
* proper validation, can lead to index out of bound exceptions.
* @kind path-problem
* @problem.severity recommendation
* @security-severity 5.9
* @security-severity 8.8
* @precision medium
* @id java/improper-validation-of-array-index-code-specified
* @tags security

View File

@@ -4,7 +4,7 @@
* proper validation, can lead to index out of bound exceptions.
* @kind path-problem
* @problem.severity recommendation
* @security-severity 5.9
* @security-severity 8.8
* @precision medium
* @id java/improper-validation-of-array-index-local
* @tags security

View File

@@ -3,7 +3,7 @@
* @description Using external input in format strings can lead to exceptions or information leaks.
* @kind path-problem
* @problem.severity error
* @security-severity 6.9
* @security-severity 9.3
* @precision high
* @id java/tainted-format-string
* @tags security

View File

@@ -3,7 +3,7 @@
* @description Using external input in format strings can lead to exceptions or information leaks.
* @kind path-problem
* @problem.severity recommendation
* @security-severity 6.9
* @security-severity 9.3
* @precision medium
* @id java/tainted-format-string-local
* @tags security

View File

@@ -4,7 +4,7 @@
* overflows.
* @kind path-problem
* @problem.severity warning
* @security-severity 5.9
* @security-severity 8.6
* @precision medium
* @id java/tainted-arithmetic
* @tags security

View File

@@ -4,7 +4,7 @@
* overflows.
* @kind path-problem
* @problem.severity recommendation
* @security-severity 5.9
* @security-severity 8.6
* @precision medium
* @id java/tainted-arithmetic-local
* @tags security

View File

@@ -4,7 +4,7 @@
* overflows.
* @kind path-problem
* @problem.severity warning
* @security-severity 5.9
* @security-severity 8.6
* @precision medium
* @id java/uncontrolled-arithmetic
* @tags security
@@ -14,7 +14,7 @@
import java
import semmle.code.java.dataflow.TaintTracking
import semmle.code.java.security.Random
import semmle.code.java.security.RandomQuery
import semmle.code.java.security.SecurityTests
import ArithmeticCommon
import DataFlow::PathGraph

View File

@@ -4,7 +4,7 @@
* is then used in an arithmetic expression, this may result in an overflow.
* @kind path-problem
* @problem.severity recommendation
* @security-severity 5.9
* @security-severity 8.6
* @precision medium
* @id java/extreme-value-arithmetic
* @tags security

View File

@@ -4,7 +4,7 @@
* to behave unexpectedly.
* @kind problem
* @problem.severity warning
* @security-severity 5.9
* @security-severity 8.1
* @precision medium
* @id java/comparison-with-wider-type
* @tags reliability

View File

@@ -5,7 +5,7 @@
* that are useful to an attacker for developing a subsequent exploit.
* @kind problem
* @problem.severity error
* @security-severity 3.6
* @security-severity 5.4
* @precision high
* @id java/stack-trace-exposure
* @tags security

View File

@@ -3,7 +3,7 @@
* @description Marking a certificate as valid for a host without checking the certificate hostname allows an attacker to perform a machine-in-the-middle attack.
* @kind path-problem
* @problem.severity error
* @security-severity 4.9
* @security-severity 5.9
* @precision high
* @id java/unsafe-hostname-verification
* @tags security
@@ -15,6 +15,7 @@ import semmle.code.java.controlflow.Guards
import semmle.code.java.dataflow.DataFlow
import semmle.code.java.dataflow.FlowSources
import semmle.code.java.security.Encryption
import semmle.code.java.security.SecurityFlag
import DataFlow::PathGraph
private import semmle.code.java.dataflow.ExternalFlow
@@ -86,71 +87,30 @@ private class HostnameVerifierSink extends DataFlow::Node {
HostnameVerifierSink() { sinkNode(this, "set-hostname-verifier") }
}
bindingset[result]
private string getAFlagName() {
result
.regexpMatch("(?i).*(secure|disable|selfCert|selfSign|validat|verif|trust|ignore|nocertificatecheck).*")
}
/**
* A flag has to either be of type `String`, `boolean` or `Boolean`.
* Flags suggesting a deliberately unsafe `HostnameVerifier` usage.
*/
private class FlagType extends Type {
FlagType() {
this instanceof TypeString
or
this instanceof BooleanType
private class UnsafeHostnameVerificationFlag extends FlagKind {
UnsafeHostnameVerificationFlag() { this = "UnsafeHostnameVerificationFlag" }
bindingset[result]
override string getAFlagName() {
result
.regexpMatch("(?i).*(secure|disable|selfCert|selfSign|validat|verif|trust|ignore|nocertificatecheck).*") and
result != "equalsIgnoreCase"
}
}
private predicate isEqualsIgnoreCaseMethodAccess(MethodAccess ma) {
ma.getMethod().hasName("equalsIgnoreCase") and
ma.getMethod().getDeclaringType() instanceof TypeString
/** Gets a guard that represents a (likely) flag controlling an unsafe `HostnameVerifier` use. */
private Guard getAnUnsafeHostnameVerifierFlagGuard() {
result = any(UnsafeHostnameVerificationFlag flag).getAFlag().asExpr()
}
/** Holds if `source` should is considered a flag. */
private predicate isFlag(DataFlow::Node source) {
exists(VarAccess v | v.getVariable().getName() = getAFlagName() |
source.asExpr() = v and v.getType() instanceof FlagType
)
or
exists(StringLiteral s | s.getRepresentedString() = getAFlagName() | source.asExpr() = s)
or
exists(MethodAccess ma | ma.getMethod().getName() = getAFlagName() |
source.asExpr() = ma and
ma.getType() instanceof FlagType and
not isEqualsIgnoreCaseMethodAccess(ma)
)
}
/** Holds if there is flow from `node1` to `node2` either due to local flow or due to custom flow steps. */
private predicate flagFlowStep(DataFlow::Node node1, DataFlow::Node node2) {
DataFlow::localFlowStep(node1, node2)
or
exists(MethodAccess ma | ma.getMethod() = any(EnvReadMethod m) |
ma = node2.asExpr() and ma.getAnArgument() = node1.asExpr()
)
or
exists(MethodAccess ma |
ma.getMethod().hasName("parseBoolean") and
ma.getMethod().getDeclaringType().hasQualifiedName("java.lang", "Boolean")
|
ma = node2.asExpr() and ma.getAnArgument() = node1.asExpr()
)
}
/** Gets a guard that depends on a flag. */
private Guard getAGuard() {
exists(DataFlow::Node source, DataFlow::Node sink |
isFlag(source) and
flagFlowStep*(source, sink) and
sink.asExpr() = result
)
}
/** Holds if `node` is guarded by a flag that suggests an intentionally insecure feature. */
/** Holds if `node` is guarded by a flag that suggests an intentionally insecure use. */
private predicate isNodeGuardedByFlag(DataFlow::Node node) {
exists(Guard g | g.controls(node.asExpr().getBasicBlock(), _) | g = getAGuard())
exists(Guard g | g.controls(node.asExpr().getBasicBlock(), _) |
g = getASecurityFeatureFlagGuard() or g = getAnUnsafeHostnameVerifierFlagGuard()
)
}
from

View File

@@ -3,7 +3,7 @@
* @description Storing sensitive information in cleartext can expose it to an attacker.
* @kind problem
* @problem.severity recommendation
* @security-severity 5.9
* @security-severity 7.5
* @precision medium
* @id java/cleartext-storage-in-class
* @tags security

View File

@@ -3,7 +3,7 @@
* @description Storing sensitive information in cleartext can expose it to an attacker.
* @kind problem
* @problem.severity error
* @security-severity 2.9
* @security-severity 5.0
* @precision high
* @id java/cleartext-storage-in-cookie
* @tags security

View File

@@ -3,7 +3,7 @@
* @description Storing sensitive information in cleartext can expose it to an attacker.
* @kind problem
* @problem.severity warning
* @security-severity 6.4
* @security-severity 7.5
* @precision medium
* @id java/cleartext-storage-in-properties
* @tags security

View File

@@ -3,7 +3,7 @@
* @description Non-HTTPS connections can be intercepted by third parties.
* @kind path-problem
* @problem.severity recommendation
* @security-severity 5.2
* @security-severity 7.5
* @precision medium
* @id java/non-https-url
* @tags security

View File

@@ -3,7 +3,7 @@
* @description Non-SSL connections can be intercepted by third parties.
* @kind problem
* @problem.severity recommendation
* @security-severity 5.2
* @security-severity 7.5
* @precision medium
* @id java/non-ssl-connection
* @tags security

View File

@@ -4,7 +4,7 @@
* third parties.
* @kind problem
* @problem.severity recommendation
* @security-severity 5.2
* @security-severity 7.5
* @precision medium
* @id java/non-ssl-socket-factory
* @tags security

View File

@@ -3,7 +3,7 @@
* @description Using broken or weak cryptographic algorithms can allow an attacker to compromise security.
* @kind path-problem
* @problem.severity warning
* @security-severity 5.2
* @security-severity 7.5
* @precision high
* @id java/weak-cryptographic-algorithm
* @tags security

View File

@@ -3,7 +3,7 @@
* @description Using broken or weak cryptographic algorithms can allow an attacker to compromise security.
* @kind path-problem
* @problem.severity warning
* @security-severity 5.2
* @security-severity 7.5
* @precision medium
* @id java/potentially-weak-cryptographic-algorithm
* @tags security

View File

@@ -3,7 +3,7 @@
* @description Using a predictable seed in a pseudo-random number generator can lead to predictability of the numbers generated by it.
* @kind problem
* @problem.severity error
* @security-severity 5.9
* @security-severity 9.8
* @precision high
* @id java/predictable-seed
* @tags security
@@ -11,7 +11,7 @@
*/
import java
import semmle.code.java.security.Random
import semmle.code.java.security.RandomQuery
from GetRandomData da, RValue use, PredictableSeedExpr source
where

View File

@@ -3,7 +3,7 @@
* @description Using a vulnerable version of JHipster to generate random numbers makes it easier for attackers to take over accounts.
* @kind problem
* @problem.severity error
* @security-severity 5.9
* @security-severity 7.8
* @precision very-high
* @id java/jhipster-prng
* @tags security

View File

@@ -4,7 +4,7 @@
* a Cross-Site Request Forgery (CSRF) attack.
* @kind problem
* @problem.severity error
* @security-severity 6.4
* @security-severity 8.8
* @precision high
* @id java/spring-disabled-csrf-protection
* @tags security

View File

@@ -4,7 +4,7 @@
* if the state may be changed between the check and use.
* @kind problem
* @problem.severity warning
* @security-severity 5.9
* @security-severity 7.7
* @precision medium
* @id java/toctou-race-condition
* @tags security

View File

@@ -3,7 +3,7 @@
* @description Opening a socket after authenticating via a different channel may allow an attacker to connect to the port first.
* @kind problem
* @problem.severity warning
* @security-severity 10.0
* @security-severity 7.2
* @precision medium
* @id java/socket-auth-race-condition
* @tags security

View File

@@ -4,7 +4,7 @@
* execute arbitrary code.
* @kind path-problem
* @problem.severity error
* @security-severity 5.9
* @security-severity 9.8
* @precision high
* @id java/unsafe-deserialization
* @tags security

View File

@@ -4,7 +4,7 @@
* may cause redirection to malicious web sites.
* @kind path-problem
* @problem.severity error
* @security-severity 2.7
* @security-severity 6.1
* @precision high
* @id java/unvalidated-url-redirection
* @tags security

View File

@@ -4,7 +4,7 @@
* may cause redirection to malicious web sites.
* @kind path-problem
* @problem.severity recommendation
* @security-severity 2.7
* @security-severity 6.1
* @precision medium
* @id java/unvalidated-url-redirection-local
* @tags security

View File

@@ -4,7 +4,7 @@
* references may lead to disclosure of confidential data or denial of service.
* @kind path-problem
* @problem.severity error
* @security-severity 5.9
* @security-severity 9.1
* @precision high
* @id java/xxe
* @tags security

View File

@@ -4,7 +4,7 @@
* interception.
* @kind problem
* @problem.severity error
* @security-severity 2.9
* @security-severity 5.0
* @precision high
* @id java/insecure-cookie
* @tags security

View File

@@ -4,7 +4,7 @@
* malicious code by the user.
* @kind path-problem
* @problem.severity error
* @security-severity 5.9
* @security-severity 9.8
* @precision high
* @id java/xml/xpath-injection
* @tags security

View File

@@ -4,7 +4,7 @@
* can cause unexpected truncation.
* @kind path-problem
* @problem.severity error
* @security-severity 5.9
* @security-severity 9.0
* @precision high
* @id java/tainted-numeric-cast
* @tags security

View File

@@ -4,7 +4,7 @@
* can cause unexpected truncation.
* @kind path-problem
* @problem.severity recommendation
* @security-severity 5.9
* @security-severity 9.0
* @precision medium
* @id java/tainted-numeric-cast-local
* @tags security

View File

@@ -4,7 +4,7 @@
* the file may be modified or removed by external actors.
* @kind problem
* @problem.severity error
* @security-severity 5.9
* @security-severity 7.8
* @precision high
* @id java/world-writable-file-read
* @tags security

View File

@@ -3,7 +3,7 @@
* @description Using a hard-coded credential in a call to a sensitive Java API may compromise security.
* @kind path-problem
* @problem.severity error
* @security-severity 5.9
* @security-severity 9.8
* @precision medium
* @id java/hardcoded-credential-api-call
* @tags security

View File

@@ -3,7 +3,7 @@
* @description Comparing a parameter to a hard-coded credential may compromise security.
* @kind problem
* @problem.severity error
* @security-severity 5.9
* @security-severity 9.8
* @precision low
* @id java/hardcoded-credential-comparison
* @tags security

View File

@@ -3,7 +3,7 @@
* @description Using a hard-coded credential in a sensitive call may compromise security.
* @kind path-problem
* @problem.severity error
* @security-severity 5.9
* @security-severity 9.8
* @precision low
* @id java/hardcoded-credential-sensitive-call
* @tags security

View File

@@ -3,7 +3,7 @@
* @description Hard-coding a password string may compromise security.
* @kind problem
* @problem.severity error
* @security-severity 5.9
* @security-severity 9.8
* @precision low
* @id java/hardcoded-password-field
* @tags security

View File

@@ -4,7 +4,7 @@
* passing through authentication systems.
* @kind path-problem
* @problem.severity error
* @security-severity 5.9
* @security-severity 7.8
* @precision medium
* @id java/user-controlled-bypass
* @tags security

View File

@@ -4,7 +4,7 @@
* permissions being granted.
* @kind path-problem
* @problem.severity error
* @security-severity 5.9
* @security-severity 7.8
* @precision high
* @id java/tainted-permissions-check
* @tags security

View File

@@ -3,7 +3,7 @@
* @description Non-HTTPS connections can be intercepted by third parties.
* @kind problem
* @problem.severity error
* @security-severity 5.9
* @security-severity 8.1
* @precision very-high
* @id java/maven/non-https-url
* @tags security

View File

@@ -3,7 +3,7 @@
* @description Acquiring multiple locks in a different order may cause deadlock.
* @kind problem
* @problem.severity recommendation
* @security-severity 6.9
* @security-severity 5.0
* @precision medium
* @id java/lock-order-inconsistency
* @tags security

View File

@@ -5,7 +5,7 @@
* looping.
* @kind problem
* @problem.severity warning
* @security-severity 3.6
* @security-severity 7.5
* @precision medium
* @id java/unreachable-exit-in-loop
* @tags security

View File

@@ -479,6 +479,11 @@ implInterface(
int id2: @interface ref
);
permits(
int id1: @classorinterface ref,
int id2: @classorinterface ref
);
hasModifier(
int id1: @modifiable ref,
int id2: @modifier ref

View File

@@ -17639,6 +17639,64 @@
</dependencies>
</relation>
<relation>
<name>permits</name>
<cardinality>16</cardinality>
<columnsizes>
<e>
<k>id1</k>
<v>6</v>
</e>
<e>
<k>id2</k>
<v>16</v>
</e>
</columnsizes>
<dependencies>
<dep>
<src>id1</src>
<trg>id2</trg>
<val>
<hist>
<budget>12</budget>
<bs>
<b>
<a>1</a>
<b>2</b>
<v>2</v>
</b>
<b>
<a>3</a>
<b>4</b>
<v>2</v>
</b>
<b>
<a>4</a>
<b>5</b>
<v>2</v>
</b>
</bs>
</hist>
</val>
</dep>
<dep>
<src>id2</src>
<trg>id1</trg>
<val>
<hist>
<budget>12</budget>
<bs>
<b>
<a>1</a>
<b>2</b>
<v>16</v>
</b>
</bs>
</hist>
</val>
</dep>
</dependencies>
</relation>
<relation>
<name>hasModifier</name>
<cardinality>5667539</cardinality>
<columnsizes>

View File

@@ -3,6 +3,8 @@
* @description Exposed Spring Boot Actuator through configuration files without declarative or procedural
* security enforcement leads to information leak or even remote code execution.
* @kind problem
* @problem.severity error
* @precision high
* @id java/insecure-spring-actuator-config
* @tags security
* external/cwe-016

View File

@@ -1,32 +0,0 @@
import semmle.code.java.dataflow.FlowSources
import semmle.code.java.security.ExternalProcess
import semmle.code.java.security.CommandArguments
private class RemoteUserInputToArgumentToExecFlowConfig extends TaintTracking::Configuration {
RemoteUserInputToArgumentToExecFlowConfig() {
this = "ExecCommon::RemoteUserInputToArgumentToExecFlowConfig"
}
override predicate isSource(DataFlow::Node src) { src instanceof RemoteFlowSource }
override predicate isSink(DataFlow::Node sink) { sink.asExpr() instanceof ArgumentToExec }
override predicate isSanitizer(DataFlow::Node node) {
node.getType() instanceof PrimitiveType
or
node.getType() instanceof BoxedType
or
isSafeCommandArgument(node.asExpr())
}
}
/**
* Implementation of `ExecTainted.ql`. It is extracted to a QLL
* so that it can be excluded from `ExecUnescaped.ql` to avoid
* reporting overlapping results.
*/
predicate execTainted(DataFlow::PathNode source, DataFlow::PathNode sink, ArgumentToExec execArg) {
exists(RemoteUserInputToArgumentToExecFlowConfig conf |
conf.hasFlowPath(source, sink) and sink.getNode() = DataFlow::exprNode(execArg)
)
}

Some files were not shown because too many files have changed in this diff Show More