We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e8f834 commit 7aff007Copy full SHA for 7aff007
python/ql/src/experimental/Security/CWE-287-ConstantSecretKey/examples/config3.py
@@ -1,7 +1,12 @@
1
"""Flask App configuration."""
2
+import os
3
4
# General Config
5
FLASK_DEBUG = True
-SECRET_KEY = "CHANGEME5"
6
-if SECRET_KEY == "CHANGEME5":
+# if we are loading SECRET_KEY from config files then
7
+# it is good to check default value always, maybe
8
+# the user responsible for setup the application make a mistake
9
+# and has not changed the default SECRET_KEY value
10
+SECRET_KEY = os.getenv('envKey') # A_CONSTANT_SECRET
11
+if SECRET_KEY == "A_CONSTANT_SECRET":
12
raise "not possible"
0 commit comments