2020-06-30 14:41:58 +02:00
|
|
|
include::../description.adoc[]
|
|
|
|
|
|
|
|
include::../ask-yourself.adoc[]
|
|
|
|
|
|
|
|
include::../recommended.adoc[]
|
|
|
|
|
|
|
|
== Sensitive Code Example
|
|
|
|
|
|
|
|
----
|
|
|
|
import hashlib
|
|
|
|
m = hashlib.md5() // Sensitive
|
|
|
|
----
|
|
|
|
|
|
|
|
----
|
|
|
|
import hashlib
|
|
|
|
m = hashlib.sha1() // Sensitive
|
|
|
|
----
|
|
|
|
|
|
|
|
----
|
|
|
|
import md5 // Sensitive and deprecated since Python 2.5; use the hashlib module instead.
|
|
|
|
m = md5.new()
|
|
|
|
|
|
|
|
import sha // Sensitive and deprecated since Python 2.5; use the hashlib module instead.
|
|
|
|
m = sha.new()
|
|
|
|
----
|
|
|
|
|
|
|
|
== Compliant Solution
|
|
|
|
|
|
|
|
----
|
|
|
|
import hashlib
|
2021-02-16 10:34:10 +01:00
|
|
|
m = hashlib.sha512() // Compliant
|
2020-06-30 14:41:58 +02:00
|
|
|
----
|
|
|
|
|
|
|
|
include::../see.adoc[]
|
2021-06-02 20:44:38 +02:00
|
|
|
|
2021-06-03 09:05:38 +02:00
|
|
|
ifdef::env-github,rspecator-view[]
|
2021-06-08 15:52:13 +02:00
|
|
|
'''
|
2021-06-02 20:44:38 +02:00
|
|
|
== Comments And Links
|
|
|
|
(visible only on this page)
|
|
|
|
|
|
|
|
include::../comments-and-links.adoc[]
|
2021-06-03 09:05:38 +02:00
|
|
|
endif::env-github,rspecator-view[]
|