Remove cached property from SensitiveSource::flowsTo

This commit is contained in:
Tony Torralba
2021-09-14 12:38:41 +02:00
parent 563e8a2bd6
commit 51d2b5225e
5 changed files with 5 additions and 6 deletions

View File

@@ -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()))
)
}

View File

@@ -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))
)

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"