Skip to content

Commit 81363a8

Browse files
author
Timo Mueller
committed
Some better (and more styleguide compliant) descriptions within the query.
1 parent f743742 commit 81363a8

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

java/ql/src/experimental/Security/CWE/CWE-665/InsecureRmiJmxEnvironmentConfiguration.ql

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ class MapToPutCredentialstypeConfiguration extends DataFlow2::Configuration {
6363
}
6464
}
6565

66-
/** Models flow from `new HashMap<>()` to the argument of a `TestConstructor` call. */
66+
/**
67+
* Models flow from `new HashMap<>()` variable which is later used as environment during
68+
* a JMX/RMI server initalitation with `newJMXConnectorServer(...)` or `RMIConnectorServer(...)`
69+
*/
6770
class MapToRmiServerInitConfiguration extends DataFlow::Configuration {
6871
MapToRmiServerInitConfiguration() { this = "MapToRmiServerInitConfiguration" }
6972

@@ -139,7 +142,11 @@ where
139142
// Check if server is created with null env
140143
initNullDataflow.hasFlowPath(source, sink)
141144
or
142-
// The map created by `new HashMap<String, Object>()` has to a) flow to the sink and b) there must not exist a (different) sink that would put `"jmx.remote.rmi.server.credential.types"` into `source`. */
145+
/*
146+
* The map created by `new HashMap<String, Object>()` has to a) flow to the sink and
147+
* b) there must not exist a (different) sink that would put `"jmx.remote.rmi.server.credential.types"` into `source`.
148+
*/
149+
143150
hasVulnerableMapFlow(source, sink)
144151
select sink.getNode(), source, sink, getRmiResult(source), sink.getNode(), "here", source.getNode(),
145152
"source environment 'Map'"

0 commit comments

Comments
 (0)