Skip to content

Commit 1cb5977

Browse files
committed
C++: CleartextFileWrite
1 parent fd0d513 commit 1cb5977

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

cpp/ql/src/Security/CWE/CWE-311/CleartextFileWrite.ql

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,14 @@ module FromSensitiveConfig implements DataFlow::ConfigSig {
3232
node.asExpr().getUnspecifiedType() instanceof IntegralType
3333
}
3434

35-
predicate observeDiffInformedIncrementalMode() {
36-
any() // TODO: Make sure that the location overrides match the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 84 (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Security/CWE/CWE-311/CleartextFileWrite.ql@87:8:87:8), Column 5 does not select a source or sink originating from the flow call on line 84 (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Security/CWE/CWE-311/CleartextFileWrite.ql@88:91:88:96)
35+
predicate observeDiffInformedIncrementalMode() { any() }
36+
37+
Location getASelectedSourceLocation(DataFlow::Node sourceNode) {
38+
exists(SensitiveExpr source | result = source.getLocation() | isSourceImpl(sourceNode, source))
39+
}
40+
41+
Location getASelectedSinkLocation(DataFlow::Node sink) {
42+
exists(FileWrite w | result = w.getLocation() | isSinkImpl(sink, w, _))
3743
}
3844
}
3945

0 commit comments

Comments
 (0)