Skip to content

Commit 8160f74

Browse files
committed
Python: small clean-up
- no need for th 2-suffix - context creations are no longer unrestrictions
1 parent f8b5a82 commit 8160f74

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import TlsLibraryModel
2020
* Since we really want "the last unrestriction, not nullified by a restriction",
2121
* we also disallow flow into restrictions.
2222
*/
23-
module InsecureContextConfiguration2 implements DataFlow::StateConfigSig {
23+
module InsecureContextConfiguration implements DataFlow::StateConfigSig {
2424
private newtype TFlowState =
2525
TMkFlowState(TlsLibrary library, int bits) {
2626
bits in [0 .. max(any(ProtocolVersion v).getBit()) * 2 - 1]
@@ -112,7 +112,7 @@ module InsecureContextConfiguration2 implements DataFlow::StateConfigSig {
112112
}
113113
}
114114

115-
private module InsecureContextFlow = DataFlow::MakeWithState<InsecureContextConfiguration2>;
115+
private module InsecureContextFlow = DataFlow::MakeWithState<InsecureContextConfiguration>;
116116

117117
/**
118118
* Holds if `conectionCreation` marks the creation of a connection based on the contex

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,5 @@ class PyOpenSsl extends TlsLibrary {
7979

8080
override ProtocolRestriction protocol_restriction() { result instanceof SetOptionsCall }
8181

82-
override ProtocolUnrestriction protocol_unrestriction() {
83-
result instanceof UnspecificPyOpenSslContextCreation
84-
}
82+
override ProtocolUnrestriction protocol_unrestriction() { none() }
8583
}

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,5 @@ class Ssl extends TlsLibrary {
217217
result instanceof OptionsAugAndNot
218218
or
219219
result instanceof ContextSetVersion
220-
or
221-
result instanceof UnspecificSslContextCreation
222-
or
223-
result instanceof UnspecificSslDefaultContextCreation
224220
}
225221
}

0 commit comments

Comments
 (0)