mirror of
https://github.com/github/codeql.git
synced 2026-04-26 01:05:15 +02:00
sanitize resutls exist in test/demo/example/sample directories
This commit is contained in:
@@ -19,6 +19,7 @@ import semmle.python.ApiGraphs
|
||||
import semmle.python.dataflow.new.TaintTracking
|
||||
import WebAppConstantSecretKeyDjango
|
||||
import WebAppConstantSecretKeyFlask
|
||||
import semmle.python.filters.Tests
|
||||
|
||||
newtype TFrameWork =
|
||||
Flask() or
|
||||
@@ -33,7 +34,13 @@ module WebAppConstantSecretKeyConfig implements DataFlow::StateConfigSig {
|
||||
state = Django() and DjangoConstantSecretKeyConfig::isSource(source)
|
||||
}
|
||||
|
||||
predicate isBarrier(DataFlow::Node node) { node.getLocation().getFile().inStdlib() }
|
||||
predicate isBarrier(DataFlow::Node node) {
|
||||
node.getLocation().getFile().inStdlib() or
|
||||
node.getLocation()
|
||||
.getFile()
|
||||
.getAbsolutePath()
|
||||
.matches(["%test%", "%demo%", "%example%", "%sample%"])
|
||||
}
|
||||
|
||||
predicate isSink(DataFlow::Node sink, FlowState state) {
|
||||
state = Flask() and FlaskConstantSecretKeyConfig::isSink(sink)
|
||||
|
||||
Reference in New Issue
Block a user