mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
style:move all source files under src/experimental & feat:modify source regular matching rules
This commit is contained in:
@@ -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"
|
||||
@@ -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
|
||||
)
|
||||
Reference in New Issue
Block a user