mirror of
https://github.com/github/codeql.git
synced 2026-05-04 05:05:12 +02:00
Remove cached property from SensitiveSource::flowsTo
This commit is contained in:
@@ -35,7 +35,7 @@ private class Serializable extends ClassStore {
|
||||
not this instanceof Properties and
|
||||
// restrict attention to tainted instances
|
||||
exists(SensitiveSource data |
|
||||
data.flowsToCached(getInstanceInput(_, this.getConstructor().getDeclaringType()))
|
||||
data.flowsTo(getInstanceInput(_, this.getConstructor().getDeclaringType()))
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -25,8 +25,7 @@ class SensitiveSource extends Expr {
|
||||
}
|
||||
|
||||
/** Holds if this source flows to the `sink`. */
|
||||
cached
|
||||
predicate flowsToCached(Expr sink) {
|
||||
predicate flowsTo(Expr sink) {
|
||||
exists(SensitiveSourceFlowConfig conf |
|
||||
conf.hasFlow(DataFlow::exprNode(this), DataFlow::exprNode(sink))
|
||||
)
|
||||
|
||||
@@ -18,6 +18,6 @@ from SensitiveSource data, ClassStore s, Expr input, Expr store
|
||||
where
|
||||
input = s.getAnInput() and
|
||||
store = s.getAStore() and
|
||||
data.flowsToCached(input)
|
||||
data.flowsTo(input)
|
||||
select store, "Storable class $@ containing $@ is stored here. Data was added $@.", s, s.toString(),
|
||||
data, "sensitive data", input, "here"
|
||||
|
||||
@@ -17,6 +17,6 @@ from SensitiveSource data, Cookie s, Expr input, Expr store
|
||||
where
|
||||
input = s.getAnInput() and
|
||||
store = s.getAStore() and
|
||||
data.flowsToCached(input)
|
||||
data.flowsTo(input)
|
||||
select store, "Cookie $@ containing $@ is stored here. Data was added $@.", s, s.toString(), data,
|
||||
"sensitive data", input, "here"
|
||||
|
||||
@@ -17,6 +17,6 @@ from SensitiveSource data, Properties s, Expr input, Expr store
|
||||
where
|
||||
input = s.getAnInput() and
|
||||
store = s.getAStore() and
|
||||
data.flowsToCached(input)
|
||||
data.flowsTo(input)
|
||||
select store, "'Properties' class $@ containing $@ is stored here. Data was added $@.", s,
|
||||
s.toString(), data, "sensitive data", input, "here"
|
||||
|
||||
Reference in New Issue
Block a user