Skip to content

Commit 3c407ea

Browse files
committed
python: rewrite comment
1 parent 8ea4878 commit 3c407ea

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

python/ql/src/Security/CWE-327/FluentApiModel.qll

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,16 @@ import TlsLibraryModel
44

55
/**
66
* Configuration to determine the state of a context being used to create
7-
* a connection. There is one configuration for each pair of `TlsLibrary` and `ProtocolVersion`,
8-
* such that a single configuration only tracks contexts where a specific `ProtocolVersion` is allowed.
7+
* a connection. The configuration uses a flow state to track the `TlsLibrary`
8+
* and the insecure `ProtocolVersion`s that are allowed.
99
*
1010
* The state is in terms of whether a specific protocol is allowed. This is
1111
* either true or false when the context is created and can then be modified
12-
* later by either restricting or unrestricting the protocol (see the predicates
13-
* `isRestriction` and `isUnrestriction`).
12+
* later by either restricting or unrestricting the protocol (see the predicate
13+
* `isAdditionalFlowStep`).
1414
*
15-
* Since we are interested in the final state, we want the flow to start from
16-
* the last unrestriction, so we disallow flow into unrestrictions. We also
17-
* model the creation as an unrestriction of everything it allows, to account
18-
* for the common case where the creation plays the role of "last unrestriction".
19-
*
20-
* Since we really want "the last unrestriction, not nullified by a restriction",
21-
* we also disallow flow into restrictions.
15+
* The state is represented as a bit vector, where each bit corresponds to a
16+
* protocol version. The bit is set if the protocol is allowed.
2217
*/
2318
module InsecureContextConfiguration implements DataFlow::StateConfigSig {
2419
private newtype TFlowState =

0 commit comments

Comments
 (0)