Skip to content

Commit d9e6e5a

Browse files
atorralbasmowton
andcommitted
Apply suggestions from code review
Co-authored-by: Chris Smowton <[email protected]>
1 parent 22aad17 commit d9e6e5a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

java/ql/lib/semmle/code/java/security/CleartextStorageAndroidFilesystemQuery.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ private class AndroidFilesystemCleartextStorageSink extends CleartextStorageSink
1818
}
1919
}
2020

21-
/** The creation of an object that can be used to write to files to the local filesystem. */
21+
/** A call to a method or constructor that may write to files to the local filesystem. */
2222
class LocalFileOpenCall extends Storable {
2323
LocalFileOpenCall() {
2424
this = any(DataFlow::Node sink | sinkNode(sink, "create-file")).asExpr().(Argument).getCall()
@@ -56,7 +56,7 @@ private predicate isVarargs(Argument arg, DataFlow::ImplicitVarargsArray varargs
5656
}
5757

5858
/** Holds if `store` closes `file`. */
59-
private predicate filesystemStore(DataFlow::Node file, Call store) {
59+
private predicate closesFile(DataFlow::Node file, Call closeCall) {
6060
store.getCallee() instanceof CloseFileMethod and
6161
if store.getCallee().isStatic()
6262
then file.asExpr() = store
@@ -67,7 +67,7 @@ private predicate filesystemStore(DataFlow::Node file, Call store) {
6767
store = file.asExpr()
6868
}
6969

70-
/** A method that closes a file. */
70+
/** A method that closes a file, perhaps after writing some data. */
7171
private class CloseFileMethod extends Method {
7272
CloseFileMethod() {
7373
this.hasQualifiedName("java.io", ["RandomAccessFile", "FileOutputStream", "PrintStream"],

0 commit comments

Comments
 (0)