Skip to content

Commit 6d09db6

Browse files
committed
Java: Explicitly list custom flow steps.
1 parent e4775e0 commit 6d09db6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

java/ql/src/Security/CWE/CWE-297/UnsafeHostnameVerification.ql

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,12 @@ private predicate isFlag(DataFlow::Node source) {
123123
)
124124
}
125125

126-
/** Holds if there is flow from `node1` to `node2` either due to local flow or due to custom flow steps. */
126+
/**
127+
* Holds if there is flow from `node1` to `node2` either due to local flow or due to custom flow steps:
128+
* 1. `Boolean.parseBoolean(taintedValue)` taints the return value of `parseBoolean`.
129+
* 2. A call to an `EnvReadMethod` such as `System.getProperty` where a tainted value is used as an argument.
130+
* The return value of such a method is then tainted.
131+
*/
127132
private predicate flagFlowStep(DataFlow::Node node1, DataFlow::Node node2) {
128133
DataFlow::localFlowStep(node1, node2)
129134
or

0 commit comments

Comments
 (0)