mirror of
https://github.com/github/codeql.git
synced 2025-12-22 19:56:32 +01:00
Minor doc fixes + making directFileRead private
This commit is contained in:
committed by
Tony Torralba
parent
a41f28ebe5
commit
55e78e3e25
@@ -39,7 +39,7 @@ private predicate externalStorageFlow(DataFlow::Node node1, DataFlow::Node node2
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds if `n` is a node that reads the contents of an external file in Android.
|
* Holds if `n` is a node that reads the contents of an external file in Android.
|
||||||
* This is controlable by third-party applications, so is treated as a remote flow source.
|
* This is controllable by third-party applications, so is treated as a remote flow source.
|
||||||
*/
|
*/
|
||||||
predicate androidExternalStorageSource(DataFlow::Node n) {
|
predicate androidExternalStorageSource(DataFlow::Node n) {
|
||||||
exists(DataFlow::Node externalDir, DirectFileReadExpr read |
|
exists(DataFlow::Node externalDir, DirectFileReadExpr read |
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import java
|
|||||||
/**
|
/**
|
||||||
* Holds if `fileAccess` is directly used in the `fileReadingExpr` to read the represented file.
|
* Holds if `fileAccess` is directly used in the `fileReadingExpr` to read the represented file.
|
||||||
*/
|
*/
|
||||||
predicate directFileRead(Expr fileAccess, Expr fileReadingExpr) {
|
private predicate directFileRead(Expr fileAccess, Expr fileReadingExpr) {
|
||||||
// `fileAccess` used to construct a class that reads a file.
|
// `fileAccess` used to construct a class that reads a file.
|
||||||
exists(ClassInstanceExpr cie |
|
exists(ClassInstanceExpr cie |
|
||||||
cie = fileReadingExpr and
|
cie = fileReadingExpr and
|
||||||
@@ -64,7 +64,7 @@ class DirectFileReadExpr extends Expr {
|
|||||||
DirectFileReadExpr() { directFileRead(_, this) }
|
DirectFileReadExpr() { directFileRead(_, this) }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the `Expr` representing the file that is read
|
* Gets the `Expr` representing the file that is read.
|
||||||
*/
|
*/
|
||||||
Expr getFileExpr() { directFileRead(result, this) }
|
Expr getFileExpr() { directFileRead(result, this) }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user