style:move all source files under src/experimental & feat:modify source regular matching rules

This commit is contained in:
liangjinhuang
2022-02-02 01:14:51 +08:00
parent 1885b683f7
commit 976e484c57
3 changed files with 3 additions and 3 deletions

View File

@@ -13,11 +13,11 @@
*/
import python
import semmle.python.security.dataflow.InsecureRandomness::InsecureRandomness
import experimental.semmle.python.security.InsecureRandomness::InsecureRandomness
import semmle.python.dataflow.new.DataFlow
import DataFlow::PathGraph
from Configuration cfg, DataFlow::PathNode source, DataFlow::PathNode sink
where cfg.hasFlowPath(source, sink)
select sink.getNode(), source, sink, "Cryptographically insecure $@ in a security context.",
source.getNode(), "random value"
source.getNode(), "random value"

View File

@@ -58,7 +58,7 @@ module InsecureRandomness {
class RandomFnSink extends Sink {
RandomFnSink() {
exists(DataFlowCallable randomFn |
randomFn.getName().regexpMatch("(?i).*(gen(erate)?|make|mk|create).*(nonce|salt|pepper).*")
randomFn.getName().regexpMatch("(?i).*(gen(erate)?|make|mk|create).*(nonce|salt|pepper|Password).*")
|
this.getEnclosingCallable() = randomFn
)