Skip to content

Commit 1af503a

Browse files
committed
Address documentation comments.
1 parent 46973f4 commit 1af503a

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

python/ql/src/Security/CWE-327/InsecureDefaultProtocol.qhelp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,18 @@
2323
</recommendation>
2424
<example>
2525

26-
<p>
27-
The following code shows a variety of ways of setting up a
28-
connection using SSL or TLS. They are all potentially insecure because the
29-
default version is used.
26+
<p>
27+
The following code shows two different ways of setting up a connection
28+
using SSL or TLS. They are both potentially insecure because the
29+
default version is used.
3030
</p>
3131

3232
<sample src="examples/insecure_default_protocol.py" />
3333

3434
<p>
35-
In all of the above cases, a secure protocol should be used instead.
35+
Both of the cases above should be updated to use a secure protocol
36+
instead, for instance by specifying
37+
<code>ssl_version=PROTOCOL_TLSv1_1</code> as a keyword argument.
3638
</p>
3739
<p>
3840
Note that <code>ssl.wrap_socket</code> has been deprecated in

python/ql/src/Security/CWE-327/InsecureDefaultProtocol.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @name Default version of SSL/TLS may be insecure
3-
* @description No SSL/TLS version has been specified in a call to 'ssl.wrap_socket'.
4-
* This may result in an insecure protocol being used.
3+
* @description Leaving the SSL/TLS version unspecified may result in an insecure
4+
* default protocol being used.
55
* @id py/insecure-default-protocol
66
* @kind problem
77
* @problem.severity warning

python/ql/src/Security/CWE-327/InsecureProtocol.qhelp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
<sample src="examples/insecure_protocol.py" />
3030

3131
<p>
32-
In all of the above cases, a secure protocol should be used instead.
32+
All cases should be updated to use a secure protocol, such as
33+
<code>PROTOCOL_TLSv1_1</code>.
3334
</p>
3435
<p>
3536
Note that <code>ssl.wrap_socket</code> has been deprecated in

python/ql/src/Security/CWE-327/InsecureProtocol.ql

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/**
22
* @name Use of insecure SSL/TLS version
3-
* @description An insecure version of SSL/TLS has been specified. This may
4-
* leave the connection open to attacks.
3+
* @description Using an insecure SSL/TLS version may leave the connection vulnerable to attacks.
54
* @id py/insecure-protocol
65
* @kind problem
76
* @problem.severity warning

0 commit comments

Comments
 (0)