JS: Port InsufficientPasswordHash

This commit is contained in:
Asger F
2023-10-05 09:21:25 +02:00
parent fd98b2546d
commit e1fae3d16d
3 changed files with 25 additions and 17 deletions

View File

@@ -19,7 +19,23 @@ import InsufficientPasswordHashCustomizations::InsufficientPasswordHash
* added either by extending the relevant class, or by subclassing this configuration itself,
* and amending the sources and sinks.
*/
class Configuration extends TaintTracking::Configuration {
module InsufficientPasswordHashConfig implements DataFlow::ConfigSig {
predicate isSource(DataFlow::Node source) { source instanceof Source }
predicate isSink(DataFlow::Node sink) { sink instanceof Sink }
predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer }
}
/**
* Taint tracking for password hashing with insufficient computational effort.
*/
module InsufficientPasswordHashFlow = TaintTracking::Global<InsufficientPasswordHashConfig>;
/**
* DEPRECATED. Use the `InsufficientPasswordHashFlow` module instead.
*/
deprecated class Configuration extends TaintTracking::Configuration {
Configuration() { this = "InsufficientPasswordHash" }
override predicate isSource(DataFlow::Node source) { source instanceof Source }