Skip to content

Commit bee8e6f

Browse files
committed
remove unused saniter
1 parent 591d81b commit bee8e6f

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

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

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -65,24 +65,11 @@ module FlaskConstantSecretKeyConfig {
6565
or
6666
exists(SecretKeyAssignStmt e |
6767
sink.asExpr() = e.getValue()
68-
// | sameAsHardCodedConstantSanitizer(e.getTarget(0))
6968
)
7069
) and
7170
exists(sink.getScope().getLocation().getFile().getRelativePath()) and
7271
not sink.getScope().getLocation().getFile().inStdlib()
7372
}
74-
75-
// for case check whether SECRECT_KEY is empty or not or whether it is == to a hardcoded constant value
76-
// i don't know why I can't reach from an expression to an If subExpression node
77-
predicate sameAsHardCodedConstantSanitizer(
78-
DataFlow::Node source, DataFlow::Node sink, SecretKeyAssignStmt e, If i
79-
) {
80-
source.asExpr() = e.getTarget(0).getAChildNode() and
81-
// source.getLocation().toString().matches("%config3.py%")and
82-
DataFlow::localFlow(source, sink) and
83-
sink.asExpr() = i.getASubExpression().getAChildNode*().(Compare)
84-
}
85-
8673
/**
8774
* An Assignments like `SECRET_KEY = ConstantValue`
8875
* and `SECRET_KEY` file must be the Location that is specified in argument of `from_object` or `from_pyfile` methods

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import semmle.python.ApiGraphs
66
class WebAppConstantSecretKeySource extends DataFlow::Node {
77
WebAppConstantSecretKeySource() {
88
(
9-
// because Env return an Exeption if there isan't any value
109
// we should check whether there is a default value or not
1110
exists(API::Node env |
1211
env = API::moduleImport("environ").getMember("Env") and

0 commit comments

Comments
 (0)