Skip to content

Commit fc7e062

Browse files
author
Sauyon Lee
committed
Java: Add models for the Spring cache package
1 parent d9fb09d commit fc7e062

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ private module Frameworks {
8585
private import semmle.code.java.frameworks.jackson.JacksonSerializability
8686
private import semmle.code.java.frameworks.JaxWS
8787
private import semmle.code.java.frameworks.Optional
88+
private import semmle.code.java.frameworks.spring.SpringCache
8889
private import semmle.code.java.frameworks.spring.SpringHttp
8990
private import semmle.code.java.frameworks.spring.SpringUtil
9091
private import semmle.code.java.frameworks.spring.SpringUi

java/ql/src/semmle/code/java/frameworks/spring/Spring.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import semmle.code.java.frameworks.spring.SpringBean
88
import semmle.code.java.frameworks.spring.SpringBeanFile
99
import semmle.code.java.frameworks.spring.SpringBeans
1010
import semmle.code.java.frameworks.spring.SpringBeanRefType
11+
import semmle.code.java.frameworks.spring.SpringCache
1112
import semmle.code.java.frameworks.spring.SpringComponentScan
1213
import semmle.code.java.frameworks.spring.SpringConstructorArg
1314
import semmle.code.java.frameworks.spring.SpringController
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/**
2+
* Provides models for the `org.springframework.cache` package.
3+
*/
4+
5+
import java
6+
private import semmle.code.java.dataflow.ExternalFlow
7+
8+
private class FlowSummaries extends SummaryModelCsv {
9+
override predicate row(string row) {
10+
row =
11+
[
12+
"org.springframework.cache;Cache$ValueRetrievalException;false;ValueRetrievalException;;;Argument[0];MapKey of Argument[-1];value",
13+
"org.springframework.cache;Cache$ValueRetrievalException;false;getKey;;;MapKey of Argument[-1];ReturnValue;value",
14+
"org.springframework.cache;Cache$ValueWrapper;true;get;;;MapValue of Argument[-1];ReturnValue;value",
15+
"org.springframework.cache;Cache;true;get;(Object);;MapValue of Argument[-1];MapValue of ReturnValue;value",
16+
"org.springframework.cache;Cache;true;get;(Object,Callable);;MapValue of Argument[-1];ReturnValue;value",
17+
"org.springframework.cache;Cache;true;get;(Object,Class);;MapValue of Argument[-1];ReturnValue;value",
18+
"org.springframework.cache;Cache;true;getNativeCache;;;MapKey of Argument[-1];MapKey of ReturnValue;value",
19+
"org.springframework.cache;Cache;true;getNativeCache;;;MapValue of Argument[-1];MapValue of ReturnValue;value",
20+
"org.springframework.cache;Cache;true;put;;;Argument[0];MapKey of Argument[-1];value",
21+
"org.springframework.cache;Cache;true;put;;;Argument[1];MapValue of Argument[-1];value",
22+
"org.springframework.cache;Cache;true;putIfAbsent;;;Argument[0];MapKey of Argument[-1];value",
23+
"org.springframework.cache;Cache;true;putIfAbsent;;;Argument[1];MapValue of Argument[-1];value",
24+
"org.springframework.cache;Cache;true;putIfAbsent;;;MapValue of Argument[-1];MapValue of ReturnValue;value"
25+
]
26+
}
27+
}

0 commit comments

Comments
 (0)