Skip to content

Commit 6f8ec11

Browse files
committed
fix qlhelp and qldoc bugs
1 parent c704158 commit 6f8ec11

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

python/ql/src/experimental/Security/CWE-287-ConstantSecretKey/WebAppConstantSecretKey.qhelp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,22 @@
1515
</p>
1616
</recommendation>
1717
<example>
18+
<p>Safe Django SECRET_KEY</p>
1819
<sample src="examples/example_Django_safe.py" />
19-
<sample src="examples/example_Django_snsafe.py" />
20+
<p>Unsafe Django SECRET_KEY Example:</p>
21+
<sample src="examples/example_Django_unsafe.py" />
22+
<p>Safe Flask SECRET_KEY Example:</p>
2023
<sample src="examples/example_Flask_safe.py" />
2124
<sample src="examples/example_Flask_unsafe.py" />
25+
<p>Unsafe Flask SECRET_KEY Example:</p>
2226
<sample src="examples/example_Flask_unsafe2.py" />
27+
<p>config1.py</p>
2328
<sample src="examples/config1.py" />
29+
<p>config2.py</p>
2430
<sample src="examples/config2.py" />
31+
<p>config3.py</p>
2532
<sample src="examples/config3.py" />
33+
<p>__init__.py</p>
2634
<sample src="examples/settings/__init__.py" />
2735
</example>
2836
<references>

python/ql/src/experimental/Security/CWE-287-ConstantSecretKey/WebAppConstantSecretKeyDjango.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module DjangoConstantSecretKeyConfig {
1414
predicate isSource(DataFlow::Node source) { source instanceof WebAppConstantSecretKeySource }
1515

1616
/**
17-
* A sink like following SECRET_KEY Assignments
17+
* Holds if There is a sink like following SECRET_KEY Assignments
1818
* ```python
1919
*from django.conf import settings
2020
*settings.configure(

python/ql/src/experimental/Security/CWE-287-ConstantSecretKey/WebAppConstantSecretKeyFlask.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ module FlaskConstantSecretKeyConfig {
3636
* app.config.update(SECRET_KEY="CHANGEME3")
3737
* app.config.from_mapping(SECRET_KEY="CHANGEME4")
3838
* ```
39-
* other Sinks are SECRET_KEY Constants Variables that are defined in seperate files or a class in those files like:
39+
* other Sinks are SECRET_KEY Constants Variables that are defined in separate files or a class in those files like:
4040
* ```python
4141
* app.config.from_pyfile("config.py")
4242
* app.config.from_object('config.Config')
@@ -84,7 +84,7 @@ module FlaskConstantSecretKeyConfig {
8484
}
8585

8686
/**
87-
* Assignments like `SECRET_KEY = ConstantValue`
87+
* An Assignments like `SECRET_KEY = ConstantValue`
8888
* and `SECRET_KEY` file must be the Location that is specified in argument of `from_object` or `from_pyfile` methods
8989
*/
9090
class SecretKeyAssignStmt extends AssignStmt {
@@ -119,7 +119,7 @@ module FlaskConstantSecretKeyConfig {
119119
}
120120

121121
/**
122-
* A helper predicate that specify where the Flask `SECRET_KEY` variable location is defined.
122+
* Holds if there is a helper predicate that specify where the Flask `SECRET_KEY` variable location is defined.
123123
* In Flask we have config files that specify the location of `SECRET_KEY` variable initialization
124124
* and the name of these files are determined by
125125
* `app.config.from_pyfile("configFileName.py")`

0 commit comments

Comments
 (0)